while extracting the cifar10 dataset im confronted by arrays with the dimension of 32x32x3.
i can plot the image in colour with e.g. plt.imshow(train_data[2]); whats a common way to transform the array to the dimension 32x32 with grayscale values?
train_data, train_labels, test_data, test_labels =
load_cifar10_data(data_dir)
print(train_data.shape)
print(train_labels.shape)
output:
(50000, 32, 32, 3) (50000,)
meanwhile, i'm just saving the images and read them again, but i guess there is a by far more elegant way to directly store the pictures to grayscale.