Use it in a browser:

<script src="//propelml.org/propel-3.0.min.js"></script>

Or to use it in Node:

npm install propel

In both environments Propel is able to use GPU hardware for computations. In Node it uses native TensorFlow bindings, in the browser it uses WebGL.

Here is an example of the API. Plotting the function tanh() between the points -4 and 4.

import { linspace } from "propel"; import { plot } from "matplotlib"; x = linspace(-4, 4, 200); plot(x, x.tanh())
-4 -3 -2 -1 0 1 2 3 4 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

The library exposes backprop as a low-level function called grad(). This grad function, along with the ability to utilize GPUs, provides a foundation on which modern neural network model can be built.

import { grad } from "propel"; f = x => x.tanh(); g = grad(f); plot(x, f(x), x, g(x))
-4 -3 -2 -1 0 1 2 3 4 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

See more examples in Notebook.