MixtureDensityNetworkLayer | R Documentation |
Mixture density network layer
A Keras Layer
$initialize
instantiates a new class.
$call
main body.
$compute_output_shape
computes the output shape.
Create custom density layers for each parameter of the mixed Gaussians. (mu, sigma, pi). I could not get the approach from the original implementation to work:
https://github.com/cpmpercussion/keras-mdn-layer/blob/master/mdn/init.py#L28-L73
where the author used the keras dense layers to create the custom MDN layer and assign the trainable weights directly thus circumventing the add_weight() function. Instead, I recreated dense layer functionality using the keras definition here:
https://github.com/keras-team/keras/blob/master/keras/layers/core.py#L796-L937
Tustison NJ
MixtureDensityNetworkLayer$new(outputDimension = c(50, 48),
numberOfMixtures = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.