0
点赞
收藏
分享

微信扫一扫

tf.split()

黄昏孤酒 2023-01-13 阅读 108


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 条评论