Hi, have you got any idea why I'm getting this error?
(py35_pytorch) ajay@ajay-h8-1170uk:~/PythonProjects/pytorch_RVAE-master$ python3 train_word_embeddings.py
preprocessed data was found and loaded
Traceback (most recent call last):
File "train_word_embeddings.py", line 47, in <module>
out = neg_loss(input, target, args.num_sample).mean()
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/torch/nn/modules/module.py", line 224, in __call__
result = self.forward(*input, **kwargs)
File "/home/ajay/PythonProjects/pytorch_RVAE-master/selfModules/neg.py", line 38, in forward
assert parameters_allocation_check(self), \
File "/home/ajay/PythonProjects/pytorch_RVAE-master/utils/functional.py", line 16, in parameters_allocation_check
return fold(f_and, parameters, True) or not fold(f_or, parameters, False)
File "/home/ajay/PythonProjects/pytorch_RVAE-master/utils/functional.py", line 2, in fold
return a if (len(l) == 0) else fold(f, l[1:], f(a, l[0]))
File "/home/ajay/PythonProjects/pytorch_RVAE-master/utils/functional.py", line 2, in fold
return a if (len(l) == 0) else fold(f, l[1:], f(a, l[0]))
File "/home/ajay/PythonProjects/pytorch_RVAE-master/utils/functional.py", line 6, in f_and
z = x and y
File "/home/ajay/anaconda3/envs/py35_pytorch/lib/python3.5/site-packages/torch/autograd/variable.py", line 123, in __bool__
torch.typename(self.data) + " is ambiguous")
RuntimeError: bool value of Variable objects containing non-empty torch.FloatTensor is ambiguous
So I guess there's a type problem - a python bool needs to be converted to a torch float?
Hi, have you got any idea why I'm getting this error?
So I guess there's a type problem - a python bool needs to be converted to a torch float?