tf.split()

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]]])]
posted @ 2018-10-26 19:18  luoganttcc  阅读(79)  评论(0编辑  收藏  举报