From b109766340248afe3c80ca3e4bbc6e58b280e010 Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Thu, 5 Dec 2019 05:53:24 -0600 Subject: [PATCH] refine the stride_slice cn doc test=develop (#1640) --- doc/fluid/api_cn/layers_cn/strided_slice_cn.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/fluid/api_cn/layers_cn/strided_slice_cn.rst b/doc/fluid/api_cn/layers_cn/strided_slice_cn.rst index e7efb7e90..bef16871f 100644 --- a/doc/fluid/api_cn/layers_cn/strided_slice_cn.rst +++ b/doc/fluid/api_cn/layers_cn/strided_slice_cn.rst @@ -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]. -- GitLab