未验证 提交 19d334ef 编写于 作者: S SunAhong1993 提交者: GitHub

Update Slice.md

上级 7f5fae8b
...@@ -10,7 +10,7 @@ layer { ...@@ -10,7 +10,7 @@ layer {
top: "out1" top: "out1"
top: "out2" top: "out2"
top: "out3" top: "out3"
slice_param{ slice_param {
axis: 1 axis: 1
alice_point: 1 alice_point: 1
alice_point: 2 alice_point: 2
...@@ -51,8 +51,8 @@ layer { ...@@ -51,8 +51,8 @@ layer {
top: "out1" top: "out1"
top: "out2" top: "out2"
top: "out3" top: "out3"
slice_param{ slice_param {
axis: 1 #使用-1效果相同 axis: 1 # 使用-1效果相同
alice_point: 1 alice_point: 1
alice_point: 2 alice_point: 2
} }
...@@ -62,8 +62,8 @@ layer { ...@@ -62,8 +62,8 @@ layer {
```python ```python
# PaddlePaddle示例: # PaddlePaddle示例:
# 输入shape:(2,6) # 输入shape:(2,6)
output1 = paddle.fluid.layers.slice(input = inputs, axes = [1], starts= [1], ends = [3]) output1 = paddle.fluid.layers.slice(input=inputs, axes=[1], starts=[1], ends=[3])
# 输出shape:(2,2) # 输出shape:(2,2)
output2 = paddle.fluid.layers.slice(input = inputs, axes = [0,1], starts= [0,1], ends = [1,3]) output2 = paddle.fluid.layers.slice(input=inputs, axes=[0,1], starts=[0,1], ends=[1,3])
# 输出shape:(1,2) # 输出shape:(1,2)
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册