MCPcopy
hub / github.com/tensorflow/tfjs-examples / loadModel

Function loadModel

fashion-mnist-vae/client.js:39–49  ·  view source on GitHub ↗
(modelUrl)

Source from the content-addressed store, hash-verified

37const LATENT_DIMS = 2;
38
39async function loadModel(modelUrl) {
40 const decoder = await tf.loadLayersModel(modelUrl);
41
42 const queryString = window.location.search.substring(1);
43 if (queryString.match('debug')) {
44 tfvis.show.modelSummary({name: 'decoder'}, decoder);
45 tfvis.show.layer({name: 'dense2'}, decoder.getLayer('dense_Dense2'));
46 tfvis.show.layer({name: 'dense3'}, decoder.getLayer('dense_Dense3'));
47 }
48 return decoder;
49}
50
51/**
52 * Generates a representation of a latent space.

Callers 2

client.jsFile · 0.70
mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected