Skip to main content

Day 7 (7/16/19): Transfer Learning with Stanford Dogs

Today I continued my work with transfer learning from yesterday and applied it to new data: the Stanford Dogs dataset. This contains images representing 120 different species of dogs, and I trained a model to classify them that was similar to the one I used for CUB-200. I realized an error I was doing before was computing the Cross Entropy Loss as well as passing the weights of the fully connected through a Log Softmax function. As a result, I was actually computing the log of the weights twice which was affecting the training of my model's parameters. After fixing that structure, I achieved ~83% accuracy classifying the dog species using fixed feature extraction on Resnet18, although I hope to still improve in the future. There are a number of hyperparameters I can play around with such as the transformations for data augmentation, the learning rate for the criterion, the criterion and optimizer functions themselves, the batch size of the training samples, etc.


Along with tweaking the hyperparameters, I practiced implementing different models (e.g. Resnet152, VGG16) and also figured out how to save and load models that I already trained on my datasets. Finally, I spent some time practicing being able to manipulate the datasets and extract information about them. This included, extracting the class names, plotting a batch of sample images with class labels, graphing the distribution of image samples per class, and creating other statistical plots as well.


Tomorrow I hope to take the knowledge I have learned from transfer learning and apply it to conduct incremental learning or open set recognition experiments. This will allow me to draw conclusions regarding the effect each aspect of lifelong learning has on the other when implemented as one model.

Comments

Popular posts from this blog

Day 9 (7/18/19): Incrementally Learning CUB200

Today I continued my work learning about incremental learning models by testing out different strategies on the CUB200 dataset. From what I understand from reading various articles, there seem to be five different approaches to mitigating catastrophic forgetting in lifelong learning models. These are regularization methods (adding constraints to a network's weights), ensemble methods (train multiple classifiers and combine them), rehearsal methods (mix old data with data from the current session), dual-memory methods (based off the human brain, includes a fast learner and a slow learner), and sparse-coding methods (reducing the interference with previously learned representations).  All of these methods have their constraints and I don't believe it is yet clear what method (or what combination of different methods) is best. Full rehearsal obviously seems to be the most effective at making the model remember what it had previously learned but given that all training exam...

Day 24 (8/8/19): Multilayer Perceptron Experiment

I continued gathering more results for my presentation today, and the data table is coming along nicely. We are able to see a significant trend that using Mahalanobis instead of Baseline Thresholding recovers much of the OOD recognition that is lost with streaming or incremental models. The SLDA model appears to be a lightweight, accurate streaming model which can be paired with Mahalanobis to be useful as an embedded agent in the real world. For the purposes of demonstrating catastrophic forgetting, I ran five experiments and averaged the results for a simple incrementally trained MLP. Obviously, the model failed miserably and was achieving only about 1% of the accuracy of the offline model. Including this is only to show how other forms of streaming and incremental models are necessary to develop lifelong learning agents. A diagram of a simple multilayer perceptron.