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

Neural Network Example Section Error #1230

Closed
LeeGrobler opened this issue Sep 3, 2021 · 1 comment Β· Fixed by #1237
Closed

Neural Network Example Section Error #1230

LeeGrobler opened this issue Sep 3, 2021 · 1 comment Β· Fixed by #1237

Comments

@LeeGrobler
Copy link

Dear ml5 community,

I'm submitting a new issue. Please see the details below.

β†’ Step 1: Describe the issue πŸ“

The Load Existing Data example section in the docs throws the following errors:

your data must be contained in an array in 

        a property called 'entries' or 'data' of your json object
NeuralNetworkData.js:627 error loading json
(anonymous) @ NeuralNetworkData.js:627
w @ runtime.js:62
(anonymous) @ runtime.js:296
t.<computed> @ runtime.js:114
i @ asyncToGenerator.js:17
(anonymous) @ asyncToGenerator.js:28
Promise.then (async)
i @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:35
e @ _export.js:36
(anonymous) @ asyncToGenerator.js:14
(anonymous) @ NeuralNetworkData.js:628
(anonymous) @ NeuralNetworkData.js:592
w @ runtime.js:62
(anonymous) @ runtime.js:296
t.<computed> @ runtime.js:114
i @ asyncToGenerator.js:17
(anonymous) @ asyncToGenerator.js:35
e @ _export.js:36
(anonymous) @ asyncToGenerator.js:14
(anonymous) @ NeuralNetworkData.js:602
(anonymous) @ index.js:235
w @ runtime.js:62
(anonymous) @ runtime.js:296
t.<computed> @ runtime.js:114
i @ asyncToGenerator.js:17
(anonymous) @ asyncToGenerator.js:35
e @ _export.js:36
(anonymous) @ asyncToGenerator.js:14
(anonymous) @ index.js:242
value @ index.js:225
value @ index.js:115
t @ index.js:95
e.default @ index.js:1229
(anonymous) @ sketch.js:9
NeuralNetworkData.js:601 Error: TypeError: r.map is not a function
    at t.<anonymous> (NeuralNetworkData.js:628)
    at w (runtime.js:62)
    at Generator._invoke (runtime.js:296)
    at Generator.t.<computed> [as next] (runtime.js:114)
    at i (asyncToGenerator.js:17)
    at asyncToGenerator.js:28
(anonymous) @ NeuralNetworkData.js:601
w @ runtime.js:62
(anonymous) @ runtime.js:296
t.<computed> @ runtime.js:114
i @ asyncToGenerator.js:17
(anonymous) @ asyncToGenerator.js:30
Promise.then (async)
i @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:35
e @ _export.js:36
(anonymous) @ asyncToGenerator.js:14
(anonymous) @ NeuralNetworkData.js:602
(anonymous) @ index.js:235
w @ runtime.js:62
(anonymous) @ runtime.js:296
t.<computed> @ runtime.js:114
i @ asyncToGenerator.js:17
(anonymous) @ asyncToGenerator.js:35
e @ _export.js:36
(anonymous) @ asyncToGenerator.js:14
(anonymous) @ index.js:242
value @ index.js:225
value @ index.js:115
t @ index.js:95
e.default @ index.js:1229
(anonymous) @ sketch.js:9
NeuralNetworkData.js:218 Uncaught (in promise) TypeError: Cannot read property 'xs' of undefined
    at t.value (NeuralNetworkData.js:218)
    at t.value (NeuralNetworkData.js:79)
    at t.value (index.js:260)
    at t.value (index.js:292)
    at dataLoaded (sketch.js:13)
    at callcallback.js:14
value @ NeuralNetworkData.js:218
value @ NeuralNetworkData.js:79
value @ index.js:260
value @ index.js:292
dataLoaded @ sketch.js:13
(anonymous) @ callcallback.js:14
Promise.catch (async)
e.default @ callcallback.js:13
value @ index.js:225
value @ index.js:115
t @ index.js:95
e.default @ index.js:1229
(anonymous) @ sketch.js:9

β†’ Step 2: Screenshots or Relevant Documentation πŸ–Ό

Here's some helpful screenshots and/or documentation of the new feature

https://imgur.com/a/eQCxvc3

β†’ Step 3: Share an example of the issue πŸ¦„

Here's some example code or a demonstration of my feature in this issue, separate GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...

Literally the code in the docs.

Other relevant information, if applicable

β†’ Describe your setup πŸ¦„

Here's some helpful information about my setup...

@joeyklee
Copy link
Contributor

Hi @SeriousLeeTV ! Oh wow thank you for flagging this. It is always helpful to have eyes on the documentation. I've opened up a PR for this fix here: #1237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants