TFJS DeepLab Porting Error
See original GitHub issueTo 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:
- Created 4 years ago
- Reactions:1
- Comments:14 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
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 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.