我有如下形状的numpy数组 (196276,16) 其中有16个形状的numpy数组图像 (50,50) . 我希望输入形状为 (196276,16,50,50,1) .
(196276,16)
(50,50)
(196276,16,50,50,1)
我寻找了一个我们可以创造的解决方案。 zeroes 数组使用 np.zeroes([y.shape[0],16,50,50,1]) 然后照做,但这些看起来很慢。它能做得更优雅吗?
zeroes
np.zeroes([y.shape[0],16,50,50,1])