All Projects → nagadomi → Kaggle Cifar10 Torch7

nagadomi / Kaggle Cifar10 Torch7

Licence: mit
Code for Kaggle-CIFAR10 competition. 5th place.

Programming Languages

lua
6591 projects

Labels

Projects that are alternatives of or similar to Kaggle Cifar10 Torch7

Outbrain Click Prediction Kaggle
Solution to the Outbrain Click Prediction competition
Stars: ✭ 140 (-42.62%)
Mutual labels:  kaggle
Kaggle Competition Favorita
5th place solution for Kaggle competition Favorita Grocery Sales Forecasting
Stars: ✭ 169 (-30.74%)
Mutual labels:  kaggle
Lightautoml
LAMA - automatic model creation framework
Stars: ✭ 196 (-19.67%)
Mutual labels:  kaggle
Pins
Pin, Discover and Share Resources
Stars: ✭ 149 (-38.93%)
Mutual labels:  kaggle
Open Solution Data Science Bowl 2018
Open solution to the Data Science Bowl 2018
Stars: ✭ 159 (-34.84%)
Mutual labels:  kaggle
Chefboost
A Lightweight Decision Tree Framework supporting regular algorithms: ID3, C4,5, CART, CHAID and Regression Trees; some advanced techniques: Gradient Boosting (GBDT, GBRT, GBM), Random Forest and Adaboost w/categorical features support for Python
Stars: ✭ 176 (-27.87%)
Mutual labels:  kaggle
Kaggle Crowdflower
1st Place Solution for CrowdFlower Product Search Results Relevance Competition on Kaggle.
Stars: ✭ 1,708 (+600%)
Mutual labels:  kaggle
Kaggle Hpa
Code for 3rd place solution in Kaggle Human Protein Atlas Image Classification Challenge.
Stars: ✭ 226 (-7.38%)
Mutual labels:  kaggle
Competition Baseline
数据科学竞赛知识、代码、思路
Stars: ✭ 2,553 (+946.31%)
Mutual labels:  kaggle
Deep Time Series Prediction
Seq2Seq, Bert, Transformer, WaveNet for time series prediction.
Stars: ✭ 183 (-25%)
Mutual labels:  kaggle
Open Solution Toxic Comments
Open solution to the Toxic Comment Classification Challenge
Stars: ✭ 154 (-36.89%)
Mutual labels:  kaggle
Machine Learning Workflow With Python
This is a comprehensive ML techniques with python: Define the Problem- Specify Inputs & Outputs- Data Collection- Exploratory data analysis -Data Preprocessing- Model Design- Training- Evaluation
Stars: ✭ 157 (-35.66%)
Mutual labels:  kaggle
Deeptoxic
top 1% solution to toxic comment classification challenge on Kaggle.
Stars: ✭ 180 (-26.23%)
Mutual labels:  kaggle
Data Analysis
主要是爬虫与数据分析项目总结,外加建模与机器学习,模型的评估。
Stars: ✭ 142 (-41.8%)
Mutual labels:  kaggle
Machine Learning
从零基础开始机器学习之旅
Stars: ✭ 209 (-14.34%)
Mutual labels:  kaggle
Benchmarks
Comparison tools
Stars: ✭ 139 (-43.03%)
Mutual labels:  kaggle
Lightgbm
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
Stars: ✭ 13,293 (+5347.95%)
Mutual labels:  kaggle
Kaggle airbus ship detection
Kaggle airbus ship detection challenge 21st solution
Stars: ✭ 238 (-2.46%)
Mutual labels:  kaggle
Nyaggle
Code for Kaggle and Offline Competitions
Stars: ✭ 209 (-14.34%)
Mutual labels:  kaggle
Girls In Ai
免费学代码系列:小白python入门、数据分析data analyst、机器学习machine learning、深度学习deep learning、kaggle实战
Stars: ✭ 2,309 (+846.31%)
Mutual labels:  kaggle

Kaggle CIFAR-10

Code for CIFAR-10 competition. http://www.kaggle.com/c/cifar-10

Summary

Description
Model Very Deep Convolutional Networks with 3x3 kernel [1]
Data Augmentation cropping, horizontal reflection [2] and scaling. see lib/data_augmentation.lua
Preprocessing Global Contrast Normalization (GCN) and ZCA whitening. see lib/preprocessing.lua
Training Time 20 hours on GTX760.
Prediction Time 2.5 hours on GTX760.
Result 0.93320 (single model). 0.94150 (average 6 models)

Neural Network Configurations

Layer type Parameters
input size: 24x24, channel: 3
convolution kernel: 3x3, channel: 64, padding: 1
relu
convolution kernel: 3x3, channel: 64, padding: 1
relu
max pooling kernel: 2x2, stride: 2
dropout rate: 0.25
convolution kernel: 3x3, channel: 128, padding: 1
relu
convolution kernel: 3x3, channel: 128, padding: 1
relu
max pooling kernel: 2x2, stride: 2
dropout rate: 0.25
convolution kernel: 3x3, channel: 256, padding: 1
relu
convolution kernel: 3x3, channel: 256, padding: 1
relu
convolution kernel: 3x3, channel: 256, padding: 1
relu
convolution kernel: 3x3, channel: 256, padding: 1
relu
max pooling kernel: 2x2, stride: 2
dropout rate: 0.25
linear channel: 1024
relu
dropout rate: 0.5
linear channel: 1024
relu
dropout rate: 0.5
linear channel: 10
softmax

Developer Environment

  • Ubuntu 14.04
  • 15GB RAM (This codebase can run on g2.2xlarge!)
  • CUDA (GTX760 or more higher GPU)
  • Torch7 latest
  • cuda-convnet2.torch

Installation

(This document is outdated. See: Getting started with Torch)

Install CUDA (on Ubuntu 14.04):

apt-get install nvidia-331
apt-get install nvidia-cuda-toolkit

Install Torch7 (see Torch (easy) install):

curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash

Install(or upgrade) dependency packages:

luarocks install torch
luarocks install nn
luarocks install cutorch
luarocks install cunn
luarocks install https://raw.githubusercontent.com/soumith/cuda-convnet2.torch/master/ccn2-scm-1.rockspec

Checking CUDA environment

th cuda_test.lua

Please check your Torch7/CUDA environment when this code fails.

Convert dataset

Place the data files into a subfolder ./data.

ls ./data
test  train  trainLabels.csv
  • th convert_data.lua

Local testing

th validate.lua

dataset:

train test
1-40000 40001-50000

Generating the submission.txt

th train.lua
th predict.lua

MISC

Model Averaging

Training with different seed parameter for each nodes.

(same model, same data, different initial weights, different training order)

th train.lua -seed 11
th train.lua -seed 12
...
th train.lua -seed 16

Mount the models directory for each nodes. for example, ec2/node1, ec2/node2, .., ec2/node6.

Edit the path of model file in predict_averaging.lua.

Run the prediction command.

th predict_averaging.lua

Network In Network

./nin_model.lua is an implementation of Network In Network [3]. This model gives score of 0.92400.

My NIN implementation is 2-layer NIN. Its differ from mavenlin's implementation. I tried to implement the mavenlin's 3-layer NIN. However, I did not get good result.

My implementation of 3-layer NIN is here.

Bug

global_contrast_normalization in ./lib/preprocessing.lua is incorrect implementation (This function is just z-score). but I was using this implementation in the competition.

Figure

data augmentation + preprocessing

data-augmentation-preprocessing

References

  • [1] Karen Simonyan, Andrew Zisserman, "Very Deep Convolutional Networks for Large-Scale Image Recognition", link
  • [2] Alex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton, "ImageNet Classification with Deep Convolutional Neural Networks", link
  • [3] Min Lin, Qiang Chen, Shuicheng Yan, "Network In Network", link
  • [4] R. Collobert, K. Kavukcuoglu, C. Farabet, "Torch7: A Matlab-like Environment for Machine Learning"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].