-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
单机试验个性化推荐报错 TypeError: 'generator' object is not callable #2455
Comments
Could you please typeset your issue into a better format? Others may read your code more easily and offer useful help. |
The parameter of class ReaderData(object):
...
def reader_creator(self):
def reader():
...
return reader And call the reader as: trainer.train(
reader=paddle.batch(
paddle.reader.shuffle(
dataset_train.reader_creator(), buf_size=8192),
batch_size=256), |
生成的训练数据的samle如下: |
这里有错: content_categories = paddle.layer.data(
name='category_id',
type=paddle.data_type.integer_value(
dataset_train.category_id_len()))
content_categories_emb = paddle.layer.embedding(input=content_categories, size=16)
content_categories_fc = paddle.layer.fc(input=content_categories, size=16) content_categories_fc = paddle.layer.fc(input=content_categories, size=16) 的输入给错了。 |
thx,fixed |
自己定义了一个data reader,然后跑train的时候报错,但是单独运行data reader是可以正常生成样本的,具体报错的log如下:
自己写的data reader如下:
训练模型的代码如下:
The text was updated successfully, but these errors were encountered: