## 一、strided_slice原型

strided_slice在各个维度上对数据做切片，做切片过程中可以指定stride。

```tf.strided_slice(
)```

## 二、strided_slice对数据的处理

1. axis#0维上，[0, 4)，stride 2，也就是切片#0，#2；

1. axis#1维上，切片[1, 6)，stride 2，也就是切片#1，#3，#5；

1. axis#2维上，切片[0, 3)，stride 1，也就是切片#0，#1，#2；也就是该维上不变。

## 三、strided_slice程序实现

```>>>
>>> t = tf.range(4*6*3)
>>> t = tf.reshape(t, [4, 6, 3])
>>> t
<tf.Tensor: shape=(4, 6, 3), dtype=int32, numpy=
array([[[ 0,  1,  2],
[ 3,  4,  5],
[ 6,  7,  8],
[ 9, 10, 11],
[12, 13, 14],
[15, 16, 17]],
[[18, 19, 20],
[21, 22, 23],
[24, 25, 26],
[27, 28, 29],
[30, 31, 32],
[33, 34, 35]],
[[36, 37, 38],
[39, 40, 41],
[42, 43, 44],
[45, 46, 47],
[48, 49, 50],
[51, 52, 53]],
[[54, 55, 56],
[57, 58, 59],
[60, 61, 62],
[63, 64, 65],
[66, 67, 68],
[69, 70, 71]]], dtype=int32)>
>>>```

```>>>
>>> t = tf.strided_slice(t, begin = [0, 1, 0], end = [4, 6, 3], strides = [2, 2, 1])
>>> t
<tf.Tensor: shape=(2, 3, 3), dtype=int32, numpy=
array([[[ 3,  4,  5],
[ 9, 10, 11],
[15, 16, 17]],
[[39, 40, 41],
[45, 46, 47],
[51, 52, 53]]], dtype=int32)>
>>>```