Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

production publish #1489

Merged
merged 112 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
d589ae9
Editorial.
madeline-underwood Dec 18, 2024
7188249
Tweaked index file.
madeline-underwood Dec 18, 2024
462d3dd
Some tweaks
madeline-underwood Dec 18, 2024
5e971f9
Update usecase.md
madeline-underwood Dec 18, 2024
28748fe
Update _review.md
madeline-underwood Dec 18, 2024
19a7b41
Update usecase.md
madeline-underwood Dec 18, 2024
b640564
Update build-and-install.md
madeline-underwood Dec 18, 2024
7397ba9
Added missing definite article in the title.
madeline-underwood Dec 18, 2024
fde91dd
Update _next-steps.md
madeline-underwood Dec 18, 2024
b46c728
Update _review.md
madeline-underwood Dec 18, 2024
70b073f
Update build-and-install.md
madeline-underwood Dec 18, 2024
88b8060
Update usecase.md
madeline-underwood Dec 18, 2024
e132972
Improvements to Snort 3 LP
madeline-underwood Dec 19, 2024
acfdafe
Further improvements.
madeline-underwood Dec 19, 2024
fda1614
Fixing Next Steps
madeline-underwood Dec 19, 2024
58de3b3
Final fix of Next Steps.
madeline-underwood Dec 19, 2024
c7eb602
Correct download typo in code.
madeline-underwood Dec 19, 2024
92e1c35
automatic update of stats files
Dec 23, 2024
88f0719
Post-production clean-up.
madeline-underwood Dec 23, 2024
ab52d1e
Cleaned up reference to prerequisite reading that had a title change,…
madeline-underwood Dec 23, 2024
fa63ddc
Merge pull request #1460 from madeline-underwood/Skopeo
pareenaverma Dec 23, 2024
1364d04
Merge pull request #1475 from madeline-underwood/Veraison_enhancements
pareenaverma Dec 23, 2024
c624720
Merge pull request #1476 from madeline-underwood/CCA-Attestation-LP-i…
pareenaverma Dec 23, 2024
b08e676
Merge branch 'main' into snort3
pareenaverma Dec 23, 2024
b2a5fdf
Merge pull request #1464 from madeline-underwood/snort3
pareenaverma Dec 23, 2024
8147bfb
Selfie Android LP review
pareenaverma Dec 23, 2024
57808b1
Android Selfie App LP review
pareenaverma Dec 23, 2024
01327d0
Android Selfie LP review
pareenaverma Dec 23, 2024
6819c15
Android selfie App review
pareenaverma Dec 23, 2024
453cdda
Android selfie app review
pareenaverma Dec 23, 2024
3686393
Android selfie LP review
pareenaverma Dec 23, 2024
72039b8
Android selfie LP review
pareenaverma Dec 23, 2024
c7657f5
Merge pull request #1478 from pareenaverma/content_review
pareenaverma Dec 23, 2024
576e8d4
Starting editorial.
madeline-underwood Dec 24, 2024
793af56
Marking up formatting of step-by-step instructions.
madeline-underwood Dec 24, 2024
bfb815d
Marking up and clarifying instructions on setup.
madeline-underwood Dec 25, 2024
9c9955a
Tweaked title.
madeline-underwood Dec 25, 2024
a6ad5ff
Enhancing index file.
madeline-underwood Dec 27, 2024
6cbee6e
Reviewed questions.
madeline-underwood Dec 27, 2024
6ce3a0c
Review aws.md.
madeline-underwood Dec 27, 2024
90bdd5b
Split second learning objective in to two objectives.
madeline-underwood Dec 27, 2024
780b6cb
Added a fourth LO.
madeline-underwood Dec 27, 2024
fdb099b
Created new page on running the project.
madeline-underwood Dec 27, 2024
e453aca
Update
madeline-underwood Dec 27, 2024
3a586be
Structural changes.
madeline-underwood Dec 27, 2024
adc4397
More updates, including Figure titles.
madeline-underwood Dec 27, 2024
6fe1f13
Added more Figure labels.
madeline-underwood Dec 27, 2024
758cb79
More tweaks.
madeline-underwood Dec 27, 2024
211a13a
Further formatting tweaks.
madeline-underwood Dec 27, 2024
77c30f2
Added more formatting.
madeline-underwood Dec 27, 2024
1b72e8b
More improvements.
madeline-underwood Dec 27, 2024
dc73b3e
Final checks.
madeline-underwood Dec 27, 2024
435a3e4
Update intro.md
madeline-underwood Dec 28, 2024
529c71b
Editorial Review.
madeline-underwood Dec 28, 2024
635fe04
Typo
madeline-underwood Dec 29, 2024
af6d65e
Improvements to the phrasing of the language.
madeline-underwood Dec 29, 2024
1dfabd6
Update inference.md
madeline-underwood Dec 29, 2024
2e720fd
Update inference.md
madeline-underwood Dec 29, 2024
63d9a89
Update inference.md
madeline-underwood Dec 29, 2024
2d25027
Update inference.md
madeline-underwood Dec 29, 2024
ebe6bbf
automatic update of stats files
Dec 30, 2024
57c9295
Merge branch 'ArmDeveloperEcosystem:main' into MNIST-digit-classifica…
madeline-underwood Dec 30, 2024
9a86468
Update inference.md
madeline-underwood Dec 30, 2024
1a609ab
Update _index.md
madeline-underwood Dec 30, 2024
0eb090e
Update _next-steps.md
madeline-underwood Dec 30, 2024
5b3025d
Restructured PyTorch model training process outline.
madeline-underwood Dec 30, 2024
b551f10
Update intro2.md
madeline-underwood Dec 30, 2024
eca6ff5
Update intro2.md
madeline-underwood Dec 30, 2024
e62d510
Suggestion from KB.
madeline-underwood Dec 30, 2024
cb687ac
Update intro-opt.md
madeline-underwood Dec 30, 2024
24a9e47
Merge pull request #1480 from madeline-underwood/NET-ASPIRE
jasonrandrews Dec 30, 2024
6ac8ab7
Merge pull request #1481 from madeline-underwood/patch-1
jasonrandrews Dec 30, 2024
d347329
Tweaked audience statement.
madeline-underwood Dec 30, 2024
bc9f1aa
Added UI formatting and corrected spelling error.
madeline-underwood Dec 30, 2024
ce412da
spelling updates
Dec 30, 2024
1f8993e
Merge pull request #1482 from jasonrandrews/spelling
jasonrandrews Dec 30, 2024
80197b9
Adjusted title
madeline-underwood Dec 31, 2024
1a32dd6
Reviewed questions.
madeline-underwood Dec 31, 2024
72a88b7
Review.
madeline-underwood Dec 31, 2024
3f8738a
Update intro-android.md
madeline-underwood Dec 31, 2024
d4ef2b8
Review.
madeline-underwood Dec 31, 2024
31d91c0
Review.
madeline-underwood Dec 31, 2024
32c7028
Restructuring long-list content into bullets.
madeline-underwood Dec 31, 2024
8dc7d58
Final editorial.
madeline-underwood Dec 31, 2024
6b76a1c
Final editorial.
madeline-underwood Dec 31, 2024
08e548c
Final editorial.
madeline-underwood Dec 31, 2024
ea412c7
Final editorial.
madeline-underwood Dec 31, 2024
01f73f9
Final editorial.
madeline-underwood Dec 31, 2024
817e03d
Editorial Final.
madeline-underwood Dec 31, 2024
adbcd08
Final editorial.
madeline-underwood Dec 31, 2024
70d6345
Final editorial.
madeline-underwood Dec 31, 2024
8fefed2
Final editorial.
madeline-underwood Dec 31, 2024
20ba43a
Final editorial.
madeline-underwood Dec 31, 2024
4db0127
Final editorial.
madeline-underwood Dec 31, 2024
ca69adb
Final editorial.
madeline-underwood Dec 31, 2024
9eec2d7
Skopeo install guide ready for publish
Dec 31, 2024
8e4cd1e
Merge pull request #1484 from jasonrandrews/spelling
jasonrandrews Dec 31, 2024
4a3e7cc
Update model.md
madeline-underwood Dec 31, 2024
7e434f5
Update datasets-and-training.md
madeline-underwood Dec 31, 2024
8d619f1
Update inference.md
madeline-underwood Dec 31, 2024
80aba52
Update inference.md
madeline-underwood Dec 31, 2024
ae7122f
Update app.md
madeline-underwood Dec 31, 2024
68847e5
Update mobile-app.md
madeline-underwood Dec 31, 2024
76249e5
spelling updates
Dec 31, 2024
207e747
Merge pull request #1485 from jasonrandrews/review
jasonrandrews Dec 31, 2024
0172a65
Merge pull request #1483 from madeline-underwood/MNIST-digit-classifi…
jasonrandrews Dec 31, 2024
e273c98
fix notices in MNIST Learning Path
Dec 31, 2024
ed6d4ac
Merge pull request #1486 from jasonrandrews/review
jasonrandrews Dec 31, 2024
ea143a2
spelling fixes
Dec 31, 2024
5176d8f
Merge pull request #1487 from jasonrandrews/spelling
jasonrandrews Dec 31, 2024
53ab44f
spelling
Dec 31, 2024
deda2e0
Merge pull request #1488 from jasonrandrews/spelling
jasonrandrews Dec 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,6 @@ WGSL
WPR
WebGL
WebGPU
WebGPU’s
Xperf
andc
andnot
Expand Down Expand Up @@ -3352,7 +3351,6 @@ LastWriteTime
LiteRT
OV
Seeed
WebGPU’s
WiseEye
Yolov
blp
Expand Down Expand Up @@ -3384,7 +3382,7 @@ Dsouza
FGCT
GCT
GCs
GCs
GC's
HNso
HeapRegionSize
HugePages
Expand All @@ -3400,7 +3398,6 @@ Preema
Roesch
Sourcefire
TPACKET
WebGPU’s
Whitepaper
YGCT
axion
Expand Down Expand Up @@ -3431,7 +3428,6 @@ EOF
EVCLI
EVidence
Evcli
GC’s
GenerateMatrix
ImageCapture
InputStream
Expand All @@ -3456,7 +3452,8 @@ TestOpenCV
TrustedFirmware
Veraison
WeatherForecast
WebGPU’s
weatherForecast
WebGPU's
Wiredtiger
androidml
ar
Expand Down Expand Up @@ -3510,4 +3507,5 @@ unutilized
vLLM
veraison
verifier
vllm
vllm
observables
59 changes: 29 additions & 30 deletions content/install-guides/skopeo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Skopeo
draft: true
author_primary: Jason Andrews
minutes_to_complete: 10
official_docs: https://github.com/containers/skopeo
Expand All @@ -24,7 +23,7 @@ Skopeo is a command-line utility that performs various operations on container i

This article explains how to install Skopeo for Ubuntu on Arm.

Skopeo is available for Windows, macOS, and Linux and supports the Arm architecture. Refer to [Installing Skopeo](https://github.com/containers/skopeo/blob/main/install.md) for information about other operating systems and architectures.
Skopeo is available for Windows, macOS, and Linux and supports the Arm architecture. See [Installing Skopeo](https://github.com/containers/skopeo/blob/main/install.md) for further information about other operating systems and architectures.

## What should I consider before installing Skopeo on Arm?

Expand Down Expand Up @@ -56,13 +55,13 @@ Confirm the installation by checking the version:
skopeo --version
```

To see the help message:
To see the help message use this command:

```bash
skopeo --help
```

The output is:
The output that you will see should be:

```output
Various operations with container images and container image registries
Expand All @@ -72,44 +71,44 @@ Usage:
skopeo [command]

Available Commands:
copy Copy an IMAGE-NAME from one location to another
delete Delete image IMAGE-NAME
generate-sigstore-key Generate a sigstore public/private key pair
help Help about any command
inspect Inspect image IMAGE-NAME
list-tags List tags in the transport/repository specified by the SOURCE-IMAGE
login Login to a container registry
logout Logout of a container registry
manifest-digest Compute a manifest digest of a file
standalone-sign Create a signature using local files
standalone-verify Verify a signature using local files
sync Synchronize one or more images from one location to another
copy Copy an IMAGE-NAME from one location to another.
delete Delete image IMAGE-NAME.
generate-sigstore-key Generate a sigstore public/private key pair.
help Help about any command.
inspect Inspect image IMAGE-NAME.
list-tags List tags in the transport/repository specified by the SOURCE-IMAGE.
login Log in to a container registry.
logout Log out of a container registry.
manifest-digest Compute a manifest digest of a file.
standalone-sign Create a signature using local files.
standalone-verify Verify a signature using local files.
sync Synchronize one or more images from one location to another.

Flags:
--command-timeout duration timeout for the command execution
--debug enable debug output
-h, --help help for skopeo
--insecure-policy run the tool without any policy check
--override-arch ARCH use ARCH instead of the architecture of the machine for choosing images
--override-os OS use OS instead of the running OS for choosing images
--override-variant VARIANT use VARIANT instead of the running architecture variant for choosing images
--policy string Path to a trust policy file
--registries.d DIR use registry configuration files in DIR (e.g. for container signature storage)
--tmpdir string directory used to store temporary files
-v, --version Version for Skopeo
--command-timeout duration Timeout for the command execution.
--debug Enable debug output.
-h, --help Help for skopeo.
--insecure-policy Run the tool without any policy check.
--override-arch ARCH Use ARCH instead of the architecture of the machine for choosing images.
--override-os OS Use OS instead of the running OS for choosing images.
--override-variant VARIANT Use VARIANT instead of the running architecture variant for choosing images.
--policy string Path to a trust policy file.
--registries.d DIR Use registry configuration files in DIR (for example, for container signature storage).
--tmpdir string Directory used to store temporary files.
-v, --version Version for Skopeo.

Use "skopeo [command] --help" for more information about a command.
```

## How do I get started with Skopeo?

Some commands to get you started with Skopeo are demonstrated below.
You can use the commands listed below to get you started with Skopeo.

### How can I check if a container image supports Arm?

To find out if an image is multi-architecture, including Arm, you can inspect the image's manifest.

For example, to check if the dev container available for creating Arm Learning Paths supports the Arm architecture run:
For example, to check if the dev container available for creating Arm Learning Paths supports the Arm architecture, run:

```bash
skopeo inspect --raw docker://docker.io/armswdev/learn-dev-container:latest | jq '.manifests[] | select(.platform.architecture == "arm64")'
Expand Down Expand Up @@ -166,7 +165,7 @@ The output confirms that both `arm64` and `amd64` are supported architectures as

## What are some other uses for Skopeo?

Copy an image from a registry to a local directory. This command is similar to `docker pull` and will copy the image from the remote registry to your local directory.
Copy an image from a registry to a local directory. This command is similar to `docker pull` and copies the image from the remote registry to your local directory.

```bash
skopeo copy docker://docker.io/armswdev/uname:latest dir:./uname
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
title: Create and train a PyTorch model for digit classification
title: Create and train a PyTorch model for digit classification using the MNIST dataset

minutes_to_complete: 160

who_is_this_for: This is an advanced topic for software developers interested in learning how to use PyTorch to create and train a feedforward neural network for digit classification. You will also learn how to use the trained model in an Android application. Finally, you will apply model optimizations.
who_is_this_for: This is an advanced topic for software developers interested in learning how to use PyTorch to create and train a feedforward neural network for digit classification, and also software developers interested in learning how to use and apply optimizations to the trained model in an Android application.

learning_objectives:
- Prepare a PyTorch development environment.
- Download and prepare the MNIST dataset.
- Create a neural network architecture using PyTorch.
- Train a neural network using PyTorch.
- Create an Android app and loading the pre-trained model.
- Create and train a neural network architecture using PyTorch.
- Create an Android app and load the pre-trained model.
- Prepare an input dataset.
- Measure the inference time.
- Optimize a neural network architecture using quantization and fusing.
- Use an optimized model in the Android application.
- Deploy an optimized model in an Android application.

prerequisites:
- A computer that can run Python3, Visual Studio Code, and Android Studio. The OS can be Windows, Linux, or macOS.
- A machine that can run Python3, Visual Studio Code, and Android Studio.
- For the OS, you can use Windows, Linux, or macOS.


author_primary: Dawid Borycki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ================================================================================

next_step_guidance: >
Proceed to Use Keras Core with TensorFlow, PyTorch, and JAX backends to continue exploring Machine Learning.
To continue exploring Machine Learning, you can now learn about using Keras Core with TensorFlow, PyTorch, and JAX backends.

# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ review:
question: >
Does the input layer of the model flatten the 28x28 pixel image into a 1D array of 784 elements?
answers:
- "Yes"
- "No"
- "Yes."
- "No."
correct_answer: 1
explanation: >
Yes, the model uses nn.Flatten() to reshape the 28x28 pixel image into a 1D array of 784 elements for processing by the fully connected layers.
- questions:
question: >
Will the model make random predictions if it’s run before training?
Will the model make random predictions if it is run before training?
answers:
- "Yes"
- "No"
- "Yes."
- "No."
correct_answer: 1
explanation: >
Yes, however in such the case the model will produce random outputs, as the network has not been trained to recognize any patterns from the data.
Yes, however in this scenario the model will produce random outputs, as the network has not been trained to recognize any patterns from the data.
- questions:
question: >
Which loss function was used to train the PyTorch model on the MNIST dataset?
Which loss function did you use to train the PyTorch model on the MNIST dataset in this Learning Path?
answers:
- Mean Squared Error Loss
- Cross Entropy Loss
- Hinge Loss
- Mean Squared Error Loss.
- Cross-Entropy Loss.
- Hinge Loss.
- Binary Cross-Entropy Loss
correct_answer: 2
explanation: >
Cross Entropy Loss was used to train the model because it is suitable for multi-class classification tasks like digit classification. It measures the difference between the predicted probabilities and the true class labels, helping the model learn to make accurate predictions.
Cross-Entropy Loss was used to train the model as it is suitable for multi-class classification such as digit classification. It measures the difference between the predicted probabilities and the true class labels, helping the model to learn to make accurate predictions.

# ================================================================================
# FIXED, DO NOT MODIFY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,31 @@ weight: 10
layout: "learningpathall"
---

You are now ready to run the Android application. You can use an emulator or a physical device.

The screenshots below show an emulator.
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:

1. Configure the Emulator:
* Go to Tools > Device Manager (or click the Device Manager icon on the toolbar).
* Click Create Device to set up a new virtual device (if you haven’t done so already).
* Choose a device model, such as Pixel 4, and click Next.
* Select a system image, such as Android 11, API level 30, and click Next.
* Review the settings and click Finish to create the emulator.

* Go to **Tools** > **Device Manager**, or click the Device Manager icon on the toolbar.
* Click **Create Device** to set up a new virtual device, if you haven’t done so already.
* Choose a device model, such as the Pixel 4, and click **Next**.
* Select a system image, such as Android 11, API level 30, and click **Next**.
* Review the settings, and click **Finish** to create the emulator.

2. Run the App:
* Make sure the emulator is selected in the device dropdown menu in the toolbar (next to the “Run” button).
* Click the Run button (a green triangle). Android Studio will build the app, install it on the emulator, and launch it.

3. View the App on the Emulator: Once the app is installed, it will automatically open on the emulator screen, allowing you to interact with it as if it were running on a real device.
* Make sure the emulator is selected in the device drop-down menu in the toolbar, next to the **Run** button.
* Click the **Run** button, which is a green triangle. Android Studio builds the app, installs it on the emulator, and then launches it.

3. View the App on the Emulator:

* Once the app is installed, it automatically opens on the emulator screen, allowing you to interact with it as if it were running on a real device.

Once the application is started, click the Load Image button. It will load a randomly selected image. Then, click Run Inference to recognize the digit. The application will display the predicted label and the inference time as shown below:
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:

![img](Figures/05.png)
![img alt-text#center](Figures/05.png "Figure 7. Digit Recognition 1")

![img](Figures/06.png)
![img alt-text#center](Figures/06.png "Figure 8. Digit Recognition 2")

In the next step you will learn how to further optimize the model.
In the next step of this Learning Path, you will learn how to further optimize the model.
Loading
Loading