Use Keras Core with TensorFlow, PyTorch, and JAX backends
Introduction
Overview of Keras Core
Install the required dependencies
Run Keras Core
Next Steps
Use Keras Core with TensorFlow, PyTorch, and JAX backends
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
After selecting a backend, start the run and check the initial console output to confirm that the chosen backend is in use. If it’s not the expected backend, repeat backend selection before training.
Create and activate the virtual environment that you prepared during dependency setup. Within the activated environment, save the script as
ml.py in a working directory. To run the script, run python ml.py.The run prints training progress and evaluation metrics, then shows predictions from the trained model. Seeing metrics and prediction values confirms that the end-to-end workflow completed.
Confirm that
keras_core is installed in your active Python environment and that the environment is activated. On Ubuntu 22.04, also verify that python3-pip and python3-venv are installed if you use the system Python.Use a Python version supported by the required dependencies. To stay consistent with the Learning Path, use Python 3.10 or 3.11. If you want to use a newer version such as Python 3.12, check package support because TensorFlow and PyTorch might not provide packages for it.