Posts

Day 25: Running my liflelong VQA tests

I spent this morning working on my presentation. I tried to make my presentation more polished and explain computer vision in a concise way. After that I began making my lifelong programs ready to run on the server. When I tried to run the programs on the imac I am using it crashed so I needed something with more memory. After working with Tyler to convert my numpy code to Pytorch it was ready to run on the server. Pytorch is a library that runs large array calculations much quicker than numpy. I hope to extract data from my trials in order to evaluate their effectiveness.

Day 24: Working on my final presentation

I spent the majority of my day today working on my final presentation. I addressed some problems with my outline mainly the way I was over complicating things. Some of the topics of my presentation are difficult to explain but not as difficult to use. One example of this is neural networks. I was trying to go to in depth on how a neural network functions but all I really had to describe was the general use of them. I also added lots of visuals to my presentation in order to make it more interesting. I also made some minor changes to my code in an attempt to optimize it but its overall function stayed the same.

Day 23: Testing the VQA dataset on the nearest neighbor classifier.

By arranging the data from the VQA data set in a way that its distance could be computed I was able to use the VQA data set on my nearest neighbor classifier.  In order to use the VQA data I had to change it from sentence and answers into vectors. I did this by assigning a specific index to each unique word and then placing the string of indexes into a vector. As a result I was able to calculate the distance between the vectors and then plot them on a nearest neighbor classifier. Tomorrow I plan to test the varying accuracy of the data on different lifelong learning algorithms.

Day 22: Implementing new lifelong learning models

Today I implemented a reservoir sampling algorithm as well as a queue nearest neighbor program. The reservoir algorithm functions similarly to the incremental nearest neighbor program i implemented on Friday. The only difference is that it only holds on to a certain amount of data points per class and when new data points are added it removes an existing point at random. This is an effective way to update your prediction function and it uses less memory than the standard nearest neighbor function. The other program I implemented was the queue nearest neighbor program. This is similar to the reservoir program. The thing queue does differently is that it removes the oldest data point for a specific class when new data points are added. This is also an effective way to reduce memory usage. Tomorrow I plan to combine the VQA data set and these classifiers in order to test the effectiveness of lifelong learning on VQA.

Day 21: Implementing a lifelong learning model

Today I began working on the other half of my project which is lifelong learning. Lifelong learning allows a network to improve itself continually without forgetting old data. This is useful because retraining an entire neural network takes lots of time and computational power. The lifelong model I implemented is called incremental nearest neighbor. Nearest neighbor stores all of your points in a coordinate grid and it classifies a new item by checking which known object is closest. Incremental nearest neighbor adds every new data point it classifies to the grid hopefully improving the accuracy of the model as it does. Next week I will continue to work on lifelong models as well as using VQA data on them.

Day 20: Evaluating the accuracy of a VQA model

Today I created an evaluation function for my VQA model. Every loop over the data set I would print the average loss and the overall accuracy. Loss measure the incorrectness of a functions guess. Lower loss is good higher is bad. My function trended toward lower loss as it continued to train on the dataset. I was getting an accuracy of around 30% which is fairly good considering I was training the model on questions that had no associated images. In the future I plan to combine the image data with the question data.

Day 19: VQA model success

In the morning I tried debugging my VQA model. The error code was somewhat cryptic and it was frustrating trying to figure out the cause of it. With the help of Kushal I was able to locate the source of my error and continue working. When I was passing in data to the GRU I was not checking the batch size correctly causing the program to crash. Despite this setback by lunchtime I was able to get my VQA model to make predictions on questions. I have not formatted the output or run the model on test data but I am glad that the model is finally working. After lunch I traced through all of the code and rewrote and commented any part that was confusing to me. Tomorrow I plan to make a testing function that is able to evaluate the accuracy of the model.