Traceback (most recent call last):
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 289, in
model.train(data,sampler,num_iters)
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 45, in train
self.init(data)
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 62, in init
self.create_loss_samples()
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 70, in create_loss_samples
self.loss_samples = [t for t in sampler.generate_samples(data, num_loss_samples)]
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 70, in
self.loss_samples = [t for t in sampler.generate_samples(data, num_loss_samples)]
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 168, in generatesamples
for in xrange(self.num_samples(self.data.nnz)):
NameError: name 'xrange' is not defined
Traceback (most recent call last): File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 289, in
model.train(data,sampler,num_iters)
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 45, in train
self.init(data)
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 62, in init
self.create_loss_samples()
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 70, in create_loss_samples
self.loss_samples = [t for t in sampler.generate_samples(data, num_loss_samples)]
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 70, in
self.loss_samples = [t for t in sampler.generate_samples(data, num_loss_samples)]
File "D:/PycharmProjects/recommendation algorithm/bpr.py", line 168, in generatesamples
for in xrange(self.num_samples(self.data.nnz)):
NameError: name 'xrange' is not defined