Commit 4733ce1c authored by Yuxin Wu's avatar Yuxin Wu

note on resnet

parent fcdeafbf
## ResNet ImageNet training code coming soon.
## cifar10-resnet.py
Reproduce the results in paper "Deep Residual Learning for Image Recognition", [http://arxiv.org/abs/1512.03385](http://arxiv.org/abs/1512.03385) Reproduce the results in paper "Deep Residual Learning for Image Recognition", [http://arxiv.org/abs/1512.03385](http://arxiv.org/abs/1512.03385)
with the variants proposed in "Identity Mappings in Deep Residual Networks", [https://arxiv.org/abs/1603.05027](https://arxiv.org/abs/1603.05027). with the variants proposed in "Identity Mappings in Deep Residual Networks", [https://arxiv.org/abs/1603.05027](https://arxiv.org/abs/1603.05027) on CIFAR10.
The train error shown here is a moving average of the error rate of each batch in training. The train error shown here is a moving average of the error rate of each batch in training.
The validation error here is computed on test set. The validation error here is computed on test set.
...@@ -13,3 +15,14 @@ Download model: ...@@ -13,3 +15,14 @@ Download model:
[Cifar10 ResNet-110 (n=18)](https://drive.google.com/open?id=0B9IPQTvr2BBkTXBlZmh1cmlnQ0k) [Cifar10 ResNet-110 (n=18)](https://drive.google.com/open?id=0B9IPQTvr2BBkTXBlZmh1cmlnQ0k)
Also see an implementation of [DenseNet](https://github.com/YixuanLi/densenet-tensorflow) from [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993). Also see an implementation of [DenseNet](https://github.com/YixuanLi/densenet-tensorflow) from [Densely Connected Convolutional Networks](https://arxiv.org/abs/1608.06993).
## load-resnet.py
A script to convert and run ResNet{50,101,152} ImageNet models released by Kaiming.
Example usage:
```bash
python -m tensorpack.utils.loadcaffe PATH/TO/{ResNet-101-deploy.prototxt,ResNet-101-model.caffemodel} ResNet101.npy
./load-resnet.py --load ResNet-101.npy --input cat.png --depth 101
```
...@@ -22,7 +22,7 @@ from tensorpack.dataflow.dataset import ILSVRCMeta ...@@ -22,7 +22,7 @@ from tensorpack.dataflow.dataset import ILSVRCMeta
""" """
Usage: Usage:
python -m tensorpack.utils.loadcaffe PATH/TO/CAFFE/{ResNet-101-deploy.prototxt,ResNet-101-model.caffemodel} ResNet101.npy python -m tensorpack.utils.loadcaffe PATH/TO/{ResNet-101-deploy.prototxt,ResNet-101-model.caffemodel} ResNet101.npy
./load-resnet.py --load ResNet-101.npy --input cat.png --depth 101 ./load-resnet.py --load ResNet-101.npy --input cat.png --depth 101
""" """
MODEL_DEPTH = None MODEL_DEPTH = None
......
...@@ -23,8 +23,7 @@ class TrainConfig(object): ...@@ -23,8 +23,7 @@ class TrainConfig(object):
:param optimizer: a `tf.train.Optimizer` instance defining the optimizer for trainig. :param optimizer: a `tf.train.Optimizer` instance defining the optimizer for trainig.
:param callbacks: a `callback.Callbacks` instance. Define :param callbacks: a `callback.Callbacks` instance. Define
the callbacks to perform during training. the callbacks to perform during training.
:param session_config: a `tf.ConfigProto` instance to instantiate the :param session_config: a `tf.ConfigProto` instance to instantiate the session.
session. default to a session running 1 GPU.
:param session_init: a `sessinit.SessionInit` instance to :param session_init: a `sessinit.SessionInit` instance to
initialize variables of a session. default to a new session. initialize variables of a session. default to a new session.
:param model: a `ModelDesc` instance. :param model: a `ModelDesc` instance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment