MixtureDensityNetworkLayer: Mixture density network layer

MixtureDensityNetworkLayerR Documentation

Mixture density network layer

Description

Mixture density network layer

Value

A Keras Layer

Arguments

outputDimension
numberOfMixtures

Details

$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

Author(s)

Tustison NJ

Examples

MixtureDensityNetworkLayer$new(outputDimension = c(50, 48),
 numberOfMixtures = 3)


ANTsX/ANTsRNet documentation built on March 27, 2024, 4:26 a.m.