Skip to content

Instantly share code, notes, and snippets.

@Nithanaroy
Created February 21, 2020 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nithanaroy/b5eb57e2e820be5e3c4cc3e4c833e65d to your computer and use it in GitHub Desktop.
Save Nithanaroy/b5eb57e2e820be5e3c4cc3e4c833e65d to your computer and use it in GitHub Desktop.
Visualize Model Summary in DOM by restoring the model from IndexedDB
class VisionModel {
// ... other methods
async run({ batchSize = 1024, epochs = 1, trainExisting = true } = {}) {
// ... same as before
await this.visionModelWorker.create(true);
const modelInstance = await tf.loadLayersModel(Constants.MODEL_DISK_PATH());
tfvis.show.modelSummary(this.tensorboardDiv, modelInstance);
// ... training callbacks like before
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment