Replace dynamic-range int8 with weight-only int8 (fixes collapsed accuracy)

#3
by mlboydaisuke - opened
README.md CHANGED
@@ -28,12 +28,6 @@ model-index:
28
  - name: Top 5 Accuracy (Full Precision)
29
  type: accuracy
30
  value: 0.9419
31
- - name: Top 1 Accuracy (Dynamic Quantized wi8 afp32)
32
- type: accuracy
33
- value: 0.7805
34
- - name: Top 5 Accuracy (Dynamic Quantized wi8 afp32)
35
- type: accuracy
36
- value: 0.9392
37
  ---
38
  # EfficientNet B1
39
 
@@ -46,6 +40,15 @@ acc@1 (on ImageNet-1K): 79.838%
46
  acc@5 (on ImageNet-1K): 94.934%
47
  num_params: 7,794,184
48
 
 
 
 
 
 
 
 
 
 
49
  ## Intended uses & limitations
50
 
51
  The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
 
28
  - name: Top 5 Accuracy (Full Precision)
29
  type: accuracy
30
  value: 0.9419
 
 
 
 
 
 
31
  ---
32
  # EfficientNet B1
33
 
 
40
  acc@5 (on ImageNet-1K): 94.934%
41
  num_params: 7,794,184
42
 
43
+ ### Quantized variant
44
+
45
+ `efficientnet_b1_weight_only_wi8_afp32.tflite` is a weight-only int8
46
+ quantization of the same weights (about 3.5x smaller than float32). Weight-only
47
+ quantization is used instead of dynamic-range quantization because
48
+ EfficientNet's SE and SiLU layers are sensitive to activation quantization; in
49
+ a 10-image spot check the weight-only model matches the float model's top-1
50
+ prediction on 9 of 10 images (logit correlation 0.996).
51
+
52
  ## Intended uses & limitations
53
 
54
  The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
efficientnet_b1_dynamic_wi8_afp32.tflite → efficientnet_b1_weight_only_wi8_afp32.tflite RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e2b1af45691f3b18d119d0cf9ba2d278cd04a8fba6fe86908ae4145024fce06a
3
- size 8540672
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a4660a2ba9bae994267a7413fe737b57b738328b1e0b1fbab399d181e32327d
3
+ size 8876144