我需要把图片叠加再一起成这种形式(batch,28,28,1)
可以使用numpy库的concatenate函数实现
a = np.array([[0,1]])
print(a.shape)
b = np.array([[0,1]])
print(b.shape)
print (np.concatenate((a,b),axis = 0).shape)
输出如下:
我需要把图片叠加再一起成这种形式(batch,28,28,1)
可以使用numpy库的concatenate函数实现
a = np.array([[0,1]])
print(a.shape)
b = np.array([[0,1]])
print(b.shape)
print (np.concatenate((a,b),axis = 0).shape)
输出如下: