-
Notifications
You must be signed in to change notification settings - Fork 46
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
Empty tensors are valid for new shape #472
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally posted by @fdwr in #446 (comment)
Empty tensors are valid in ML. If the
input
tensor shape contains zeros, then it's correct fornewShape
to contain zeros. Indeed, if theinput
shape contains zeros, thennewShape
must have at least one zero, because otherwise that would be an error. It's only an error if the number of total input element count differs from the total output element count, and so it's good to remove this redundant clause because the element count check is both necessary and sufficient.The text was updated successfully, but these errors were encountered: