-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
theano.tensor.constant reshape fix #3323
Conversation
raise TypeError("Shape must be integers", shp, shp.dtype) | ||
assert shp.ndim == 1 | ||
if not(isinstance(shp, TensorConstant) and not shp.data.size == 0): | ||
assert shp.ndim == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong, I verified and as_tensor_variable(()).ndim == 1
. You don't need to modify this.
@SinaHonari You still need to add a test case to ensure this bug does not happen again. Add a new method |
Boss your comments and concerns are all realized :) |
Thanks Sina! But you forgot about the unit-test. ;) |
What should the unit test do? |
You can check if the test is sufficient. |
Please compile the function and verify that output.shape == () |
Looks good to me, Thanks Sina! |
theano.tensor.constant reshape fix
fixes issue #3031