(modelUrl)
| 37 | const LATENT_DIMS = 2; |
| 38 | |
| 39 | async 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. |