Is this the correct way of whitening an image in python?
I am trying to zero-center and whiten CIFAR10 dataset, but the result I get looks like random noise! Cifar10 dataset contains 60,000 color images of size 32x32 . The training set contains 50,000 and test set contains 10,000 images respectively. The following snippets of code show the process I did to get the dataset whitened : # zero-center mean = np.mean(data_train, axis = (0,2,3)) for i in range(data_train.shape[0]): for j in range(data_train.shape[1]): data_train[i,j,:,:] -= mean[j] first_dim = data_train.shape[0] #50,000 second_dim = data_train.shape[1] * data_train.shape[2] * data_train