未验证 提交 11b57760 编写于 作者: H Huihuang Zheng 提交者: GitHub

[Dy2stat] Change Some Fluid API to 2.0 API (#33460)

As the title
上级 dec63f1a
......@@ -29,10 +29,10 @@ def dyfunc_tensor_shape_1(x):
def dyfunc_tensor_shape_2(x):
x = fluid.dygraph.to_variable(x)
x = paddle.to_tensor(x)
shape = x.shape
shape2 = shape
res = fluid.layers.reshape(x, shape2)
res = paddle.reshape(x, shape2)
return res
......@@ -190,7 +190,7 @@ def dyfunc_with_while_3(x):
def dyfunc_with_while_4(x):
x = fluid.dygraph.to_variable(x)
x = paddle.to_tensor(x)
y = numpy.ones(5)
y_shape_0 = y.shape[0]
i = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册