https://docs.scipy.org/doc/numpy/reference/generated/numpy.resize.html
a = np.zeros((100,28*28)) print(a.shape) b = a.reshape((100,28,28,1)) print(b.shape) b = np.resize(b, (100,28*4,28*4,1)) print(b.shape)
(100, 784)
(100, 28, 28, 1)
(100, 112, 112, 1)