Registration of backend tensorflow failed
See original GitHub issueTensorFlow.js version
"@tensorflow/tfjs": "^0.13.1",
"@tensorflow/tfjs-node-gpu": "^0.1.17",
Browser version
N/A
Describe the problem or feature request
Following error is displayed:
Registration of backend tensorflow failed
Error: The specified module could not be found.
\\?\C:\Users\me\Repos\predict\node_modules\@tensorflow\tfjs-node-gpu\build\Release\tfjs_binding.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at bindings (C:\Users\me\Repos\predict\node_modules\bindings\bindings.js:81:44)
at C:\Users\me\Repos\predict\node_modules\@tensorflow\tfjs-node-gpu\dist\index.js:10:60
at Environment.registerBackend (C:\Users\me\Repos\predict\node_modules\@tensorflow\tfjs-node-gpu\node_modules\@tensorflow\tfjs-core\dist\environment.js:196:27)
at Object.<anonymous> (C:\Users\me\Repos\predict\node_modules\@tensorflow\tfjs-node-gpu\dist\index.js:9:9)
I’ve checked the specified directory/file and it exists.
Code to reproduce the bug / link to feature request
I’m trying the most basic example shown here: https://js.tensorflow.org/#getting-started
I have tfjs-node-gpu
successfully installed on Windows. Tried both:
const tfGPU = require('@tensorflow/tfjs-node-gpu')
const tf = require('@tensorflow/tfjs')
And:
const tf = require('@tensorflow/tfjs')
const tfGPU = require('@tensorflow/tfjs-node-gpu')
@tensorflow/tfjs-node-gpu
is required only once.
Issue Analytics
- State:
- Created 5 years ago
- Comments:33 (11 by maintainers)
Top Results From Across the Web
Initialization of backend tensorflow failed Error: Could not ...
One of the following steps might help to fix your problem: Do a clean installation of your dependencies. Delete the the node_modules folder...
Read more >@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the TensorFlow ...
Read more >@tensorflow/tfjs-backend-webgl - npm package | Snyk
@tensorflow/tfjs-backend-webgl. v4.1.0. GPU accelerated WebGL backend for TensorFlow.js For more information about how to use this package see README.
Read more >cpu backend was already registered as global error
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group. To unsubscribe from this group and stop receiving ......
Read more >Upgrading to TensorFlow.js 3.0
We also no longer register gradients for kernels by default. If you want gradient/training ... import '@tensorflow/tfjs-backend-webgl';
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
I have the same problem as @timbur, tfjs_binding.node is there but I got “Error: The specified module could not be found.”
I tied both CommonJS and ES6Modules:
and:
I have Win10, Nodejs 11.2, Python 2.7. I tried VS2015 and VS2017, with both I get same error after install.
EDIT ------------------------------------------
after some struggles I found I out that I haven’t install required nvidia drivers and tools, so for those who have the same problem you must install CUDA Toolkit 9 (Not 10 for now) and cuDNN SDK for CUDA Toolkit 9 and append them to windows path which is explained in detail at this page: https://www.tensorflow.org/install/gpu
We ship 0.12.7 right now in the
tfjs-node
package. Sorry for the confusion - but you only have tonpm install @tensorflow/tfjs-node
today. That package ships with a supported version of@tensorflow/tfjs
.So basically this: