- I loaded the Keras model from keras.applications, pretrained on imageNet, that I used for transfer learning in the previous section, without the top layer.
- I stacked a global average pooling 2D layer on top of this pretrained network.
- I preprocessed the images from the testing portion of my transfer learning dataset and input all of them into this stack.
- Then I performed PCA on the resulting series of feature vectors.
- Finally, I generated a plot of the explained variance ratio versus number of dimensions kept under PCA.
priontu / unsupervised-learning-analysis-of-transfer-learning-based-features Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License