Giter VIP home page Giter VIP logo

deeplearning's Introduction

DS-GA 1008: Deep Learning

Assignment 1 - MNIST Digit Recognition

Introduction

Digit Recognition using MNIST dataset

Structure

.
├── dat
│   └── mnist.t7 ```dataset```
├── ds-ga-1008-a1-master ```tutorial starter code```
└── src ```source code location```
    ├── results_weightDecay=0 ```subdirectories for results```
    ├── results_weightDecay=0.1
    └── results_weightDecay=1

Usage

  • python src/train.py --param1 val1 val2 val3 --param2 val1 val2 val3 val4 --param3 ...., train models for different cmd args
  • python src/predict.py, generate predictions using model.net files in each result subdirectory

Note

  • Please add dat to .gitignore and store large data files in dat directory

deeplearning's People

Contributors

emiaozang avatar charlesdguthrie avatar

Watchers

James Cloos avatar  avatar

deeplearning's Issues

training model failed when setting poolSize and filtSize to non-default values

I was trying different poolSize and filtSize values, somehow I got this error when poolSize and filtSize not equal to default values:

e.g. when filtSize=5, poolSize=10, I got the following error message:

filtSize=5
poolSize=10
==> construct model
==> here is the model:
nn.Sequential {
input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> (9) -> (10) -> (11) -> (12) -> output: nn.SpatialConvolutionMM(1 -> 64, 5x5)
(2): nn.Tanh
(3): nn.Sequential {
input -> (1) -> (2) -> (3) -> (4) -> output: nn.Square
(2): nn.SpatialAveragePooling(10,10,10,10)
(3): nn.MulConstant
(4): nn.Sqrt
}
(4): nn.SpatialSubtractiveNormalization
(5): nn.SpatialConvolutionMM(64 -> 64, 5x5)
(6): nn.Tanh
(7): nn.Sequential {
input -> (1) -> (2) -> (3) -> (4) -> output: nn.Square
(2): nn.SpatialAveragePooling(10,10,10,10)
(3): nn.MulConstant
(4): nn.Sqrt
}
(8): nn.SpatialSubtractiveNormalization
(9): nn.Reshape(1600)
(10): nn.Linear(1600 -> 128)
(11): nn.Tanh
(12): nn.Linear(128 -> 10)
}
==> define loss
==> here is the loss function:
nn.ClassNLLCriterion
==> defining some tools
==> configuring optimizer
==> defining training procedure
==> defining test procedure
==> training!
==> doing epoch on training data:
==> online epoch # 1 [batchSize = 1]
/Users/luchristopher/torch/install/bin/luajit: ...hristopher/torch/install/share/lua/5.1/nn/Sequential.lua:44: Given input size: (64x2x2). Calculated output size: (64x-2x-2). Output size is too small at /Users/luchristopher/torch/extra/nn/generic/SpatialConvolutionMM.c:78
stack traceback:
[C]: in function 'updateOutput'
...hristopher/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
4_train.lua:160: in function 'opfunc'
.../luchristopher/torch/install/share/lua/5.1/optim/sgd.lua:44: in function 'optimMethod'
4_train.lua:184: in function 'train'
doall.lua:80: in main chunk
[C]: in function 'dofile'
...pher/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk

[C]: at 0x0108fe7bb0

It seems that the training process only works when poolSize and filtSize are set to default values, we might need to debug this part tomorrow.

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.