-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
如何在paddle.v2中输出网络中多个中间层 #4153
Comments
解决方法是这样:
|
上面报错的原因是:
|
设置 flatten_result=False 之后会去掉“拼接”这个步骤,返回的结果是一个list:
|
谢谢,我试试~ |
对于中间层的shape,有点疑问,例如, emb_dim=128
hid_dim=512
input_dim=397
data = paddle.layer.data("word",paddle.data_type.integer_value_sequence(input_dim))
emb = paddle.layer.embedding(input=data, size=emb_dim)
fc1 = paddle.layer.fc(input=emb, size=hid_dim, act=linear, bias_attr=bias_attr) batch_size=10时,
为啥第一个是250呢? |
|
明白了,正好我这10条样本的总词数是250个……谢谢 |
例如,我想输出最后的prob以及中间的一个embedding,模型结构中:
infer部分:
但会报错
The text was updated successfully, but these errors were encountered: