ml5js / ml5-library

Friendly machine learning for the web! πŸ€–
https://ml5js.org
Other
6.5k stars 901 forks source link

DCGAN example error #949

Open bearzx opened 4 years ago

bearzx commented 4 years ago

Dear ml5 community,

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

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

Did you find a bug? Want to suggest an idea for feature?

Hello,

I was just playing with DCGAN example, and got an error like this:

Uncaught (in promise) TypeError: Cannot read property 'load' of undefined
    at tf-layers.esm.js:17
    at tf-layers.esm.js:17
    at Object.next (tf-layers.esm.js:17)
    at tf-layers.esm.js:17
    at new Promise (<anonymous>)
    at tf_layers_esm_awaiter (tf-layers.esm.js:17)
    at tf_layers_esm_loadLayersModelFromIOHandler (tf-layers.esm.js:17)
    at tf-layers.esm.js:17
    at tf-layers.esm.js:17
    at Object.next (tf-layers.esm.js:17)

The setup was pretty straight-forward. I just pulled down all the code, and changed the local paths (for ml5@0.5.0 and dcgan model) to remote ones.

It seems like it might have something to do with tfjs-core. Any idea on what's happening here?

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

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

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

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

Other relevant information, if applicable

β†’ Describe your setup πŸ¦„

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

joeyklee commented 4 years ago

Hi @bearzx - thanks for posting this. Can you provide a link to example code such that this error can be reproduced? Thanks!

bearzx commented 4 years ago

Sure here we go: https://jsfiddle.net/jy6gabs4/ . Open the dev console you should be able to see the error.

It's pretty much a direct run from the example folder.

Sorry for the late response.

lindapaiste commented 2 years ago

The reason for the error is that you are passing the model.json instead of the manifest.json which is what it expects.

I am leaving this issue open because that is an extremely unhelpful error and we should handle this better. Perhaps we can look for a manifest.json in the same directory as the model.json. At the very least we can give you a better error message.