未验证 提交 d9a04a16 编写于 作者: L lilong12 提交者: GitHub

Fix bug in api example code for crop_tensor (#2245)

* modify the doc, test=develop
上级 7acb6ae6
......@@ -104,7 +104,7 @@ crop_tensor
# crop3.shape = [-1, 2, 3]
# offsets is a list in which each element is a constant or Tensor
offsets_var = fluid.data(name="dim1", shape=[1], dtype="int32")
offsets_var = fluid.data(name="offset", shape=[1], dtype="int32")
crop4 = fluid.layers.crop_tensor(x, shape=[-1, 2, 3], offsets=[0, 1, offsets_var])
# crop4.shape = [-1, 2, 3]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册