Socket
Socket
Sign inDemoInstall

@tensorflow/tfjs-core

Package Overview
Dependencies
13
Maintainers
10
Versions
182
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tensorflow/tfjs-core

Hardware-accelerated JavaScript library for machine intelligence


Version published
Weekly downloads
251K
increased by1.68%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

TensorFlow.js Core API

A part of the TensorFlow.js ecosystem, this repo hosts @tensorflow/tfjs-core, the TensorFlow.js Core API, which provides low-level, hardware-accelerated linear algebra operations and an eager API for automatic differentiation.

Check out js.tensorflow.org for more information about the library, tutorials and API docs.

To keep track of issues we use the tensorflow/tfjs Github repo.

Importing

You can install TensorFlow.js via yarn or npm. We recommend using the @tensorflow/tfjs npm package, which gives you both this Core API and the higher-level Layers API:

import * as tf from '@tensorflow/tfjs';
// You have the Core API: tf.matMul(), tf.softmax(), ...
// You also have Layers API: tf.model(), tf.layers.dense(), ...

On the other hand, if you care about the bundle size and you do not use the Layers API, you can import only the Core API:

import * as tfc from '@tensorflow/tfjs-core';
// You have the Core API: tfc.matMul(), tfc.softmax(), ...
// No Layers API.

Note: If you are only importing the Core API, you also need to import a backend (e.g., tfjs-backend-cpu, tfjs-backend-webgl, tfjs-backend-wasm).

For info about development, check out DEVELOPMENT.md.

For more information

Thanks BrowserStack for providing testing support.

FAQs

Last updated on 05 Dec 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc