Skip to content

Commit 3cfe3be

Browse files
Refactor TensorFlow GCP learning path documentation for clarity; update section titles and improve descriptions across multiple files.
1 parent e93d8d6 commit 3cfe3be

4 files changed

Lines changed: 20 additions & 22 deletions

File tree

content/learning-paths/servers-and-cloud-computing/tensorflow-gcp/background.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Getting started with TensorFlow on Google Axion C4A (Arm Neoverse-V2)
2+
title: Get started with TensorFlow on Google Axion C4A
33

44
weight: 2
55

@@ -22,8 +22,6 @@ With support for neural networks, natural language processing (NLP), and compute
2222

2323
To learn more, visit the [official TensorFlow website](https://www.tensorflow.org/).
2424

25-
## Recap and next steps
25+
## Next steps
2626

27-
You’ve learned about Google Axion C4A Arm-based VMs and the fundamentals of TensorFlow. These technologies provide a powerful, cost-effective foundation for running machine learning workloads in the cloud.
28-
29-
You’re ready to provision your own Arm-based VM and start building and benchmarking TensorFlow models on Google Cloud. Great job—let’s get started!
27+
Now that you understand Google Axion C4A Arm-based VMs and TensorFlow fundamentals, you can provision your own VM and start benchmarking machine learning workloads on Google Cloud.

content/learning-paths/servers-and-cloud-computing/tensorflow-gcp/baseline.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Test TensorFlow baseline performance on Google Axion C4A Arm virtual machines
2+
title: Test TensorFlow baseline performance on Google Axion C4A
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
@@ -10,7 +10,7 @@ layout: learningpathall
1010

1111
This section helps you confirm that TensorFlow is installed and working correctly on your Google Axion C4A Arm virtual machine (VM). You'll run tests to check that your CPU can perform TensorFlow operations and basic neural network training.
1212

13-
### Check available devices
13+
## Check available devices
1414

1515
List the hardware devices TensorFlow can use, such as CPU or GPU. On most VMs, only the CPU is available:
1616

@@ -24,7 +24,7 @@ The output is similar to:
2424
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')]
2525
```
2626

27-
### Run a computation test
27+
## Run a computation test
2828

2929
Multiply two large matrices to verify TensorFlow computations on your CPU and measure execution time:
3030

@@ -43,9 +43,9 @@ Computation time: 0.008263111114501953 seconds
4343

4444
This provides a baseline measurement for CPU performance.
4545

46-
### Test neural network execution
46+
## Test neural network execution
4747

48-
Create a new file named `test_nn.py` to test a simple neural network:
48+
Create a file named `test_nn.py` with the following code:
4949

5050
```python
5151
import keras
@@ -71,7 +71,7 @@ model.fit(x, y, epochs=1, batch_size=32)
7171

7272
This script creates and trains a basic neural network using random data to verify that TensorFlow's deep learning functions work on the Arm platform.
7373

74-
### Run the neural network test
74+
## Run the neural network test
7575

7676
Execute the script:
7777

@@ -85,4 +85,4 @@ TensorFlow displays training progress similar to:
8585
32/32 ━━━━━━━━━━━━━━━━━━━━ 0s 1ms/step - loss: 0.1024
8686
```
8787

88-
You have now verified that TensorFlow is working on your Arm-based VM and can perform both basic computations and neural network training. Great job—your environment is ready for benchmarking!
88+
TensorFlow is working correctly on your Arm-based VM for both basic computations and neural network training. Your environment is ready for benchmarking.

content/learning-paths/servers-and-cloud-computing/tensorflow-gcp/benchmarking.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ layout: learningpathall
88

99
## Benchmark TensorFlow models
1010

11-
This section benchmarks multiple TensorFlow modelsResNet50, MobileNetV2, and InceptionV3using dummy input data. You'll measure average inference time and throughput for each model running on the CPU of your Arm-based Google Cloud Platform (GCP) VM.
11+
This section benchmarks multiple TensorFlow models - ResNet50, MobileNetV2, and InceptionV3 - using dummy input data. You'll measure average inference time and throughput for each model running on the CPU of your Arm-based Google Cloud Platform (GCP) VM.
1212

1313
TensorFlow Keras (`tf.keras`) is TensorFlow's high-level API for building, training, and benchmarking deep learning models. It provides access to predefined architectures such as ResNet, MobileNet, and Inception, making it easy to evaluate model performance on different hardware setups.
1414

15-
### Activate your virtual environment
15+
## Activate your virtual environment
1616

1717
Enable your isolated Python environment where TensorFlow is installed:
1818

@@ -23,7 +23,7 @@ python -c "import tensorflow as tf; print(tf.__version__)"
2323

2424
This ensures that all TensorFlow-related packages run in a clean, controlled setup without affecting system-wide Python installations.
2525

26-
### Install required packages
26+
## Install required packages
2727

2828
Install TensorFlow and NumPy for model creation and benchmarking:
2929

@@ -33,7 +33,7 @@ pip install tensorflow==2.20.0 numpy
3333

3434
These packages are likely already installed from previous steps. NumPy supports efficient numerical operations, while TensorFlow handles deep learning workloads.
3535

36-
### Create the benchmark script
36+
## Create the benchmark script
3737

3838
Use an editor to create a Python script named `tf_cpu_benchmark.py` that will run TensorFlow model benchmarking tests.
3939

@@ -74,7 +74,7 @@ for name, constructor in models.items():
7474

7575
This script creates model instances without pretrained weights for fair CPU testing, generates random image data for inference, includes a warm-up phase to stabilize model performance, and measures inference time over 50 runs to calculate average performance and throughput.
7676

77-
### Run the benchmark
77+
## Run the benchmark
7878

7979
Execute the benchmarking script:
8080

@@ -98,11 +98,11 @@ InceptionV3 average inference time per batch: 0.8971 seconds
9898
InceptionV3 throughput: 35.67 images/sec
9999
```
100100

101-
### Understand the results
101+
## Interpret the results
102102

103103
The benchmark provides key performance metrics. Average inference time per batch measures how long it takes to process one batch of input data, with lower values indicating faster performance. Throughput shows how many images the model can process per second, with higher values indicating better efficiency.
104104

105-
### Performance summary
105+
## Performance summary
106106

107107
The following table shows results from running the benchmark on a `c4a-standard-4` (4 vCPU, 16 GB memory) aarch64 VM in Google Cloud Platform (GCP) using SUSE Linux Enterprise Server (SLES):
108108

@@ -112,6 +112,6 @@ The following table shows results from running the benchmark on a `c4a-standard-
112112
| MobileNetV2 | 0.2909 | 110.02 |
113113
| InceptionV3 | 0.8971 | 35.67 |
114114

115-
The results demonstrate strong performance for lightweight convolutional neural networks (CNNs) like MobileNetV2, achieving over 110 images/sec on the aarch64 platform. Medium-depth models like InceptionV3 maintain balanced performance between accuracy and latency. Heavier architectures such as ResNet50 show longer inference times but deliver stable throughput, confirming that TensorFlow workloads run efficiently on Arm processors and provide a cost-effective alternative for AI inference tasks.
115+
The results show strong performance for lightweight CNNs like MobileNetV2, achieving over 110 images/sec on the aarch64 platform. Medium-depth models like InceptionV3 maintain balanced performance between accuracy and latency. Heavier architectures such as ResNet50 show longer inference times but deliver stable throughput.
116116

117-
You have successfully benchmarked TensorFlow models on your Arm-based VM. This demonstrates the efficiency and scalability of Arm platforms for deep learning workloadsgreat job!
117+
You have successfully benchmarked TensorFlow models on your Arm-based VM. This demonstrates the efficiency and scalability of Arm platforms for deep learning workloads - great job!

content/learning-paths/servers-and-cloud-computing/tensorflow-gcp/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ python3.11 -m venv tf-venv
4646
source tf-venv/bin/activate
4747
```
4848

49-
This creates and activates a virtual environment named `tf-venv` to prevent package conflicts.
49+
Your virtual environment `tf-venv` is now active and isolated from system packages.
5050

5151
## Upgrade pip
5252

0 commit comments

Comments
 (0)