Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
7d1cd1de
Unverified
Commit
7d1cd1de
authored
Mar 10, 2020
by
Kentaro Yoshioka
Committed by
GitHub
Mar 10, 2020
Browse files
document int8 quantization model (#1951)
usage and performance are from the vision0.5 release notes.
parent
ae4012e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
references/classification/README.md
references/classification/README.md
+21
-0
No files found.
references/classification/README.md
View file @
7d1cd1de
...
...
@@ -40,6 +40,27 @@ python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py\
```
## Quantized
### INT8 models
We add INT8 quantized models to follow the quantization support added in PyTorch 1.3.
Obtaining a pre-trained quantized model can be obtained with a few lines of code:
```
model
=
torchvision
.
models
.
quantization
.
mobilenet_v2
(
pretrained
=
True
,
quantize
=
True
)
model
.
eval
()
#
run
the
model
with
quantized
inputs
and
weights
out
=
model
(
torch
.
rand
(
1
,
3
,
224
,
224
))
```
We provide pre-trained quantized weights for the following models:
| Model | Acc@1 | Acc@5 |
|:-----------------:|:------:|:------:|
| MobileNet V2 | 71.658 | 90.150 |
| ShuffleNet V2: | 68.360 | 87.582 |
| ResNet 18 | 69.494 | 88.882 |
| ResNet 50 | 75.920 | 92.814 |
| ResNext 101 32x8d | 78.986 | 94.480 |
| Inception V3 | 77.084 | 93.398 |
| GoogleNet | 69.826 | 89.404 |
### Parameters used for generating quantized models:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment