Comments (4)
Thank you for bringing this issue to our attention and I would suggest you to please follow below steps with Node v19.9.0 and different Python versions like 3.6, 3.7, 3.8, 3.9,3.10 or 3.11
, if it did not work then please try with this specific versions Node v18.16.1, Pyhton 3.9.13, node-gyp 10.0.1, npm 9.5.1
and it should work
- Step 1-: Create new folder and move to that folder by using cd folder_name then run command npm init -y it will create empty Node.js project
- Step 2-:
npm install -g node-gyp
Orsudo npm install -g node-gyp
- Step 3-: Download the Visual Studio Build Tools and select the Desktop development C++ (keep it default settings option)
- Step 4 -:
node-gyp configure --msvs_version=2017
Orsudo node-gyp configure --msvs_version=2017
(run this command and replace--msvs_version
value with your downloaded Visual Studio build tool version) - Step 5-:
set npm_config_python="C:\path\to\python.exe"
Orsudo set npm_config_python="C:\path\to\python.exe
(Replace your python.exe path in double quotes ) - Step 6-: go to your project directory and try to install (
npm install @tensorflow/tfjs-node
Orsudo npm install @tensorflow/tfjs-node
)
tfjs-node
requires AVX processors and tfjs-node library uses AVX instructions to improve the performance of its operations. If your CPU does not support AVX, as far I know you will not be able to use tfjs-node
if I'm not wrong so to check AVX support please follow below steps
- Right-click on the Start button and select "System Information."
- Expand the "Processor" category in the left-hand pane.
- Look for "Instruction Set" or "Extended Instructions" in the right-hand pane. If AVX is supported, you should see it listed there (e.g., "AVX2").
I tried from my end and tfjs-node
installing successfully and I ran sample model training code and it's working as expected, for your reference I have added output log below :
PS C:\Users\gaikwadrahul\Desktop\test-8202> node -v
v19.9.0
PS C:\Users\gaikwadrahul\Desktop\test-8202> npm -v
9.6.3
PS C:\Users\gaikwadrahul\Desktop\test-8202> python
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
PS C:\Users\gaikwadrahul\Desktop\test-8202> npm init -y
PS C:\Users\gaikwadrahul\Desktop\test-8202> npm install -g node-gyp
changed 101 packages in 12s
PS C:\Users\gaikwadrahul\Desktop\test-8202> npm install @tensorflow/tfjs-node
up to date, audited 122 packages in 1s
9 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS C:\Users\gaikwadrahul\Desktop\test-8202> node .\index.js
2024-03-18 12:04:54.474812: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Epoch 1 / 10
eta=0.0 ==================================================================================>
3073ms 307us/step - MAE=0.327 loss=0.166 val_MAE=0.303 val_loss=0.138
Epoch 2 / 10
eta=0.0 ==================================================================================>
2017ms 202us/step - MAE=0.277 loss=0.110 val_MAE=0.259 val_loss=0.0947
Epoch 3 / 10
eta=0.0 ==================================================================================>
2126ms 213us/step - MAE=0.261 loss=0.0944 val_MAE=0.252 val_loss=0.0883
Epoch 4 / 10
eta=0.0 ==================================================================================>
2123ms 212us/step - MAE=0.253 loss=0.0875 val_MAE=0.247 val_loss=0.0837
Epoch 5 / 10
eta=0.0 ==================================================================================>
1960ms 196us/step - MAE=0.250 loss=0.0851 val_MAE=0.243 val_loss=0.0803
Epoch 6 / 10
eta=0.0 ==================================================================================>
2440ms 244us/step - MAE=0.250 loss=0.0847 val_MAE=0.244 val_loss=0.0814
Epoch 7 / 10
eta=0.0 ==================================================================================>
1754ms 175us/step - MAE=0.249 loss=0.0843 val_MAE=0.296 val_loss=0.131
Epoch 8 / 10
eta=0.0 ==================================================================================>
2062ms 206us/step - MAE=0.248 loss=0.0838 val_MAE=0.242 val_loss=0.0793
Epoch 9 / 10
eta=0.0 ==================================================================================>
1721ms 172us/step - MAE=0.249 loss=0.0841 val_MAE=0.242 val_loss=0.0792
Epoch 10 / 10
eta=0.0 ==================================================================================>
1703ms 170us/step - MAE=0.248 loss=0.0837 val_MAE=0.246 val_loss=0.0825
PS C:\Users\gaikwadrahul\Desktop\test-8202>
Thank you for your understanding and patience.
from tfjs.
To confirm, were you able to successfully install tfjs-node
on your Windows
system by following the provided instructions and workaround? If the installation was successful and able to run your code without any errors , please feel free to close this issue.
If you're still encountering problems, please provide us with a new error log and your code snippet after attempting the instructions and workaround. This will help us investigate the issue further on our end.
Thank you for your cooperation and patience in resolving this matter.
from tfjs.
Yes all issues resolved.
Thanks.👍❤️❤️
from tfjs.
Are you satisfied with the resolution of your issue?
Yes
No
from tfjs.
Related Issues (20)
- `tfjs-models/face-landmarks-detection`: `keypoint` `291` missing in `MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR.lips` HOT 2
- Tensorflow model is working in python but converted tfjs model is not working HOT 7
- tidy function erase tensor before it can be used HOT 5
- `tf.einsum` appears incorrect for some cases HOT 2
- Installing tensorflow/tfjs-node fails on macOS Sonoma (14.3) on Apple Silicon ("Command failed: node-pre-gyp install --fallback-to-build HOT 11
- Tensorflow.js Converter: Usage of `save_format` when converting to graph model causes error on Keras 3 HOT 1
- [Codelab]: Making Predictions from 2D Data HOT 4
- Docs/readme left unfinished for model "face-landmarks-detection" HOT 4
- Error dumping weights duplicate weight name kernel HOT 9
- Loading movenet gives Uncaught (in promise) TypeError: Failed to fetch HOT 15
- Next.js Cannot get final name for export 'transposeImplCPU' error HOT 2
- Tensors are leaked when `model.save()` includes the optimizer HOT 3
- Load and save model issue HOT 5
- [Codelab]: Making Predictions from 2D Data HOT 4
- Duplicate weight problem HOT 7
- The if statement refers to `bias.shape.length`, but the error message refers to `kernel.shape.length` HOT 6
- Question: is the Windows tensorflow binary / dll used in tfjs-node compiled with support for zenDNN optimisations? HOT 2
- Standard layers (like `tf.layers.dense`) fail to report their trainable weights, when used from within a custom layer HOT 2
- Error installing @tensorflow/tfjs-node at WSL Ubuntu HOT 3
- Bug when stacking LSTM HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tfjs.