xiaxin1998/DHCN

Do you have any RuntimeError when you run this code?

git-x5 opened this issue · 1 comments

In file "model.py" ,line 51, in forward
item_embeddings = np.sum(final, 0)

RuntimeError: Can't call numpy() on Tensor that requires grad. Use tensor.detach().numpy() instead.

Hi I do not encounter this error, but I think it is because of version.
Now I have changed line 50 and 51, please try to see whether the codes can be run successfully in your environment.