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.

TFJS does not work with converted CenterNet models

See original GitHub issue

CenterNet model works when loaded as saved_model in tfjs_node using loadSavedModel(), but fails when converted using tensorflowjs_converter --input_format tf_hub ... to graph_model
it seems to convert correctly and loads correctly using loadGraphModel, but fails during call to executeAsync():

Uncaught (in promise) Error: All tensors passed to tf.addN() must have the same shape
  (anonymous)	@	add_n.js:48
  addN_	@	add_n.js:46
  addN__op	@	operation.js:44
  executeOp	@	arithmetic_executor.js:28
  (anonymous)	@	operation_executor.js:48
  (anonymous)	@	engine.js:314
  scopedRun	@	engine.js:324
  tidy	@	engine.js:313
  tidy	@	globals.js:173
  (anonymous)	@	operation_executor.js:48
  executeOp$h	@	operation_executor.js:90
  processStack	@	graph_executor.js:390
  executeWithControlFlow	@	graph_executor.js:350

this is a new error message as code changes from #4100 do fix previously encountered error (see #3903 for details), but it seems it’s like peeling an onion 😃

environment: tfjs built from master dated 10/24/2020 on ubuntu 20.10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
vladmandiccommented, Mar 26, 2021

@sandhyacs

i didn’t get that error

wget https://tfhub.dev/tensorflow/centernet/resnet50v2_512x512_kpts/1?tf-hub-format=compressed
tar xzf 1\?tf-hub-format\=compressed
rm 1\?tf-hub-format\=compressed
tensorflowjs_converter --input_format=tf_saved_model --output_format=tfjs_graph_model . graph

it throws some warnings as variables are not constant, but conversion finishes without errors and model is usable

0reactions
sandhyacscommented, Mar 27, 2021

the model from tf-hub is working now… but the model which i am training is getting same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TFJS model not working problem - TensorFlow Forum
When I want to run the tfjs model I obtained after converting it to tfsj in the react web interface, the web browser...
Read more >
Unable to use models created by the tensorflowjs converter
That seems to work. Then I have tried to used this new converted model within the mobilenet demo by changing the way the...
Read more >
yolo-v1-tiny-tf - OpenVINO™ Documentation
YOLO v1 Tiny is a real-time object detection model from TensorFlow.js* framework. This model was pretrained on VOC* dataset with 20 classes.
Read more >
How to Train a TensorFlow 2 Object Detection Model
In this blog and TensorFlow 2 Object Detection Colab Notebook, we walk through how you can train your own custom object detector in...
Read more >
tfjs-converter - GitHub Pages
Convert TensorFlow SavedModel and Keras models to TensorFlow.js. ... TensorFlow.js converter is an open source library to load a pretrained TensorFlow ...
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