TF Keras Applications EfficientNetB0¶
Overview¶
In this tutorial, we demonstrate how to compile and run inference with the TF Keras Applications EfficientNetB0 model
for image classification using the RBLN Python API
.
Setup & Installation¶
Before you begin, ensure that your system environment is properly configured and that all required packages are installed. This includes:
- System Requirements:
- Python: 3.9–3.12
- RBLN Driver
- Packages Requirements:
- Installation Command:
Note
RBLN SDK is distributed as a .whl
package. Please note that the RBLN compiler and runtime
require an RBLN Portal account.
Using RBLN Python API
¶
Model Compilation¶
Import EfficientNetB0 from the TF Keras Applications module, instantiate the model with pre-trained weights, and convert it into a tf.function.
Model Inference¶
Download and preprocess the input image required for EfficientNetB0.
Use preprocess_input()
for proper preprocessing.
Load the compiled model using RBLN Runtime and run inference on the preprocessed input.
Decode the output predictions using decode_predictions()
and display the top prediction.
The results will look like this:
Summary and References¶
This tutorial demonstrated how to compile and run inference with the TF Keras Applications EfficientNetB0 model using
the RBLN Python API
. The compiled model can be efficiently used for inference on an RBLN NPU for image classification.