[Solved] I train CosinGAN on my own dataset, and I get an error IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed

Thanks to roommate Viagra~ Train CosinGAN with your own SAR image dataset, the image size is 800*800, grayscale, three-channel When training with the color image provided by the paper, it is fine, but when I replace it with my own SAR image, it reports an error: IndexError: too many indices for array: array is 2-dimensional, […]

[Solved] python: too many indices for array

The main reason for this problem is that the dimensions do not match, that is to say, the dimensions in the matrix are redundant. For example, the dimensions of the data in the data are not uniform, causing the dimension of the matrix to become (n,). E.g: 1. Caused by different dimensions in the data […]