Open BhuvaneshwariBhaskaran opened 5 years ago
I was trying to train a model but getting an error for euclid_mindist line 114 in utils.py.
I used epocs 40 and reduced the train.mat file to 5000 images.
Error: Bool value of Tensor with more than one value is ambiguous
`for i in range(l):
best = 1000000000 predy = ((output[i] / 227.0) / 227.0) predx = ((output[i] % 227.0) / 227.0) ct = 0 for j in range(100): ground_x = target[i][2*j] ground_y = target[i][2*j + 1] if ground_x == -1 or ground_y == -1: break temp = np.sqrt(np.power((ground_x - predx), 2) + np.power((ground_y - predy), 2)) if temp < best: best = temp ct += 1 fulltotal += best fulltotal = fulltotal / float(l * 1.0) return fulltotal`
It would be great if you can give me a brief of about implementation of this logic with best = 1000000000.
I also face this error. May I ask you how you dealt with the error finally please?
Facing the same issue Error: Bool value of Tensor with more than one value is ambiguous
. Can someone help?
I also facing the same issue.Can someone help?
Facing the same issue
Error: Bool value of Tensor with more than one value is ambiguous
. Can someone help?
May I ask you how you dealt with the error please?
@zrSKY98 @prathmeshrmadhu @robert1015 I tried to solve this problem, I modified the return value of the predict()
inmodels / gazennet.py
==> return hm_base.view (-1, 227 * 227)
I was trying to train a model but getting an error for euclid_mindist line 114 in utils.py.
I used epocs 40 and reduced the train.mat file to 5000 images.
Error: Bool value of Tensor with more than one value is ambiguous
`for i in range(l):
It would be great if you can give me a brief of about implementation of this logic with best = 1000000000.