Commit a718415
Summary: Pico2 demo of simple neural network (MNIST) (#15196)
Test Plan:
1. Setup Conda
2. examples/arm/setup.sh --i-agree-to-the-contained-eula; source
examples/ arm/ethos-u-scratch/setup_path.sh
3. cd examples/raspberry_pi/pico2
4. python export_mlp_mnist.py
5. ./build_firmware_pico.sh --model=balanced_tiny_mlp_mnist.pte
Results:
PREDICTED: 4 (Expected: 4) ✅ CORRECT!
==================================================
=== Digit 7 ===
>
> #############
> #############
> ####
> ####
> ####
> ####
> ####
> ####
>
Input stats: 159 white pixels out of 784 total
Running neural network inference...
✅ Neural network results:
Digit 0: 370.000
Digit 1: 0.000
Digit 2: -3.000
Digit 3: -3.000
Digit 4: 860.000
Digit 5: -3.000
Digit 6: -3.000
Digit 7: 1640.000 ← PREDICTED
Digit 8: -3.000
Digit 9: -3.000
� PREDICTED: 7 (Expected: 7) ✅ CORRECT!
==================================================
� All tests complete! PyTorch neural network works on Pico2!
Reviewers:
Subscribers:
Tasks:
Tags:
### Summary
[PLEASE REMOVE] See [CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests)
for ExecuTorch PR guidelines.
[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes
#<issue-id>` line.
[PLEASE REMOVE] If this PR introduces a fix or feature that should be
the upcoming release notes, please add a "Release notes: <area>" label.
For a list of available release notes labels, check out
[CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).
### Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual
commands you used and note down tests that you have written if
applicable.
Co-authored-by: Siddartha Pothapragada <[email protected]>
Co-authored-by: Github Executorch <[email protected]>1 parent 14e34d5 commit a718415
File tree
5 files changed
+609
-80
lines changed- examples/raspberry_pi/pico2
5 files changed
+609
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | | - | |
71 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
8 | 45 | | |
9 | 46 | | |
10 | 47 | | |
11 | | - | |
| 48 | + | |
12 | 49 | | |
13 | 50 | | |
14 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
15 | 54 | | |
16 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
17 | 61 | | |
18 | | - | |
19 | | - | |
| 62 | + | |
20 | 63 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
24 | 67 | | |
25 | 68 | | |
26 | 69 | | |
27 | 70 | | |
28 | | - | |
| 71 | + | |
29 | 72 | | |
30 | 73 | | |
31 | 74 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 75 | + | |
35 | 76 | | |
36 | | - | |
37 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
38 | 132 | | |
39 | 133 | | |
40 | 134 | | |
41 | 135 | | |
42 | | - | |
43 | | - | |
| 136 | + | |
44 | 137 | | |
45 | 138 | | |
46 | 139 | | |
| 140 | + | |
47 | 141 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments