ml5-library
ml5-library copied to clipboard
DCGAN example error
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 [email protected] 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
→ 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...
- Web browser & version: Chrome Version 81.0.4044.122 (Official Build) (64-bit)
- Operating System: macOS catalina
- ml5 version you're using: 0.5.0
- Any additional notes
Hi @bearzx - thanks for posting this. Can you provide a link to example code such that this error can be reproduced? Thanks!
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.
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.