Skip to content
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

v2 API cannot access layer attributes #2120

Closed
emailweixu opened this issue May 13, 2017 · 1 comment
Closed

v2 API cannot access layer attributes #2120

emailweixu opened this issue May 13, 2017 · 1 comment

Comments

@emailweixu
Copy link
Collaborator

Attributes such as size, height and width cannot be accessed from the Layer object during model construction. The Layer.attr() will interfere with model construction. For example, the following code will cause error:

y = paddle.layer.fc(input=x, size=x.attr().size/2)
z = paddle.layer.fc(input=y, size=x.attr())
cost = paddle.layer.regression_cost(input=y, label=x)
topology = Topology(cost)

@luotao1 luotao1 added this to 未支持原有功能 in V2 API Enhancement May 13, 2017
@luotao1 luotao1 moved this from 未支持原有功能 to 性能问题/需要完善 in V2 API Enhancement May 13, 2017
@emailweixu
Copy link
Collaborator Author

Solved by #2288

@luotao1 luotao1 moved this from 性能问题/需要完善 to 已完成 in V2 API Enhancement Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants