vae_cf icon indicating copy to clipboard operation
vae_cf copied to clipboard

Running on Python 3.5+

Open lenhhoxung86 opened this issue 7 years ago • 3 comments

Hello,

I run your code with Python 3.5+ and it throws several errors. I suppose it is supposed to run with Python 2.7? Some lines that could be edited for Python 3.5+:

uid = map(lambda x: profile2id[x], tp['userId']) sid = map(lambda x: show2id[x], tp['movieId'])

Should be:

uid = list(map(lambda x: profile2id[x], tp['userId'])) sid = list(map(lambda x: show2id[x], tp['movieId']))

idxlist = range(N) should be idxlist = np.arange(N)

lenhhoxung86 avatar Oct 24 '18 04:10 lenhhoxung86

Yes, the code is written for Python 2.7. To make it Python 3.5+ compatible, there should be mostly minor changes involving what you have mentioned here. (Maybe dict.iteritems() to the corresponding method in Python 3.)

dawenl avatar Oct 24 '18 17:10 dawenl

@lenhhoxung86 Do you have the python 3.5+ file for this repo. If so could you share that. I am struggling to make it work on python 3.5+.

Thanks

karthikraja95 avatar Jul 11 '19 14:07 karthikraja95

Yes, the code is written for Python 2.7. To make it Python 3.5+ compatible, there should be mostly minor changes involving what you have mentioned here. (Maybe dict.iteritems() to the corresponding method in Python 3.)

Hi, @dawenl , thanks for your reply. I was wondering which numpy, pandas and tensorflow version of this code? thanks a lot.

lizhenstat avatar Sep 11 '23 01:09 lizhenstat