layer_instance_normalization: Instance normalization layer

View source: R/customNormalizationLayers.R

layer_instance_normalizationR Documentation

Instance normalization layer

Description

Creates an instance normalization layer

Usage

layer_instance_normalization(
  object,
  axis = NULL,
  epsilon = 0.001,
  center = TRUE,
  scale = TRUE,
  betaInitializer = "zeros",
  gammaInitializer = "ones",
  betaRegularizer = NULL,
  gammaRegularizer = NULL,
  betaConstraint = NULL,
  gammaConstraint = NULL,
  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.

axis

Integer specifying which axis should be normalized, typically the feature axis. For example, after a Conv2D layer with channels_first, set axis = 1. Setting axis=-1L will normalize all values in each instance of the batch. Axis 0 is the batch dimension for tensorflow backend so we throw an error if axis = 0.

epsilon

Small float added to the variance to avoid dividing by 0.

center

If TRUE, add beta offset to normalized tensor.

scale

If TRUE, multiply by gamma.

betaInitializer

Intializer for the beta weight.

gammaInitializer

Intializer for the gamma weight.

betaRegularizer

Regularizer for the beta weight.

gammaRegularizer

Regularizer for the gamma weight.

betaConstraint

Optional constraint for the beta weight.

gammaConstraint

Optional constraint for the gamma weight.

trainable

Whether the layer weights will be updated during training.

Value

a keras layer tensor

Author(s)

Tustison NJ


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