• Version 3.17.0
  • Published
  • 2 MB
  • 8 dependencies
  • Apache-2.0 license


npm i @tensorflow/tfjs-node
yarn add @tensorflow/tfjs-node
pnpm add @tensorflow/tfjs-node


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/).




variable io

const io: {
fileSystem: typeof nodeIo.fileSystem;
nodeHTTPRequest: typeof nodeIo.nodeHTTPRequest;
copyModel: any;
listModels: any;
moveModel: any;
removeModel: any;
browserFiles: any;
browserHTTPRequest: any;
concatenateArrayBuffers: any;
decodeWeights: any;
encodeWeights: any;
fromMemory: any;
getLoadHandlers: (
url: string | string[],
loadOptions?: tf.io.LoadOptions
) => tf.io.IOHandler[];
getModelArtifactsForJSON: any;
getModelArtifactsInfoForJSON: any;
getSaveHandlers: (url: string | string[]) => tf.io.IOHandler[];
http: any;
isHTTPScheme: any;
loadWeights: any;
registerLoadRouter: (loudRouter: any) => void;
registerSaveRouter: (loudRouter: any) => void;
weightsLoaderFactory: any;
withSaveHandler: any;

    variable node

    const node: {
    decodeImage: typeof decodeImage;
    decodeBmp: typeof decodeBmp;
    decodeGif: typeof decodeGif;
    decodePng: typeof decodePng;
    decodeJpeg: typeof decodeJpeg;
    encodeJpeg: typeof encodeJpeg;
    encodePng: typeof encodePng;
    summaryFileWriter: typeof summaryFileWriter;
    tensorBoard: typeof tensorBoard;
    getMetaGraphsFromSavedModel: typeof getMetaGraphsFromSavedModel;
    getNumOfSavedModels: typeof getNumOfSavedModels;
    loadSavedModel: typeof loadSavedModel;

      variable version

      const version: {
      'tfjs-node': string;
      'tfjs-core': string;
      'tfjs-backend-cpu': string;
      'tfjs-backend-webgl': string;
      'tfjs-data': string;
      'tfjs-layers': string;
      'tfjs-converter': string;
      tfjs: string;

        Package Files (2)

        Dependencies (8)

        Dev Dependencies (17)

        Peer Dependencies (0)

        No peer dependencies.


        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@tensorflow/tfjs-node.

        • Markdown
        • HTML
          <a href="https://www.jsdocs.io/package/@tensorflow/tfjs-node"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>