fb.resnet.torch

Torch implementation of ResNet from http://arxiv.org/abs/1512.03385 and training scripts

  • 所有者: facebookarchive/fb.resnet.torch
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Archived

This project is no longer maintained. Consider using ImageNet training in PyTorch instead.

ResNet training in Torch

This implements training of residual networks from Deep Residual Learning for Image Recognition by Kaiming He, et. al.

We wrote a more verbose blog post discussing this code, and ResNets in general here.

Requirements

See the installation instructions for a step-by-step guide.

If you already have Torch installed, update nn, cunn, and cudnn.

Training

See the training recipes for addition examples.

The training scripts come with several options, which can be listed with the --help flag.

th main.lua --help

To run the training, simply run main.lua. By default, the script runs ResNet-34 on ImageNet with 1 GPU and 2 data-loader threads.

th main.lua -data [imagenet-folder with train and val folders]

To train ResNet-50 on 4 GPUs:

th main.lua -depth 50 -batchSize 256 -nGPU 4 -nThreads 8 -shareGradInput true -data [imagenet-folder]

Trained models

Trained ResNet 18, 34, 50, 101, 152, and 200 models are available for download. We include instructions for using a custom dataset, classifying an image and getting the model's top5 predictions, and for extracting image features using a pre-trained model.

The trained models achieve better error rates than the original ResNet models.

Single-crop (224x224) validation error rate, Network, Top-1 error, Top-5 error, -------------, -----------, -----------, ResNet-18, 30.43, 10.76, ResNet-34, 26.73, 8.74, ResNet-50, 24.01, 7.02, ResNet-101, 22.44, 6.21, ResNet-152, 22.16, 6.16, ResNet-200, 21.66, 5.79, ## Notes

This implementation differs from the ResNet paper in a few ways:

Scale augmentation: We use the scale and aspect ratio augmentation from Going Deeper with Convolutions, instead of scale augmentation used in the ResNet paper. We find this gives a better validation error.

Color augmentation: We use the photometric distortions from Andrew Howard in addition to the AlexNet-style color augmentation used in the ResNet paper.

Weight decay: We apply weight decay to all weights and biases instead of just the weights of the convolution layers.

Strided convolution: When using the bottleneck architecture, we use stride 2 in the 3x3 convolution, instead of the first 1x1 convolution.

主要指標

概覽
名稱與所有者facebookarchive/fb.resnet.torch
主編程語言Lua
編程語言Lua (語言數: 1)
平台
許可證Other
所有者活动
創建於2016-01-12 20:29:16
推送於2022-08-24 15:23:59
最后一次提交2019-10-29 13:21:00
發布數0
用户参与
星數2.3k
關注者數118
派生數665
提交數54
已啟用問題?
問題數167
打開的問題數55
拉請求數26
打開的拉請求數5
關閉的拉請求數9
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?