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

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setShape') #241

Open
hst45 opened this issue Apr 24, 2022 · 0 comments

Comments

@hst45
Copy link

hst45 commented Apr 24, 2022

@CharlesLiuyx Hi, I met with some problems when I was trying to visualize the LeNet model in the examples. I used the tensorspacejs_converter to preprocess the model first, and it seemed that the preprocessing was completed successfully, here is the output of the preprocessing in the terminal:

2022-04-24 14:57:46.833002: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Saving enc_model...
Saving converted tfjs model...
Removing enc_model file...
Mission Complete!!!

And the following is the javascript problem I met when I was trying to use the converted model.json in the HTML

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setShape')
at R.configureLayerShape (Sequential.js:333:25)
at R.initTSPModel (Sequential.js:155:9)
at AbstractModel.js:312:10

I also tried to use the model.json and mnist.weights.bin downloaded from the tensorspace-website project, and it worked. So I assume that there might be something wrong with my preprocessing. Could you please help me with it?

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

No branches or pull requests

1 participant