Skip to content

Commit

Permalink
Refine documentation format for ResNet-101 Accuracy Benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Sep 20, 2019
1 parent 1c0a887 commit 4004538
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
12 changes: 6 additions & 6 deletions docs/benchmarks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ ResNet-101 Accuracy Benchmark
-----------------------------

================ ===============
Experiment top-1 error (%)
Experiment Top-1 error (%)
================ ===============
dataparallel-256 22.02±0.11
dataparallel-1k 22.04±0.24
pipeline-256 21.99±0.13
pipeline-1k 22.24±0.19
pipeline-4k 22.13±0.09
dataparallel-256 22.02±0.11
dataparallel-1k 22.04±0.24
pipeline-256 21.99±0.13
pipeline-1k 22.24±0.19
pipeline-4k 22.13±0.09
================ ===============

The code is reproducible on Tesla P40 GPUs, and the experiment details
Expand Down
27 changes: 12 additions & 15 deletions examples/resnet101_accuracy_benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# ResNet-101 Accuracy Benchmark

This example reproduces accuracy benchmark on ResNet-101, as stated by
reported in Table 2(c) of the [Accurate, Large Minibatch SGD][] paper.
reported in Table 2(c) of the [Accurate, Large Minibatch SGD][paper] paper.

Every experiment setting is optimized for Tesla P40 GPUs.

## Result

Experiment | num gpus | kn | learning rate | top-1 error (%) | throughput (samples/sec) | speed up
----------------------- | --------:| ---:|-------------: | ---------------:|-------------------------:|---------:
reference-256 [paper][] | 8 | 256 | 0.1 | 22.08±0.06 | N/A | N/A
reference-8k [paper][] | 256 | 8k | 3.2 | 22.36±0.09 | N/A | N/A
dataparallel-256 | 2 | 256 | 0.1 | 22.02±0.11 | 180.344 | 1.000x
dataparallel-1k | 8 | 1k | 0.4 | 22.04±0.24 | 606.916 | 3.365x
dataparallel-4k | 8 | 4k | 1.6 | OOM | N/A | N/A
pipeline-256 | 2 | 256 | 0.1 | 21.99±0.13 | 117.432 | 0.651x
pipeline-1k | 8 | 1k | 0.4 | 22.24±0.19 | 294.739 | 1.634x
pipeline-4k | 8 | 4k | 1.6 | 22.13±0.09 | 378.746 | 2.100x


Experiment | GPUs | Batch size | Learning rate | Top-1 error (%) | Throughput | Speedup
------------------------- | ---: | ---------: | ------------: | --------------: |-------------------: | ------:
reference-256 ([paper][]) | 8 | 256 | 0.1 | 22.08±0.06 | N/A | N/A
reference-8k ([paper][]) | 256 | 8k | 3.2 | 22.36±0.09 | N/A | N/A
dataparallel-256 | 2 | 256 | 0.1 | 22.02±0.11 | 180.344 samples/sec | 1.000x
dataparallel-1k | 8 | 1k | 0.4 | 22.04±0.24 | 606.916 samples/sec | 3.365x
dataparallel-4k | 8 | 4k | 1.6 | Out of memory | N/A | N/A
pipeline-256 | 2 | 256 | 0.1 | 21.99±0.13 | 117.432 samples/sec | 0.651x
pipeline-1k | 8 | 1k | 0.4 | 22.24±0.19 | 294.739 samples/sec | 1.634x
pipeline-4k | 8 | 4k | 1.6 | 22.13±0.09 | 378.746 samples/sec | 2.100x

## Optimized Environment

Expand All @@ -38,6 +36,7 @@ $ pip install -r requirements.txt
```

Prepare ImageNet dataset at `./imagenet`:

```sh
$ python -c "import torchvision; torchvision.datasets.ImageNet('./imagenet', split='train', download=True)"
$ python -c "import torchvision; torchvision.datasets.ImageNet('./imagenet', split='val', download=True)"
Expand All @@ -54,6 +53,4 @@ $ python main.py gpipe-8 # gpipie 1k
$ python main.py gpipe-8-4k # gpipie 4k
```


[Accurate, Large Minibatch SGD]: https://arxiv.org/abs/1706.02677
[paper]: https://arxiv.org/abs/1706.02677

0 comments on commit 4004538

Please sign in to comment.