adriagil / tfjs-vue-example

Demo application made with Vue.js for using a custom trained Tensorflow graph model inside the browser
6 stars 2 forks source link

Issues with Custom Trained Model #1

Open rbhatia1997 opened 4 years ago

rbhatia1997 commented 4 years ago

Firstly, thank you very much for the tutorial and for posting the code here - it has been very useful! I was following the steps using faster_rcnn and got the web application working; however, when I use a version trained with mobilenet, I get the following error:

tf-core.esm.js?45ef:17 Uncaught (in promise) TypeError: Cannot read property '0' of undefined     at eval (tf-core.esm.js?45ef:17)     at fa (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at Array.map ()     at la (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at o.getAndSaveBinary (tf-core.esm.js?45ef:17)     at o.runWebGLProgram (tf-core.esm.js?45ef:17)

This may be an issue with Tensorflow rather than the app itself; if so, I apologize. I would appreciate any assistance!

jacklynlxq commented 4 years ago

Firstly, thank you very much for the tutorial and for posting the code here - it has been very useful! I was following the steps using faster_rcnn and got the web application working; however, when I use a version trained with mobilenet, I get the following error:

tf-core.esm.js?45ef:17 Uncaught (in promise) TypeError: Cannot read property '0' of undefined     at eval (tf-core.esm.js?45ef:17)     at fa (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at Array.map ()     at la (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at o.getAndSaveBinary (tf-core.esm.js?45ef:17)     at o.runWebGLProgram (tf-core.esm.js?45ef:17)

This may be an issue with Tensorflow rather than the app itself; if so, I apologize. I would appreciate any assistance!

Have you found a solution yet? I'm facing the same problem and the error is causing some memory leak. I've tried tf.dispose(), tf.disposeVariables(), tf.engine().startScope() and tf.engine().endScope() but it still couldn't clean up the tensors. When I log tf.memory() I can see the numTensors stays the same though, only numBytesInGPU is increasing.

rbhatia1997 commented 4 years ago

Firstly, thank you very much for the tutorial and for posting the code here - it has been very useful! I was following the steps using faster_rcnn and got the web application working; however, when I use a version trained with mobilenet, I get the following error: tf-core.esm.js?45ef:17 Uncaught (in promise) TypeError: Cannot read property '0' of undefined     at eval (tf-core.esm.js?45ef:17)     at fa (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at Array.map ()     at la (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at o.getAndSaveBinary (tf-core.esm.js?45ef:17)     at o.runWebGLProgram (tf-core.esm.js?45ef:17) This may be an issue with Tensorflow rather than the app itself; if so, I apologize. I would appreciate any assistance!

Have you found a solution yet? I'm facing the same problem and the error is causing some memory leak. I've tried tf.dispose(), tf.disposeVariables(), tf.engine().startScope() and tf.engine().endScope() but it still couldn't clean up the tensors. When I log tf.memory() I can see the numTensors stays the same though, only numBytesInGPU is increasing.

Unfortunately, I haven't found a solution yet to this specific issue; however, I was eventually able to get TF working in a React application using the Saved Model format/TensorFlow Serving rather than with TensorFlow JS. I'm publishing the documentation soon for it.

jacklynlxq commented 4 years ago

Firstly, thank you very much for the tutorial and for posting the code here - it has been very useful! I was following the steps using faster_rcnn and got the web application working; however, when I use a version trained with mobilenet, I get the following error: tf-core.esm.js?45ef:17 Uncaught (in promise) TypeError: Cannot read property '0' of undefined     at eval (tf-core.esm.js?45ef:17)     at fa (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at Array.map ()     at la (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at o.getAndSaveBinary (tf-core.esm.js?45ef:17)     at o.runWebGLProgram (tf-core.esm.js?45ef:17) This may be an issue with Tensorflow rather than the app itself; if so, I apologize. I would appreciate any assistance!

Have you found a solution yet? I'm facing the same problem and the error is causing some memory leak. I've tried tf.dispose(), tf.disposeVariables(), tf.engine().startScope() and tf.engine().endScope() but it still couldn't clean up the tensors. When I log tf.memory() I can see the numTensors stays the same though, only numBytesInGPU is increasing.

Unfortunately, I haven't found a solution yet to this specific issue; however, I was eventually able to get TF working in a React application using the Saved Model format/TensorFlow Serving rather than with TensorFlow JS. I'm publishing the documentation soon for it.

Sounds great! Cant wait for it, and you dont face any issue while inferencing with the Saved Model format?

rbhatia1997 commented 4 years ago

Firstly, thank you very much for the tutorial and for posting the code here - it has been very useful! I was following the steps using faster_rcnn and got the web application working; however, when I use a version trained with mobilenet, I get the following error: tf-core.esm.js?45ef:17 Uncaught (in promise) TypeError: Cannot read property '0' of undefined     at eval (tf-core.esm.js?45ef:17)     at fa (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at Array.map ()     at la (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at eval (tf-core.esm.js?45ef:17)     at o.getAndSaveBinary (tf-core.esm.js?45ef:17)     at o.runWebGLProgram (tf-core.esm.js?45ef:17) This may be an issue with Tensorflow rather than the app itself; if so, I apologize. I would appreciate any assistance!

Have you found a solution yet? I'm facing the same problem and the error is causing some memory leak. I've tried tf.dispose(), tf.disposeVariables(), tf.engine().startScope() and tf.engine().endScope() but it still couldn't clean up the tensors. When I log tf.memory() I can see the numTensors stays the same though, only numBytesInGPU is increasing.

Unfortunately, I haven't found a solution yet to this specific issue; however, I was eventually able to get TF working in a React application using the Saved Model format/TensorFlow Serving rather than with TensorFlow JS. I'm publishing the documentation soon for it.

Sounds great! Cant wait for it, and you dont face any issue while inferencing with the Saved Model format?

Oddly enough, I don't - used TensorFlow Serving + Docker (and you have to deprecate TensorFlow to 1.x). See the following for more info:

https://medium.com/@ronak.k.bhatia/building-a-multiple-object-detection-model-with-tensorflows-object-detection-api-5a71eaaa5b96

https://medium.com/@yallison/how-to-use-an-object-detection-model-in-a-react-app-with-tensorflow-serving-68eb290ec70