"cpu backend was already registered" during import/require tfjs + tfjs-node-gpu
See original GitHub issueTensorFlow.js version
0.13.0 tfjs-node-gpu 0.1.17
Browser version
N/A - Node 10.10
Describe the problem or feature request
require('@tensorflow/tfjs');
require('@tensorflow/tfjs-node-gpu');
or
require('@tensorflow/tfjs-node-gpu');
require('@tensorflow/tfjs');
print the warning:
cpu backend was already registered. Reusing existing backend
It’s very minor ofc but damn annoys much.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:30 (19 by maintainers)
Top Results From Across the Web
Platform node has already been set. Overwriting the platform ...
Trying to convert my computer vision application with tfjs-node to use ... The kernel '_FusedMatMul' for backend 'cpu' is already registered ...
Read more >cpu backend was already registered as global error
I tried building from the source tfjs-layers so I could see changes I have made to the code, however following this series of...
Read more >TensorflowJS backend CPU kernel undefined is already ...
If I load both GPU and CPU, I only get the kernel undefined is already registered warning. Some other posts here on SO...
Read more >@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript ... npm install @tensorflow/tfjs-node-gpu (or) yarn add ...
Read more >Machine Learning In Node.js With TensorFlow.js
This allows TensorFlow.js to be used in backend JavaScript applications ... or... npm install @tensorflow/tfjs @tensorflow/tfjs-node-gpu.
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
This could be an issue with double importing of tfjs.
Can you show what your package.json dependencies look like? You don’t need to import
@tensorflow/tfjs
directly,@tensorflow/tfjs-node
will do that for you.Changing package.json to this: (excluding @tensorflow/tfjs)
Running npm install and using
fixes the issue for me