question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: TensorList shape mismatch: Shapes -1 and 3 must match - CONTINUE

See original GitHub issue

I’ve been working for a week. This error appears to be from open source applications that were not in previous versions. I even tried from old models. They are working. But the one I just created doesn’t work.

This error continues. How do we fix this?

tfjs-core: ^3.0.0
tfjs-converter: ^3.0.0
TF 2.4.1
Python 3.6.9

_Originally posted by @umitkacar in https://github.com/tensorflow/tfjs/issues/4641#issuecomment-779332368_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:56

github_iconTop GitHub Comments

3reactions
umitkacarcommented, Feb 17, 2021

I trained Kangaroo dataset again. I used this code below to convert javascript. This model is running my demo code not React. As a results, the model is OK. I think that React is problem. I didn’t use React before.

tensorflowjs_converter \
    --input_format=tf_saved_model \
    --output_format=tfjs_graph_model \
    --signature_name=serving_default \
    --saved_model_tags=serve \
    saved_model \
    web_model
3reactions
umitkacarcommented, Feb 17, 2021

I tried it. It is working. Thank you everyone.

Perfect!

https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@3.1.0/dist/tf.min.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught (in promise) Error: TensorList shape mismatch
I find it curious that the error states Shapes -1 and must match. ... -1 and what? I'm not entirely sure what tf...
Read more >
Shape mismatch issue with tf.js - tips? : r/tensorflow - Reddit
No matter how I change the parameters of the layers, I get the following error message: "Error: Error when checking target: expected ...
Read more >
Getting a shape error in the Dense Layer - TensorFlow Forum
The shape mismatch error refers to the fact that your model has 4 output values from the last dense layer but labels represent...
Read more >
Distributed communication package - torch.distributed - PyTorch
GLOO ). If using multiple processes per machine with nccl backend, each process must have exclusive access to every GPU it uses, as...
Read more >
UNPKG - @tensorflow/tfjs-core
n *\n * ```js\n * const a = [1, 2, 3, 4, 5];\n * tf.util.shuffle(a);\n ... shapeProd) {\n throw Error(`Size(${size}) must match the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found