[batch, in_height, in_width, in_channels]
通道1
通道2
表示代码:
a = tf.constant([[
[[1., 17.],
[2., 18.],
[3., 19.],
[4., 20.]],
[[5., 21.],
[6., 22.],
[7., 23.],
[8., 24.]],
[[9., 25.],
[10., 26.],
[11., 27.],
[12., 28.]],
[[13., 29.],
[14., 30.],
[15., 31.],
[16., 32.]]
]])
a_shape = a.get_shape()
with tf.Session() as sess:
print(a_shape)
print('\n')
print(sess.run(a))
(1, 4, 4, 2)
[[[[ 1. 17.]
[ 2. 18.]
[ 3. 19.]
[ 4. 20.]]
[[ 5. 21.]
[ 6. 22.]
[ 7. 23.]
[ 8. 24.]]
[[ 9. 25.]
[ 10. 26.]
[ 11. 27.]
[ 12. 28.]]
[[ 13. 29.]
[ 14. 30.]
[ 15. 31.]
[ 16. 32.]]]]
网友评论