Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netsaur/web.ts>Tensor

Powerful machine learning, accelerated by WebGPU
Go to Latest
class Tensor
Re-export
import { Tensor } from "https://deno.land/x/netsaur@0.2.6/web.ts";

A generic N-dimensional tensor.

Constructors

new
Tensor(data: Float32Array, shape: Shape[R])

Type Parameters

R extends Rank

Properties

data: Float32Array
shape: Shape[R]

Methods

Serialise a tensor into JSON.

Static Methods

fromJSON(tensor: TensorJSON): Tensor<Rank>

Deserialise a tensor from JSON.

zeroes<R extends Rank>(shape: Shape[R]): Tensor<R>

Creates an empty tensor.