You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To evaluate the performance of SME2 acceleration per operator, the following script is provided as an example. It uses the Keras to create a simple model containing only a single fully connected operator and convert it into the LiteRT model.
48
+
### Create LiteRT models using Keras
49
+
To demonstrate SME2 acceleration on Android, you will construct simple single-layer models (e.g., Fully Connected) using Keras and convert them into LiteRT (.tflite) format.
50
+
This allows you to benchmark isolated operators and directly observe SME2 improvements.
51
+
The following script is provided as an example:
50
52
51
53
```python
52
54
import tensorflow as tf
@@ -78,6 +80,8 @@ The model above is created in FP32 format. As mentioned in the previous section,
78
80
79
81
You can also optimize this Keras model using post-training quantization to create a LiteRT model that suits your requirements.
80
82
83
+
## Post-Training Quantization Options
84
+
81
85
* Post-training FP16 quantization
82
86
```python
83
87
# Convert to model with FP16 weights and FP32 activations
0 commit comments