Introduction
Prepare a PyTorch Development Environment
Create a PyTorch model for MNIST
About PyTorch Model Training
Perform Training and Save the Model
Deploy the Model for Inference
Learn about Inference on Android
Create an Android Application
Prepare the Test Data
Run the Application
Optimizing Neural Network Models in PyTorch
Create an optimized PyTorch model for MNIST
Run optimization
Update the Android application
Next Steps
You are now ready to run the Android application. The screenshots below show an emulator, but you can also use a physical device.
To run the app in Android Studio using an emulator, follow these steps:
Once the application starts, click the Load Image button. It loads a randomly-selected image. Then, click Run Inference to recognize the digit. The application displays the predicted label and the inference time as shown below:
In the next step of this Learning Path, you will learn how to further optimize the model.