layer_mixture_density: Mixture density layer

View source: R/mixtureDensityUtilities.R

layer_mixture_densityR Documentation

Mixture density layer

Description

Wraps a custom mixture density layer.

Usage

layer_mixture_density(
  object,
  outputDimension,
  numberOfMixtures,
  trainable = TRUE
)

Arguments

object

Object to compose layer with. This is either a keras::keras_model_sequential to add the layer to, or another Layer which this layer will call.

outputDimension

output dimension

numberOfMixtures

number of Gaussians used to model the function

trainable

Whether the layer weights will be updated during training.

Value

a keras layer tensor

Examples

## Not run: 
model <- keras_model_sequential()
inputShape = c(20, 20, 1)
model = model %>%
  layer_conv_2d(filters = 32, kernel_size = c(3,3), activation = 'relu',
                input_shape = inputShape)
model %>%
  layer_mixture_density(outputDimension = c(18, 18),
  numberOfMixtures = 3)
 
## End(Not run)

ANTsX/ANTsRNet documentation built on April 28, 2024, 12:16 p.m.