Coder-Yu / QRec

QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)
1.59k stars 406 forks source link

'SVDPlusPlus' 'IRGAN' object has no attribute 'k' #195

Closed EternalImmortal closed 3 years ago

EternalImmortal commented 3 years ago

When I run SVDPlusPlus and IRGAN on movielens, I get the error as in the title. I read the code but didn't find where to initialize k.

Coder-Yu commented 3 years ago

problems have been solved. Thanks for your feedback.

EternalImmortal commented 3 years ago

Thank for that. After updating my code, when I run the irgan again, there is another problem.

RecQ/algorithm/ranking/IRGAN.py", line 119, in get_data AttributeError: 'GEN' object has no attribute 'all_rating'

Also, when I run RSGAN, there is a index error :

“/GitHub/RecQ/algorithm/ranking/RSGAN.py", line 453, in predictForRanking res = self.sess.run(self.d_output, {self.u_idx: u}) tensorflow.python.framework.errors_impl.InvalidArgumentError: indices = 1450 is not in [0, 1450) [[node discriminator/u_e (defined at /Documents/GitHub/RecQ/algorithm/ranking/RSGAN.py:335) ]] It seems is a out of index problem.

I would appreciate it a lot if you can deal that if possible.

Coder-Yu commented 3 years ago

I have solved the above problems. Thanks for the feedback. Sometimes I would refactor the codes, which might lead to some problems if I neglect some segments which should be changed. If there are still problems, please report them. Thanks.

Coder-Yu commented 3 years ago

kind note: I follow the implementation of IRGAN released by the authors. Personally, I think tuning this model is very hard and it is also time-consuming. So, there is no need to take much time in tuning IRGAN.

EternalImmortal commented 3 years ago

Thanks a lot for the correction! I want to run IRGAN as a baseline in my course project for it is the first time to use GAN in RS, so I won't do much tuning. Really appreciate for your suggestion!