-
Notifications
You must be signed in to change notification settings - Fork 147
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
fsns_demo.py reshape error #81
Comments
How did you run the |
with command |
could you show me this image? |
sure here is a link: https://imgur.com/a/sDiJdaL |
I did not copy all files fsns_model/model to see/chainer/models. Just model_35000.npz and log files. The fsns.py and train_fsns.py wher not copied. see/chainer/models already contained a fsns.py file and I dont think I'll need train_fsfs.py to test demo. Should i replace the fsns.py? |
The FSNS Model is trained on pictures of size |
Hello. I'm getting error when trying to run fsns_demo.py.
Traceback (most recent call last):
File "fsns_demo.py", line 153, in
predictions, crops, grids = network(image[xp.newaxis, ...])
File "/home/ml/Downloads/see/chainer/models/fsns.py", line 514, in call
images = F.reshape(images, (batch_size, num_channels, height, 4, -1))
File "/home/ml/env/lib/python3.5/site-packages/chainer/functions/array/reshape.py", line 98, in reshape
y, = Reshape(shape).apply((x,))
File "/home/ml/env/lib/python3.5/site-packages/chainer/function_node.py", line 230, in apply
self._check_data_type_forward(in_data)
File "/home/ml/env/lib/python3.5/site-packages/chainer/function_node.py", line 298, in _check_data_type_forward
self.check_type_forward(in_type)
File "/home/ml/env/lib/python3.5/site-packages/chainer/functions/array/reshape.py", line 40, in check_type_forward
type_check.prod(x_type.shape) % size_var == 0)
File "/home/ml/env/lib/python3.5/site-packages/chainer/utils/type_check.py", line 524, in expect
expr.expect()
File "/home/ml/env/lib/python3.5/site-packages/chainer/utils/type_check.py", line 482, in expect
'{0} {1} {2}'.format(left, self.inv, right))
chainer.utils.type_check.InvalidType:
Invalid operation is performed in: Reshape (Forward)
Expect: prod(in_types[0].shape) % known_size(=1800) == 0
Actual: 900 != 0
Any Ideas how to fix this? I have tried different shaped and sized pictures but no avail.
The text was updated successfully, but these errors were encountered: