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

x/netsaur/mod.ts>Tensor#toJSON

Powerful Powerful Machine Learning library with GPU, CPU and WASM backends
Latest
method Tensor.prototype.toJSON
Re-export
import { Tensor } from "https://deno.land/x/netsaur@0.4.2/mod.ts";

Serialise a tensor into JSON.

tensor([1, 2, 3, 4], [2, 2]).toJSON();

Returns

{ data: number[]; shape: Shape<R>; }