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

Tustison NJ

Examples

MixtureDensityNetworkLayer$new(outputDimension = c(50, 48), numberOfMixtures = 3)
#> Error in py_discover_config(required_module, use_environment): Python specified in RETICULATE_PYTHON (/Users/ntustison/anaconda3/envs/antsx/bin/python3) does not exist