Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 680 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 680 Bytes

Capacitor File System

Custom IOHandler for TensorFlow.js that uses Capacitor's File System. Based on https://www.tensorflow.org/js/guide/save_load.

Example Usage

import * as tf from '@tensorflow/tfjs';

// Load
const customFileSystem = new CapacitorFileSystem(modelReference);
this.userModel = await tf.loadLayersModel(customFileSystem);

// Save
const customFileSystem = new CapacitorFileSystem(modelReference);
model.save(customFileSystem);

Where modelReference is a valid path accepted by Capacitor's File System plugin.