DeepGrabCut-PyTorch icon indicating copy to clipboard operation
DeepGrabCut-PyTorch copied to clipboard

TypeError

Open zhenmafan7 opened this issue 6 years ago • 0 comments

while I trying to run the train.py, the followed error occured: Traceback (most recent call last): File "/home/wq/Code/DeepGrabCut/train.py", line 147, in loss = class_balanced_cross_entropy_loss(output, gts, size_average=True, batch_average=True) File "/home/wq/Code/DeepGrabCut/layers/loss.py", line 45, in class_balanced_cross_entropy_loss final_loss /= np.prod(label.size()) TypeError: div_() received an invalid combination of arguments - got (numpy.int64), but expected one of:

  • (Tensor other) didn't match because some of the arguments have invalid types: (!numpy.int64!)
  • (float other) didn't match because some of the arguments have invalid types: (!numpy.int64!)

could you give me some advice to solve this problem?

zhenmafan7 avatar May 20 '19 09:05 zhenmafan7