jeong-tae / RACNN-pytorch

This is a third party implementation of RA-CNN in pytorch.
201 stars 63 forks source link

error find in line 75, RACNN.py when run train.py #9

Closed longgang123 closed 6 years ago

longgang123 commented 6 years ago

find error in line 75, RACNN.py when run train.py

h = lambda x: 1 / (1 + torch.exp(-10 * x)) RuntimeError: _exp_out is not implemented for type torch.cuda.LongTensor look like is the torch.exp not support a longtensor do any body know why? thanks

jeong-tae commented 6 years ago

You can cast your input data x to floatTensor This https://discuss.pytorch.org/t/how-to-cast-a-tensor-to-another-type/2713 will help you.