// or use requireimport AiMR_GAN from "@aimr/asmr-gan-lib";// import some version of tensorflow in any way you'd likeimport * as tf from "@tensorflow/tfjs";// load the model and/or cache it for subsequent reloads.await AiMR_GAN.load(tf);// generate some fake Asmr Imagesconsole.log(await AiMR_GAN.generateChunks(1)); Copy
// or use requireimport AiMR_GAN from "@aimr/asmr-gan-lib";// import some version of tensorflow in any way you'd likeimport * as tf from "@tensorflow/tfjs";// load the model and/or cache it for subsequent reloads.await AiMR_GAN.load(tf);// generate some fake Asmr Imagesconsole.log(await AiMR_GAN.generateChunks(1));
Static
Private
Cache the loaded pre-trained model for later use.
Cached differently depending on the execution context.
When called before model is loaded.
When called after model is already cached before.
This function will generate chunk(s) of images
Optional
Integer >= 1. How many chunks to generate.
Array with length of chunks where each element is a Uint8Array of image data.
Call this to load the pre-trained model into the library.
Dependency injection tensorflow instance.
This function will try to load a cached version before fetching the last public version.
Generated using TypeDoc
Example