Giter VIP home page Giter VIP logo

dlcourse's Introduction

Deep learning course

I am participating in the deep learning MOOC from http://fast.ai. Usually late at night, and hence in small batches. I use the present markdown file for log-keeping and managing to-do lists, in order to be independent of the computer I am working on.

Infrastructure and workflow

For training CNNs, I will use an AWS p2.large instance. Setting things up and running will be done on a much cheaper t2.large instance. To synchronize the machines, I will use the present github repository.

Week 1

In week one, we are expected to set up an AWS p2.large instance and get keras on top of theano up and running. We use this instance to retrain a VGG 16 model to discriminate between cats and dogs.

As a homework, we have to participate in the cats vs dogs redux challenge on http://kaggle.com, using a fine-tuned VGG16 model.

To do

A general to-do list is managed here, finer details will be handled in a jupyter notebook.

  • get p2.large machine up and running
  • get competition data handling script up and running (inside a notebook?)
  • Train and finetune on p2.large instance!
  • Visualize results: correctly classified, incorrectly classified and so on, in the notebook
  • prepare kaggle submission

Idea collection

  • In keras, model.fit(...) returns the history of training and validation losses and metrics over epochs. We should keep this.
  • If we pick all 4096 values from the last dense layer, for each image, we should be able to use these features for a more conventional workup. Are these predictions well-separated? Look at tSNE! can we use a random forest, or whatever, for prediction? And finally, how does this RF fare against the dense layer?

Journal

Week one, homework

For prediction, we cannot use the test images directly; instead, we need preprocssing to generate numpy arrays. Keras provides a predict_generator() method which should be quite helpful here.

Also, we should look into data augmentation, as provided by the image data generator; this may help to push the accuracy further.

2017-01-25 Week one, homework

I got the p2.large machine up and running, week-one assignments are handled in the corresponding notebook. Finetuning the model took approx. 8 minutes, using a batchsize of 32. Monitoring the GPU revealed that only approx 1GB of RAM was utilized, presumably, I can use a larger batch size.

Result:

Epoch 1/1
20000/20000 [==============================] - 640s - loss: 0.2420 - acc: 0.9543 - val_loss: 0.1680 - val_acc: 0.9743

A validation accuracy of 97% looks highly promising to me. We will build on that!

I saved the model using

vgg.model.save_weights(path + 'results/2017-01-25-week-one-bs32')

dlcourse's People

Contributors

mingrisch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.