tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.43k stars 1.92k forks source link

Tensorflow TypeError: Cannot read properties of undefined (reading 'backend') #8418

Open SoftRobotmobileerp opened 6 days ago

SoftRobotmobileerp commented 6 days ago

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

Describe the problem

0|face-app-node-api | (node:8508) Warning: Label 'Face Detection Process Time' already exists for console.time() 0|face-app-node-api | TypeError: Cannot read properties of undefined (reading 'backend') 0|face-app-node-api | at Engine.moveData (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\engine.js:349:31) 0|face-app-node-api | at DataStorage.get (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\backends\backend.js:31:28) 0|face-app-node-api | at Object.kernelFunc (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\backends\cpu\utils\kernel_utils.js:32:41) 0|face-app-node-api | at kernelFunc (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\engine.js:499:30) 0|face-app-node-api | at C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\engine.js:553:27 0|face-app-node-api | at Engine.scopedRun (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\engine.js:398:23) 0|face-app-node-api | at Engine.runKernelFunc (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\nodemodules\@tensorflow\tfjs-core\dist\engine.js:551:14) 0|face-app-node-api | at div (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\ops\div.js:66:28) 0|face-app-node-api | at Object.div (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\ops\operation.js:46:29) 0|face-app-node-api | at tensor_1.Tensor.div (C:\face-app-node-api\node_modules\tfjs-image-recognition-base\node_modules\@tensorflow\tfjs-core\dist\public\chained_ops\div.js:22:18)

Any other info / logs This occurs when we try to access face vectors after capturing photo from android mobile phone

shmishra99 commented 6 days ago

Hi @SoftRobotmobileerp ,

Could you please check the following issue to see if it relates to your issue? To investigate further, kindly share the following: 1) Your package.json file. 2) A small, reproducible code snippet.

Thank You!!

SoftRobotmobileerp commented 6 days ago

package.json

shmishra99 commented 6 days ago

@SoftRobotmobileerp Could you please share a small, reproducible code snippet as well?