JSPM

  • Created
  • Published
  • Downloads 304130
  • Score
    100M100P100Q208734F
  • License Apache-2.0

Vanilla JavaScript backend for TensorFlow.js

Package Exports

  • @tensorflow/tfjs-backend-cpu
  • @tensorflow/tfjs-backend-cpu/dist/base
  • @tensorflow/tfjs-backend-cpu/dist/base.js
  • @tensorflow/tfjs-backend-cpu/dist/index.js
  • @tensorflow/tfjs-backend-cpu/dist/shared
  • @tensorflow/tfjs-backend-cpu/dist/shared.js
  • @tensorflow/tfjs-backend-cpu/dist/tf-backend-cpu.node.js
  • @tensorflow/tfjs-backend-cpu/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tensorflow/tfjs-backend-cpu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Usage

This package implements a JavaScript based CPU backend to TensorFlow.js.

Importing the backend

Note: this backend is included by default in @tensorflow/tfjs.

Via NPM

// Import @tensorflow/tfjs-core
import * as tf from '@tensorflow/tfjs-core';
// Adds the CPU backend to the global backend registry.
import '@tensorflow/tfjs-backend-cpu';

Via a script tag

<!-- Import @tensorflow/tfjs-core -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core"></script>

<!-- Adds the CPU backend to the global backend registry -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-cpu"></script>

You can also get ES2017 code using the following links

<!-- Import @tensorflow/tfjs-core -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-core@2.0.0-rc.4/dist/tf-core.es2017.js"></script>

<!-- Adds the CPU backend to the global backend registry -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-cpu@2.0.0-rc.4/dist/tf-backend-cpu.es2017.js"></script>