未验证 提交 7787f0b3 编写于 作者: W wangchaochaohu 提交者: GitHub

refine doc for numel and chunk (#2551)

上级 6233e0bc
......@@ -28,7 +28,7 @@ chunk
x_np = np.random.random([3, 9, 5]).astype("int32")
x = paddle.to_tensor(x_np)
out0, out1, out22 = paddle.chunk(x, chunks=3, axis=1)
out0, out1, out2 = paddle.chunk(x, chunks=3, axis=1)
# out0.shape [3, 3, 5]
# out1.shape [3, 3, 5]
# out2.shape [3, 3, 5]
......@@ -39,3 +39,4 @@ chunk
out0, out1, out2 = paddle.chunk(x, chunks=3, axis=-2)
# out0.shape [3, 3, 5]
# out1.shape [3, 3, 5]
# out3.shape [3, 3, 5]
......@@ -9,7 +9,7 @@ numel
该OP返回一个长度为1并且元素值为输入 ``x`` 元素个数的Tensor。
参数:
- **x** (Tensor) - 输入Tensor,数据类型为int32,int64, float16, float32, float64, int32, int64 。
- **x** (Tensor) - 输入Tensor,数据类型为float16, float32, float64, int32, int64 。
返回: 返回长度为1并且元素值为 ``x`` 元素个数的Tensor。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册