TensorflowJS Dataset parsing and stringifying
npm install tensorset


TensorflowJS Dataset parsing and stringifying
npm install tensorset # or yarn add tensorset
javascript
// 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
`JavaScript
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
`JavaScript
const data = await Tensorset.stringify(dataset);
`
| Parameter | Type | Description | Required |
| :-------: | :------: | :--------------------------------------- | :------: |
| dataset | Object | JSON parsed version of Tensorset.parse` | True |