TensorFlow is an open-source machine learning framework. The `tensorflow-cpu-aws` package is a distribution of TensorFlow specifically optimized for CPU (ARM64/Aarch64) architectures, built and maintained by AWS. It is typically installed automatically as a dependency when the generic `tensorflow` package is installed on an ARM-based system. The current version is 2.15.1, and its release cadence generally aligns with the main TensorFlow releases.
pip install tensorflow-cpu-awsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import TensorFlow, verify its version and device availability (which should show only CPU devices for this package), and perform a basic tensor operation. It also includes a simple Keras model definition and a forward pass, illustrating typical usage for a CPU-only environment.
Check PyPI for the exact `tensorflow-cpu-aws` version available. If there's a mismatch, you might need to pin the `tensorflow` version to one compatible with the latest `tensorflow-cpu-aws` release or wait for an updated `tensorflow-cpu-aws` package.
If on an x86_64 machine, install `tensorflow` or `tensorflow-cpu` (often resolved to `tensorflow-intel` on Windows/Intel Linux) instead. On ARM64/Aarch64, `pip install tensorflow` will typically pull in `tensorflow-cpu-aws` automatically.
Upgrade to an EC2 instance type with more memory and CPU (e.g., `c5` or `m5` families for CPU-intensive tasks). Ensure sufficient disk space as well. When installing, `pip install tensorflow-cpu --no-cache-dir` might help if cache-related disk space is an issue.
Explicitly configure TensorFlow's inter-op and intra-op parallelism threads using `tf.config.threading.set_inter_op_parallelism_threads()` and `tf.config.threading.set_intra_op_parallelism_threads()` to match your instance's core count.