almightyGOSU / ANR

Code for our CIKM 2018 paper titled "ANR: Aspect-based Neural Recommender"
GNU General Public License v3.0
70 stars 18 forks source link

DAttn model; Error: self.mdl.cuda(): NoneType' object has no attribute 'cuda' #2

Closed tutubalinaev closed 5 years ago

tutubalinaev commented 5 years ago

Hello,

I have tried to compare DAttn with ANR (ANR works fine!) and got this error:

Command: -d reviews_electronics -m DAttn -e 10 -p 1 -rs 98 -gpu 2 -vb 1

Loading 'info' from "/data/anr_files/datasets/reviews_electronics/reviews_electronics_info.pkl".. 'info' loaded!

[INFO] # of Users: 2,586,767, # of Items: 362,819

Creating model (Selected Model: DAttn).. Traceback (most recent call last): File "PyTorchTEST.py", line 101, in mdl = mdlZoo.createAndInitModel() File "/root/ANR/model/ModelZoo.py", line 39, in createAndInitModel self.mdl.cuda() AttributeError: 'NoneType' object has no attribute 'cuda'

Could you please fix it? Thank you in advance!

torch (0.3.0) Python 3.5.2 (default, Nov 12 2018, 13:43:14)