tensorset
v1.2.9
Published
TensorflowJS Dataset parsing and stringifying
Downloads
52
Maintainers
Readme
Tensorset
TensorflowJS Dataset parsing and stringifying
Installation
npm install tensorset # or yarn add tensorset
Getting Started
// CommonJS
const Tensorset = require('tensorset');
// Or ES Modules
import Tensorset from "tensorset/lib/Tensorset";
parse (sync)
Parse stringified version of Tensorset generated by Tensorset.stringify
const dataset = Tensorset.parse(data);
| Parameter | Type | Description | Required |
| :-------: | :------: | :---------------------------------------------------------------------------- | :------: |
| data | String | Stringified tensorset file generated with assistance of Tensorset.stringify
| True |
stringify (async)
Stringify tensorsets supplied by TensorflowJS models via the getClassifierDataset
method in knnClassifier
const data = await Tensorset.stringify(dataset);
| Parameter | Type | Description | Required |
| :-------: | :------: | :--------------------------------------- | :------: |
| dataset | Object | JSON parsed version of Tensorset.parse
| True |