-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from ARM-software/ds_cnn_large_clustered
Added DS-CNN Large Clustered
- Loading branch information
Showing
11 changed files
with
214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# DS-CNN Clustered FP32 | ||
|
||
## Description | ||
This is a clustered (32 clusters, kmeans++ centroid initialization) and retrained (fine-tuned) FP32 version of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU. The original model was converted to Keras and optimized using the Clustering API in TensorFlow Model Optimization Toolkit. | ||
|
||
## License | ||
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) | ||
|
||
## Network Information | ||
| Network Information | Value | | ||
|---------------------|------------------| | ||
| Framework | TensorFlow Lite | | ||
| SHA-1 Hash | a6f4fa3e253125499a1e77aa1010c943e72af568 | | ||
| Size (Bytes) | 1649816 | | ||
| Provenance | The original model (before clustering and quantization) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU | | ||
| Paper | https://arxiv.org/abs/1711.07128 | | ||
|
||
## Accuracy | ||
Dataset: Google Speech Commands | ||
|
||
| Metric | Value | | ||
|--------|-------| | ||
| Top 1 Accuracy | 0.9506 | | ||
|
||
## Performance | ||
| Platform | Optimized | | ||
| -------- | ---------- | | ||
| CPU | :heavy_check_mark: | | ||
| GPU | :heavy_check_mark: | | ||
|
||
### Key | ||
- :heavy_check_mark: - Optimized for the platform. | ||
- :heavy_minus_sign: - Not optimized, but will run on the platform. | ||
- :heavy_multiplication_x: - Not optimized and will not run on the platform. | ||
|
||
## Optimizations | ||
| Optimization | Value | | ||
|-----------------|---------| | ||
| Number of Clusters | 32 | | ||
| Cluster Initialization | K-Means | | ||
|
||
## Network Inputs | ||
| Input Node Name | Shape | Description | | ||
|-----------------|---------|-------------| | ||
| input_4 | (1, 1, 49, 10) | The input is a processed MFCCs of shape (1,1,49,10) | | ||
|
||
## Network Outputs | ||
| Output Node Name | Shape | Description | | ||
|------------------|---------|-------------| | ||
| Identity | (1, 12) | The probability on 12 keywords. | |
46 changes: 46 additions & 0 deletions
46
models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/definition.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
benchmark: | ||
SpeechCommands: | ||
top_1_accuracy: 0.9506 | ||
description: 'This is a clustered (32 clusters, kmeans++ centroid initialization) and | ||
retrained (fine-tuned) FP32 version of the DS-CNN Large model developed by Arm from the Hello Edge paper. | ||
Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU. | ||
The original model was converted to Keras and optimized using the Clustering API in TensorFlow Model Optimization Toolkit.' | ||
license: | ||
- Apache-2.0 | ||
network: | ||
file_size_bytes: 1649816 | ||
filename: ds_cnn_clustered_fp32.tflite | ||
framework: TensorFlow Lite | ||
hash: | ||
algorithm: sha1 | ||
value: a6f4fa3e253125499a1e77aa1010c943e72af568 | ||
provenance: The original model (before clustering and quantization) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU | ||
network_parameters: | ||
input_nodes: | ||
- description: The input is a processed MFCCs of shape (1,1,49,10) | ||
example_input: | ||
path: models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_input/input_4 | ||
name: input_4 | ||
shape: | ||
- 1 | ||
- 1 | ||
- 49 | ||
- 10 | ||
type: float32 | ||
output_nodes: | ||
- description: The probability on 12 keywords. | ||
name: Identity | ||
shape: | ||
- 1 | ||
- 12 | ||
test_output_path: models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_output/Identity | ||
operators: | ||
TensorFlow Lite: | ||
- AVERAGE_POOL_2D | ||
- CONV_2D | ||
- DEPTHWISE_CONV_2D | ||
- FULLY_CONNECTED | ||
- RELU | ||
- RESHAPE | ||
- SOFTMAX | ||
paper: https://arxiv.org/abs/1711.07128 |
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/ds_cnn_clustered_fp32.tflite
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_input/input_4/0.npy
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_fp32/testing_output/Identity/0.npy
Git LFS file not shown
52 changes: 52 additions & 0 deletions
52
models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# DS-CNN Clustered INT8 | ||
|
||
## Description | ||
This is a clustered (32 clusters, kmeans++ centroid initialization), retrained (fine-tuned) and fully quantized version (INT8) of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation can be found here: https://github.com/ARM-software/ML-KWS-for-MCU. | ||
The original model was converted to Keras, optimized using the Clustering API in TensorFlow Model Optimization Toolkit, and quantized using post-training quantization in the TF Lite Converter. | ||
|
||
## License | ||
[Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) | ||
|
||
## Network Information | ||
| Network Information | Value | | ||
|---------------------|------------------| | ||
| Framework | TensorFlow Lite | | ||
| SHA-1 Hash | 367391990618e4e9a821a847dcbf3fe129212282 | | ||
| Size (Bytes) | 526192 | | ||
| Provenance | The original model (before clustering) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU | | ||
| Paper | https://arxiv.org/abs/1711.07128 | | ||
|
||
## Accuracy | ||
Dataset: Google Speech Commands | ||
|
||
| Metric | Value | | ||
|--------|-------| | ||
| Top 1 Accuracy | 0.94701 | | ||
|
||
## Performance | ||
| Platform | Optimized | | ||
| -------- | ---------- | | ||
| CPU | :heavy_check_mark: | | ||
| GPU | :heavy_check_mark: | | ||
|
||
### Key | ||
- :heavy_check_mark: - Optimized for the platform. | ||
- :heavy_minus_sign: - Not optimized, but will run on the platform. | ||
- :heavy_multiplication_x: - Not optimized and will not run on the platform. | ||
|
||
## Optimizations | ||
| Optimization | Value | | ||
|-----------------|---------| | ||
| Quantization | INT8 | | ||
| Number of Clusters | 32 | | ||
| Cluster Initialization | K-Means | | ||
|
||
## Network Inputs | ||
| Input Node Name | Shape | Description | | ||
|-----------------|---------|-------------| | ||
| input_2 | (1, 1, 49, 10) | The input is a processed MFCCs of shape (1,1,49,10) | | ||
|
||
## Network Outputs | ||
| Output Node Name | Shape | Description | | ||
|------------------|---------|-------------| | ||
| Identity | (1, 12) | The probability on 12 keywords. | |
46 changes: 46 additions & 0 deletions
46
models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/definition.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
benchmark: | ||
SpeechCommands: | ||
top_1_accuracy: 0.94701 | ||
description: 'This is a clustered (32 clusters, kmeans++ centroid initialization), retrained (fine-tuned) and fully quantized version (INT8) | ||
of the DS-CNN Large model developed by Arm from the Hello Edge paper. Code for the original DS-CNN implementation | ||
can be found here: https://github.com/ARM-software/ML-KWS-for-MCU. | ||
The original model was converted to Keras, optimized using the Clustering API in TensorFlow Model Optimization Toolkit, and quantized using post-training quantization in the TF Lite Converter.' | ||
license: | ||
- Apache-2.0 | ||
network: | ||
file_size_bytes: 526192 | ||
filename: ds_cnn_clustered_int8.tflite | ||
framework: TensorFlow Lite | ||
hash: | ||
algorithm: sha1 | ||
value: 367391990618e4e9a821a847dcbf3fe129212282 | ||
provenance: The original model (before clustering) is a pretrained checkpoint based on https://github.com/ARM-software/ML-KWS-for-MCU | ||
network_parameters: | ||
input_nodes: | ||
- description: The input is a processed MFCCs of shape (1,1,49,10) | ||
example_input: | ||
path: models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_input/input_2 | ||
name: input_2 | ||
shape: | ||
- 1 | ||
- 1 | ||
- 49 | ||
- 10 | ||
type: int8 | ||
output_nodes: | ||
- description: The probability on 12 keywords. | ||
name: Identity | ||
shape: | ||
- 1 | ||
- 12 | ||
test_output_path: models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_output/Identity | ||
operators: | ||
TensorFlow Lite: | ||
- AVERAGE_POOL_2D | ||
- CONV_2D | ||
- DEPTHWISE_CONV_2D | ||
- FULLY_CONNECTED | ||
- RELU | ||
- RESHAPE | ||
- SOFTMAX | ||
paper: https://arxiv.org/abs/1711.07128 |
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/ds_cnn_clustered_int8.tflite
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_input/input_2/0.npy
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
models/keyword_spotting/ds_cnn_large/tflite_clustered_int8/testing_output/Identity/0.npy
Git LFS file not shown