tf slice

Solutions on MaxInterview for tf slice by the best coders in the world

showing results for - "tf slice"
Dante
28 Apr 2020
1t = tf.constant([[[1, 1, 1], [2, 2, 2]],
2                 [[3, 3, 3], [4, 4, 4]],
3                 [[5, 5, 5], [6, 6, 6]]])
4tf.slice(t, [1, 0, 0], [1, 1, 3])  # [[[3, 3, 3]]]
5tf.slice(t, [1, 0, 0], [1, 2, 3])  # [[[3, 3, 3],
6                                   #   [4, 4, 4]]]
7tf.slice(t, [1, 0, 0], [2, 1, 3])  # [[[3, 3, 3]],
8                                   #  [[5, 5, 5]]]
9
queries leading to this page
tf slicetf slicetf slice