In this section, we will do some analysis of the transferred values that we just got for the training images. The purpose of this analysis is to see whether these transfer values will be enough for classifying the images that we have in CIFAR-10 or not.
We have 2,048 transfer values for each input image. In order to plot these transfer values and do further analysis on them, we can use dimensionality reduction techniques such as Principal Component Analysis (PCA) from scikit-learn. We'll reduce the transfer values from 2,048 to 2 to be able to visualize it and see if they will be good features for discriminating between different categories of CIFAR-10:
from sklearn.decomposition import PCA
Next up, we need ...