[[[1.,2.,3。]],[[7.,8.,9。]]] #a等级3张量,形状[2,1,3]

时间:2017-09-13 10:22:47

标签: tensorflow

有人可以向我解释为什么这个例子的形状为[2,1,3],我只是看不到它?

[[[1。,2.,3。]],[[7.,8.,9]]]#a等级3张量,形状[2,1,3]

1 个答案:

答案 0 :(得分:4)

缩进确实存在奇迹:

[ # this one contains 2 items
    [ # each of this contains 1 item
        [1., 2., 3.] # each of this contains 3 items
    ], 
    [
        [7., 8., 9.]
    ]
]

因此,形状为[2,1,3]