Commit f482a5aa authored by Yuxin Wu's avatar Yuxin Wu

resnet docs

parent 57fb68fa
...@@ -65,7 +65,9 @@ To Run Pretrained Model: ...@@ -65,7 +65,9 @@ To Run Pretrained Model:
BITW = 1 BITW = 1
BITA = 2 BITA = 2
BITG = 6 BITG = 6
BATCH_SIZE = 32 TOTAL_BATCH_SIZE = 128
NUM_GPU = 4
BATCH_SIZE = TOTAL_BATCH_SIZE // NUM_GPU
class Model(ModelDesc): class Model(ModelDesc):
def _get_input_vars(self): def _get_input_vars(self):
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
Reproduce DCGAN following the setup in [dcgan.torch](https://github.com/soumith/dcgan.torch). Reproduce DCGAN following the setup in [dcgan.torch](https://github.com/soumith/dcgan.torch).
Play with the [pretrained model](https://drive.google.com/drive/folders/0B9IPQTvr2BBkLUF2M0RXU1NYSkE?usp=sharing) on CelebA face dataset. Play with the [pretrained model](https://drive.google.com/drive/folders/0B9IPQTvr2BBkLUF2M0RXU1NYSkE?usp=sharing) on CelebA face dataset:
Generated samples: 1. Generated samples
![sample](demo/CelebA-samples.jpg) ![sample](demo/CelebA-samples.jpg)
Vector arithmetic: smiling woman - neutral woman + neutral man = smiling man 2. Vector arithmetic: smiling woman - neutral woman + neutral man = smiling man
![vec](demo/CelebA-vec.jpg) ![vec](demo/CelebA-vec.jpg)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Training code of pre-activation ResNet on ImageNet. It follows the setup in Training code of pre-activation ResNet on ImageNet. It follows the setup in
[fb.resnet.torch](https://github.com/facebook/fb.resnet.torch) and gets similar performance (with much fewer lines of code). [fb.resnet.torch](https://github.com/facebook/fb.resnet.torch) and gets similar performance (with much fewer lines of code).
More results to come. Models can be [downloaded here](https://drive.google.com/open?id=0B9IPQTvr2BBkTXBlZmh1cmlnQ0k).
| Model | Top 5 Error | Top 1 Error | | Model | Top 5 Error | Top 1 Error |
|:-------------------|-------------|------------:| |:-------------------|-------------|------------:|
...@@ -16,7 +16,7 @@ More results to come. ...@@ -16,7 +16,7 @@ More results to come.
## load-resnet.py ## load-resnet.py
A script to convert and run ResNet{50,101,152} caffe models trained on ImageNet [released by Kaiming](https://github.com/KaimingHe/deep-residual-networks). A script to convert and run ImageNet-ResNet{50,101,152} Caffe models [released by Kaiming](https://github.com/KaimingHe/deep-residual-networks).
Example usage: Example usage:
```bash ```bash
......
...@@ -134,7 +134,8 @@ class SaverRestore(SessionInit): ...@@ -134,7 +134,8 @@ class SaverRestore(SessionInit):
if len(chkpt_vars_used) < len(vars_available): if len(chkpt_vars_used) < len(vars_available):
unused = vars_available - chkpt_vars_used unused = vars_available - chkpt_vars_used
for name in unused: for name in unused:
logger.warn("Variable {} in checkpoint not found in the graph!".format(name)) if not is_training_name(name):
logger.warn("Variable {} in checkpoint not found in the graph!".format(name))
return var_dict return var_dict
class ParamRestore(SessionInit): class ParamRestore(SessionInit):
......
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