Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --context-size=1 #565

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

csukuangfj
Copy link
Collaborator

When --context-size is 1, there is no conv module at all.

It fixes the following error

[I] /xxxx/sherpa/cpp_api/bin/online-recognizer.cc:143:int32_t main(int32_t, char**) 2024-04-08 14:07:07.958 decoding method: greedy_search
terminate called after throwing an instance of 'torch::jit::ObjectAttributeError'
  what():  __torch__.torch.nn.modules.linear.Identity (of Python compilation unit at: 0x556bd40) does not have a field with name 'weight'

When --context-size is 1, there is no conv module at all.
@csukuangfj csukuangfj force-pushed the fix-context-size-1 branch from b8669e7 to 0a1946a Compare April 8, 2024 06:24
@csukuangfj csukuangfj merged commit 98f9429 into k2-fsa:master Apr 8, 2024
@csukuangfj csukuangfj deleted the fix-context-size-1 branch April 8, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant