Created by: Aurelius84
PR types
Others
PR changes
Others
Describe
Refine check_type Error Message for @declarative
Sample code:
with fluid.dygraph.guard():
x = fluid.dygraph.to_variable(np.zeros([10, 10]))
y = fluid.layers.matmul(x, x)
报错输出:
TypeError: Please use fluid.dygraph.guard() as context to run it in imperative Mode.
Because the type of 'y' in matmul is a imperative Variable.