I am working on CIFAR-10 dataset. I found that working with gray scale image would be easier for me at this time. The image are represented in a matrix. Each row of the matrix is one 32×32 RGB image. The first 1024 elements are red channel values. The next 1024 are green and finally the last 1024 are blue values. What I have in mind is converting the rows into 3D arrays then changing them from RGB to grayscale and finally saving them to a 4D array. Is there any efficient way for doing that? I mean without using for loops.
Thanks alot
Best Answer