Skip to content

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

@hst45

Description

@hst45

@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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions