Commit 461e3e3
Converter API change to enable optimization with sparsity.
To enable optimization with sparsity, use:
converter.optimizations = [tf.lite.Optimize.SPARSITY]
converter.convert()
Note:
1) This feature is experimental
2) It requires the use of during training pruning to be effective.
3) Not all kernels have been optimized for sparse execution, so the initial benefit will primarily be in the model size on disk.
PiperOrigin-RevId: 3512455761 parent 80ccd9a commit 461e3e3
File tree
1 file changed
+3
-4
lines changed- tensorflow_model_optimization/python/examples/sparsity/keras/mnist
1 file changed
+3
-4
lines changedLines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
| |||
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
155 | | - | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
0 commit comments