-
Notifications
You must be signed in to change notification settings - Fork 215
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
Ignore strides CHECK in FromTorch when input tensor is empty #782
Conversation
@glynpu |
I think this PR do solve the issue (k2-fsa/snowfall#227 (comment)), apart from the stride checking problem, there is also a bug in |
I want to add a test case to cover the empty FsaVec, but I didn't find a way to construct a empty FsaVec. I thought there are some kinds of FsaVec, the first, FsaVec without any fsa (this kind cause this crash), the second, FsaVec contains empty fsas without states, the third, FsaVec contains empty fsas with states(surely no arcs). |
An Array1 that's default-constructed, with no region, is considered invalid. That is, it should not appear as an input argument to functions, and should not be produced as output from a function that had valid inputs. It can be considered an error, or just lead to a crash, if passed into a function. |
@pkufool feel free to merge if you think this is ready. |
See k2-fsa/snowfall#227 (comment)