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 DeepLab Porting Error

See original GitHub issue

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

Python TFJS: 0.8.5 NPM TFJS: 1.0.0

Browser version

Chrome latest

Describe the problem or feature request

Hi, I am trying to port a pretrained DeepLab model to TFJS.

The model is trained in Python and saved as a tf_frozen_model. I convert it to a TFJS model using an tfjs-converter 0.8.5.

I load this converted model to a React app with TFJS version 1.0.0 with loadGraphModel.

Running model.predict(<tf.Tensor4D>) with this model throws the following error:

Uncaught (in promise) TypeError: Cannot read property 'backend' of undefined
at t.readSync
at t.moveData
at t.get
at t.reshape
at Ot.runKernel.$x
at t.scopedRun
at t.runKernel
at reshape_
at reshape

Any suggestions on how to fix this would be greatly appreciated. Thanks!

Code to reproduce the bug / link to feature request

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
aptlincommented, Jun 4, 2019

@kavikode, you might take a look at https://github.com/tensorflow/tfjs-models/pull/229, which has a lot of issues at the moment and will change a lot in the next few days. If you want to dive into the code, you might follow the instructions in the demo README.

1reaction
dhrumil83commented, May 2, 2019

Does your model have any .pb files? In that case you need to convert the model once more since its the old format and not valid for tfjs 1.0.

https://github.com/tensorflow/tfjs-converter

I have a model converted with a previous version of TensorFlow.js converter (0.15.x), that is in .pb format. How do I convert it to the new JSON format?

I am looking forward to the next piece of computer vision(segmentation) optimized to work in the browser. Body pix example is great, but need ability to do that on generic objects as well. Hopefully some more examples/models related to this coming soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hurdles I got over using tensorflow.js deeplab v3 ...
Reason. The debugging is tough as tensorflow-model and tfjs-core are compiled as distribution library and no source code debugging is available. Digging into ......
Read more >
converting a network that uses StridedSlice - Google Groups
I've been having trouble converting two networks. When I run the converted network in the browser I get the error "Pass at least...
Read more >
TFjs-models: Pretrained Models for TensorFlow.js - Morioh
This repository hosts a set of pre-trained models that have been ported to TensorFlow.js. The models are hosted on NPM and unpkg so...
Read more >
eeva/tfjs-models: Pretrained models for TensorFlow.js - tfjs-models ...
This repository hosts a set of pre-trained models that have been ported to TensorFlow.js. The models are hosted on NPM and unpkg so...
Read more >
Growing TensorFlow.js garden - Sasha Aptlin
Models · DeepLab: making sense of the infinite content · EfficientNet: porting a heavyweight sibling of MobileNetV2 · PSENet: detecting text with arbitrary...
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