Tinyml Workshop Runtime Error
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- arduino, jupyter-notebook, matplotlib, python
- Domain
- embedded-iot, machine-learning
Research direction
Open arduino_tinyml_workshop.ipynb in Colab and start at the “Run with Test Data” cell. Inspect the reported plotting lines alongside the printed shapes for inputs_test, outputs_test, and predictions, then rerun the cell. Done means the tutorial cell completes without the reported ValueError and displays the actual and predicted data plots.
Written by the indexing model from the issue text.
Description
Running through the tutorial: Nano 33 BLE Sense Rev2
Get Started With Machine Learning on Arduino
In arduino_tinyml_workshop.ipynb in Colab
Got data and uploaded to Colab.
Running the cells, got to the cell: Run with Test Data'
Runtime errors on these lines:
plt.plot(inputs_test, outputs_test, 'b.', label='Actual')
plt.plot(inputs_test, predictions, 'r.', label='Predicted')
Added in a few prints of data...
OUTPUT WITH ERRORS:
1/1 [==============================] - 0s 39ms/step
predictions =
[[1. 0. ]
[0.998 0.002]
[0. 1. ]
[1. 0. ]]
inputs_test =
[[0.701375 0.520875 0.378875 ... 0.500183 0.499817 0.499878 ]
[0.5895 0.461625 0.743125 ... 0.500534 0.50016775 0.50004575]
[0.68425 0.4585 0.71725 ... 0.4999695 0.4987335 0.49971 ]
[0.66625 0.51975 0.3385 ... 0.500885 0.500702 0.5009155 ]]
actual =
[[1. 0.]
[1. 0.]
[0. 1.]
[1. 0.]]
ValueError Traceback (most recent call last)
in <cell line: 12>()
10 plt.clf()
11 plt.title('Training data predicted vs actual values')
---> 12 plt.plot(inputs_test, outputs_test, 'b.', label='Actual')
13 plt.plot(inputs_test, predictions, 'r.', label='Predicted')
14 plt.show()
3 frames
/usr/local/lib/python3.10/dist-packages/matplotlib/axes/_base.py in _plot_args(self, tup, kwargs, return_kwargs, ambiguous_fmt_datakey)
520 ncx, ncy = x.shape[1], y.shape[1]
521 if ncx > 1 and ncy > 1 and ncx != ncy:
--> 522 raise ValueError(f"x has {ncx} columns but y has {ncy} columns")
523 if ncx == 0 or ncy == 0:
524 return []
ValueError: x has 714 columns but y has 2 columns
- Dominant language
- Jupyter Notebook
- Stars
- 269
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from arduino/ArduinoTensorFlowLiteTutorials
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
arduino/ArduinoTensorFlowLiteTutorials#36 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
arduino/ArduinoTensorFlowLiteTutorials#35 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
arduino/ArduinoTensorFlowLiteTutorials#34 · 5 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
arduino/ArduinoTensorFlowLiteTutorials#32 · 2 comments · 1 reaction ·
All issues in arduino/ArduinoTensorFlowLiteTutorials
Similar issues
-
area: config area: firmware priority: P2 - medium size: S type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Mizithra/ActiveTerrain#16 ·
-
external converter
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Koenkk/zigbee2mqtt#33219 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OpenDevicePartnership/ina4230#25 ·
Maintainers usually reply within 1 day