tf.split()

阅读 109

2023-01-13


import numpy as np
import tensorflow as tf
a=np.reshape(range(24),(4,2,3))

sess=tf.InteractiveSession()
b= tf.split(a,1,0)

c=sess.run(b)

切割

c
Out[37]:
[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]]])]


相关推荐

精彩评论(0)

0 0 举报