v2 API cannot access layer attributes
Created by: emailweixu
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)