diff --git a/Autoencoder/README.md b/Autoencoder/README.md index c1a8524..64eded3 100755 --- a/Autoencoder/README.md +++ b/Autoencoder/README.md @@ -5,13 +5,15 @@ ## Features +- `Autoencoder is densenet layered with batchnorm layers and multiple skip connections` + - `Select the structure for the DenseNet and see the performance of the model. ` - `Sample autoencoded MNIST Digits can be seen` - `2D Visualize the encoded space of the autoencoder, see the decoded digit for the corresponding latent point` -- `Autoencode your digit drawing` +- `Autoencode your own digit drawing` ## Installation and execution diff --git a/Autoencoder/index.html b/Autoencoder/index.html index 6e84c06..dd3f276 100644 --- a/Autoencoder/index.html +++ b/Autoencoder/index.html @@ -49,25 +49,28 @@ } - +

TensorFlow.js: MNIST Autoencoder

TensorFlow.js: MNIST Autoencoder


- - + +
-

Train a model to autoencode handwritten digits from the MNIST database using the tf.layers - api. -
- This examples lets you train a MNIST Autoencoder using a Fully Connected Neural Network (also known as a DenseNet).

+

+ This examples lets you train a MNIST Autoencoder using a Fully Connected Neural Network (also known as a DenseNet) in written in Tfjs

You can select the structure for the DenseNet and see the performance of the model.
The MNIST dataset is used as training data. +
+
+ Set latent space dimension to 2 for 2d Exploration of the latent space. Otherwise set it high for accurate autoencoding +
+ Visualization scale determines the scale of 2d pane

- - + +

@@ -76,7 +79,7 @@

Trainin
- +
@@ -88,7 +91,7 @@

Trainin

- +
@@ -96,7 +99,7 @@

Trainin

- +
@@ -104,13 +107,13 @@

Trainin

- +

- - + +
@@ -124,11 +127,11 @@

This will show the examples of autoencoder once it its trained




- - + +
-

This is for 2d plot visualization of latent space of autoencoder.
If your latent space dimension is set to 2D

+

This is for 2d plot visualization of latent space of autoencoder.
Drag in the 2d Pane below slowly

- - + + diff --git a/Autoencoder/index.js b/Autoencoder/index.js index 9a03035..0ff60bc 100644 --- a/Autoencoder/index.js +++ b/Autoencoder/index.js @@ -8,52 +8,63 @@ // for arbitrary data though. It's worth a look :) import {IMAGE_H, IMAGE_W, MnistData} from './datas.js'; -// This is a helper class for drawing loss graphs and MNIST images to the -// window. For the purposes of understanding the machine learning bits, you can -// largely ignore it import * as ui from './ui.js'; -function createConvModel(n_layers,n_units,hidden) { - +function createConvModel(n_layers,n_units,hidden) { //resnet-densenet-batchnorm this.latent_dim = Number(hidden); //final dimension of hidden layer this.n_layers = Number(n_layers); //how many hidden layers in encoder and decoder this.n_units = Number(n_units); //output dimension of each layer this.img_shape = [28,28]; this.img_units = this.img_shape[0] * this.img_shape[1]; // build the encoder + var i = tf.input({shape: this.img_shape}); var h = tf.layers.flatten().apply(i); - - for (var j=0; j