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

refine the stride_slice cn doc test=develop (#1640)

上级 72d742ba
......@@ -29,14 +29,12 @@ strided_slice算子。
strides=[1,-1]
则:
result=[[8,7,6],]
result=[[8,7,6],]
示例3:
给定:
data=[[1,2,3,4],[5,6,7,8],]
axes=[0,1]
starts=[-1,1000]
starts=[0,1]
ends=[-1,1000] # 此处-1表示第0维的反向第0个位置,索引值是1。
strides =[1,3]
则:
......@@ -82,4 +80,4 @@ strided_slice算子。
# attr starts is a list which contain tensor Variable.
minus_3 = fluid.layers.fill_constant([1], "int32", -3)
sliced_2 = fluid.layers.strided_slice(input, axes=axes, starts=[minus_3, 0, 2], ends=ends, strides=strides_2)
# sliced_2 is input[:, 0:3:1, 0:2:1, 2:4:2].
\ No newline at end of file
# sliced_2 is input[:, 0:3:1, 0:2:1, 2:4:2].
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册