-
Notifications
You must be signed in to change notification settings - Fork 1
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
ValueError: Broadcasting failed #2
Comments
Please check the dimension of |
hello! yes, i solved that error. |
hey,
I am using my own dataset and getting the following error,
Traceback (most recent call last):
File "train_mnist.py", line 177, in
main()
File "train_mnist.py", line 173, in main
trainer.run()
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/training/trainer.py", line 313, in run
six.reraise(*sys.exc_info())
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/training/trainer.py", line 299, in run
update()
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/training/updater.py", line 223, in update
self.update_core()
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/training/updater.py", line 234, in update_core
optimizer.update(loss_func, *in_arrays)
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/optimizer.py", line 536, in update
loss = lossfun(*args, **kwds)
File "/home/ram/sanaa/workspace/style_occasion/sanaa/train_conv/train_conv_multi/chainer-center-loss-master/model.py", line 49, in call
center_loss = self.center_loss_function(h, t)
File "/home/ram/sanaa/workspace/style_occasion/sanaa/train_conv/train_conv_multi/chainer-center-loss-master/center_loss.py", line 78, in call
return CenterLossFunction(self.alpha, self.num_classes)(x, t, self.centers)
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/function.py", line 235, in call
ret = node.apply(inputs)
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/function_node.py", line 245, in apply
outputs = self.forward(in_data)
File "/home/ram/sanaa/local/lib/python2.7/site-packages/chainer/function.py", line 135, in forward
return self._function.forward(inputs)
File "/home/ram/sanaa/workspace/style_occasion/sanaa/train_conv/train_conv_multi/chainer-center-loss-master/center_loss.py", line 39, in forward
y = xp.sum(xp.square(features - centers_batch)) / batch_size / 2
File "cupy/core/core.pyx", line 1185, in cupy.core.core.ndarray.sub
File "cupy/core/elementwise.pxi", line 798, in cupy.core.core.ufunc.call
File "cupy/core/core.pyx", line 2308, in cupy.core.core.broadcast.init
ValueError: Broadcasting failed
help would be appreciated!
thanks!
The text was updated successfully, but these errors were encountered: