Open Luciennnnnnn opened 3 years ago
https://github.com/sefibk/KernelGAN/blob/7218a37f0933519513aac97f40b8a72d3676eec9/imresize.py#L164
If we want to get the size of last dimension(the number of channels), we should use im.shape[-1],np.ndim(im) is the number of dimension of im, in RGB case just equal to im.shape[-1], but for gray image that is wrong.
im.shape[-1]
np.ndim(im)
im
https://github.com/sefibk/KernelGAN/blob/7218a37f0933519513aac97f40b8a72d3676eec9/imresize.py#L164
If we want to get the size of last dimension(the number of channels), we should use
im.shape[-1]
,np.ndim(im)
is the number of dimension ofim
, in RGB case just equal to im.shape[-1], but for gray image that is wrong.