Commit b4cb576
Quantizable resnet and mobilenet models (pytorch#1471)
* add quantized models
* Modify mobilenet.py documentation and clean up comments
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Move fuse_model method to QuantizableInvertedResidual and clean up args documentation
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Restore relu settings to default in resnet.py
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix missing return in forward
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix missing return in forwards
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Change pretrained -> pretrained_float_models
Replace InvertedResidual with block
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Update tests to follow similar structure to test_models.py, allowing for modular testing
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Replace forward method with simple function assignment
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix error in arguments for resnet18
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* pretrained_float_model argument missing for mobilenet
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* reference script for quantization aware training and post training quantization
* reference script for quantization aware training and post training quantization
* set pretrained_float_model as False and explicitly provide float model
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Address review comments:
1. Replace forward with _forward
2. Use pretrained models in reference train/eval script
3. Modify test to skip if fbgemm is not supported
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix lint errors.
Use _forward for common code between float and quantized models
Clean up linting for reference train scripts
Test over all quantizable models
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Update default values for args in quantization/train.py
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Update models to conform to new API with quantize argument
Remove apex in training script, add post training quant as an option
Add support for separate calibration data set.
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix minor errors in train_quantization.py
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Remove duplicate file
* Bugfix
* Minor improvements on the models
* Expose print_freq to evaluate
* Minor improvements on train_quantization.py
* Ensure that quantized models are created and run on the specified backends
Fix errors in test only mode
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Add model urls
* Fix errors in quantized model tests.
Speedup creation of random quantized model by removing histogram observers
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Move setting qengine prior to convert.
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix lint error
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Add readme.md
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Readme.md
Summary:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
* Fix lint1 parent e79cadd commit b4cb576
File tree
11 files changed
+738
-31
lines changed- references/classification
- test
- torchvision/models
- quantization
11 files changed
+738
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 84 | + | |
102 | 85 | | |
103 | 86 | | |
104 | | - | |
105 | | - | |
106 | 87 | | |
107 | 88 | | |
108 | 89 | | |
109 | 90 | | |
110 | 91 | | |
111 | 92 | | |
112 | | - | |
| 93 | + | |
113 | 94 | | |
114 | 95 | | |
115 | 96 | | |
| |||
122 | 103 | | |
123 | 104 | | |
124 | 105 | | |
125 | | - | |
| 106 | + | |
126 | 107 | | |
127 | 108 | | |
128 | 109 | | |
129 | 110 | | |
130 | 111 | | |
131 | 112 | | |
132 | 113 | | |
133 | | - | |
| 114 | + | |
134 | 115 | | |
135 | 116 | | |
136 | 117 | | |
| |||
143 | 124 | | |
144 | 125 | | |
145 | 126 | | |
146 | | - | |
| 127 | + | |
147 | 128 | | |
148 | 129 | | |
149 | 130 | | |
150 | 131 | | |
151 | 132 | | |
152 | | - | |
| 133 | + | |
153 | 134 | | |
154 | 135 | | |
155 | 136 | | |
156 | 137 | | |
157 | 138 | | |
158 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| |||
0 commit comments