variational-autoencoders¶

A model skeleton for Variational Auto-Encoders (VAE). It was first introduced in the paper titled [Auto-Encoding Variational Bayes](https://arxiv.org/abs/1312.6114) by Diederik P Kingma and Max Welling.

In machine learning, a variational autoencoder, also known as VAE, is the artificial neural network architecture belonging to the families of probabilistic graphical models and variational Bayesian methods.

It is often associated with the autoencoder model because of its architectural affinity, but there are significant differences both in the goal and in the mathematical formulation. Variational autoencoders are meant to compress the input information into a constrained multivariate latent distribution (encoding) to reconstruct it as accurately as possible (decoding). Although this type of model was initially designed for unsupervised learning, its effectiveness has been proven in other domains of machine learning such as semi-supervised learning or supervised learning. - WikiPedia

[1]:
%load_ext autoreload
%autoreload

usage¶

[2]:
import deeply

vae = deeply.hub("convolutional-variational-autoencoder", x = 28)
vae.plot()
type <class 'type'>
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-2d5d37d7540f> in <module>
      1 import deeply
      2
----> 3 vae = deeply.hub("convolutional-variational-autoencoder", x = 28)
      4 vae.plot()

~/dev/deeply/src/deeply/deeply.py in hub(name, *args, **kwargs)
     11     #     kwargs["weights"]     = kwargs.get("weights", DEFAULT["weights"])
     12
---> 13     model = ModelFactory.get(name, *args, **kwargs)
     14
     15     return model

~/dev/deeply/src/deeply/model/factory.py in get(name, *args, **kwargs)
     25         model_class = model["model_class"]
     26
---> 27         return model_class(*args, **kwargs)

~/dev/deeply/src/deeply/model/vae.py in ConvolutionalVAE(*args, **kwargs)
    584     >>> model = deeply.hub("convolutional-variational-autoencoder")
    585     """
--> 586     model = VAE(
    587         name = "convolutional-vae",
    588         layer_block = ConvBlock,

~/dev/deeply/src/deeply/model/vae.py in VAE(x, y, channels, init_units, layer_growth_rate, layer_depth, n_dense, latent_dim, activation, batch_norm, dropout_rate, final_activation, kernel_initializer, name, backbone, backbone_weights, weights, layer_block, kernel_size, strides, n_classes, padding, final_conv_size, final_unit_size, attention_gate, freeze_backbone, *args, **kwargs)
    302
    303     print("type", type(layer_block))
--> 304     print(isinstance(layer_block))
    305
    306     layer_block_args = dict(activation = activation, dropout_rate = dropout_rate, width = n_dense,

TypeError: isinstance expected 2 arguments, got 1
[ ]: