Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@tensorflow/tfjs-node
Advanced tools
TensorFlow.js for Node currently supports the following platforms:
Other Linux variants might also work but this project matches core TensorFlow installation requirements.
npm install @tensorflow/tfjs-node
(or)
yarn add @tensorflow/tfjs-node
npm install @tensorflow/tfjs-node-gpu
(or)
yarn add @tensorflow/tfjs-node-gpu
Windows build support for node-gyp
requires Python 2.7. Be sure to have this version before installing @tensorflow/tfjs-node
or @tensorflow/tfjs-node-gpu
. Machines with Python 3.x will not install the bindings properly.
For more troubleshooting on Windows, check out WINDOWS_TROUBLESHOOTING.md.
If you do not have Xcode setup on your machine, please run the following commands:
$ xcode-select --install
After that operation completes, re-run yarn add
or npm install
for the @tensorflow/tfjs-node
package.
You only need to include @tensorflow/tfjs-node
or @tensorflow/tfjs-node-gpu
in the package.json file, since those packages ship with @tensorflow/tfjs
already.
Before executing any TensorFlow.js code, import the node package:
// Load the binding
import * as tf from '@tensorflow/tfjs-node';
// Or if running with GPU:
import * as tf from '@tensorflow/tfjs-node-gpu';
Note: you do not need to add the @tensorflow/tfjs
package to your dependencies or import it directly.
# Download and install JS dependencies, including libtensorflow 1.8.
yarn
# Run TFJS tests against Node.js backend:
yarn test
# Switch to GPU for local development:
yarn enable-gpu
See the tfjs-examples repository for training the MNIST dataset using the Node.js bindings.
This requires installing bazel first.
bazel build --config=monolithic //tensorflow/tools/lib_package:libtensorflow
FAQs
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the TensorFlow C binary under the hood. It provides the same API as [TensorFlow.js](https://js.tensorflow.org/api/latest/).
The npm package @tensorflow/tfjs-node receives a total of 35,329 weekly downloads. As such, @tensorflow/tfjs-node popularity was classified as popular.
We found that @tensorflow/tfjs-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.