vfm icon indicating copy to clipboard operation
vfm copied to clipboard

'buffer' object has no attribute 'shape'

Open KunPengRen opened this issue 8 years ago • 5 comments

I run python run_movielens.py in my computer has this error /fm.py", line 61, in forward bs = val.data.shape[0] AttributeError: 'buffer' object has no attribute 'shape'

KunPengRen avatar Feb 22 '18 16:02 KunPengRen

how to solve this, i meet too

oliver7l avatar Jul 03 '18 11:07 oliver7l

It may be because the version of chainer is not the good one anymore? Could you please tell us the version of chainer you used @cemoody? Could you do a pip freeze?

jilljenn avatar Aug 22 '18 06:08 jilljenn

Presumably it was after Chainer 1.9 but I still get the error on Chainer 2. Is it because this code is supposed to be run on GPU?

jilljenn avatar Aug 25 '18 08:08 jilljenn

I wonder why there are buffers in the first place. @cemoody Please!

jilljenn avatar Feb 26 '19 05:02 jilljenn

So I managed to run the code by using Chainer 1.23 and adding val, loc = loc, val in the forward method of FM. For some reasons, these two variables are swapped.

jilljenn avatar Feb 26 '19 06:02 jilljenn