Issue running tfjs-node-gpu under Windows
See original GitHub issueTensorFlow.js version
tfjs-node-gpu 1.2.7
Node version
v12.9.0
Describe the problem or feature request
When trying to run a file that only contains the following line:
const tf = require('@tensorflow/tfjs-node-gpu');
I will receive the following error:
internal/modules/cjs/loader.js:977
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\\?\C:\development\JS ML\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v4\tfjs_binding.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:977:18)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (C:\Entwicklung_neu\JS ML\node_modules\@tensorflow\tfjs-node-gpu\dist\index.js:44:16)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
I tried to find out why there is this strange “\?” prepended to the path but I couldn’t really find out why it is happening. The code will run without any problem when I only use the CPU module (tfjs-node).
I have a CUDA compatible graphics card (GTX960M) and followed the complete installation guide. When installing the module I have only Python 2.7 installed. The installation of the module also seems to work as expected:
> @tensorflow/tfjs-node-gpu@1.2.7 install C:\development\JS ML\node_modules\@tensorflow\tfjs-node-gpu
> node scripts/install.js gpu download
GPU-windows-1.2.7.zip
* Downloading libtensorflow
[==============================] 3508656/bps 100% 0.0s
[==============================] 1862362/bps 100% 0.0s
* Building TensorFlow Node.js bindings
npm WARN js-ml@1.0.0 No description
npm WARN js-ml@1.0.0 No repository field.
added 86 packages from 83 contributors and audited 150 packages in 98.859s
found 0 vulnerabilities
I would be very glad if anyone could help me with this issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:34 (17 by maintainers)
Top Results From Across the Web
Appendix A. Installing tfjs-node-gpu and its dependencies
js (tfjs-node-gpu) in Node.js, you need to have CUDA and CuDNN installed on your machine. First of all, the machine should be equipped...
Read more >TensorFlow.js in Node
Like the CPU package, the module that you get will be accelerated by the TensorFlow C binary, however it will run tensor operations...
Read more >tensorflow/tfjs-node NPM
TensorFlow backend for TensorFlow.js via Node.js. This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js ...
Read more >@tensorflow/tfjs-node-gpu - npm
Start using @tensorflow/tfjs-node-gpu in your project by running `npm i @tensorflow/tfjs-node-gpu`. There are 64 other projects in the npm ...
Read more >Tensorboard for Tensorflow.JS under Windows 10
Python v3.8.9; Tensorflow v2.5.0; Tensorflow.JS v3.8.0. I'm using @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
@kangyizhang
Okay, i ran
node -p "process.arch"
and gotia32
back. I then reinstalled Node.js 64 bit, ran the command again and gotx64
back. I guess i must have accidentally installed a 32 bit version of node at some point.I then reinstalled
tfjs-node
as well astfjs-node-gpu
which completed without any error.But trying to run either still produced errors. After some testing i found out that everything worked fine in a different directory. After some more testing i found out that a
-
that i had in a part of a directory caused it to fail. Once i removed the-
from the directory everything ran fine.I am a bit confused about how exactly this
-
caused everything to fail. I’ve used the same directory with tfjs-node 1.2.1 a while back and it didn’t cause any errors.Anyhow, thank you very much for helping me figure this out.
I had this same error. I further went to bulid @tensorflow/tfjs-node-gyp using node-gyp configure
which I gues scomes form this part of binding.gyp
which gracking down ‘binding.gyp module name…’ seems to be a problem with node-pre-gyp which doesn’t appear to be a thing…
I saw the other notes, and the WINDOWS _TROUBLESHOOTING.md but really none of that applies, bulding other things with node-gyp works fine but then I don’t use <(module_name).