ScaleLayer: Custom scale layer

ScaleLayerR Documentation

Custom scale layer

Description

Custom scale layer

Value

A keras layer

Arguments

axis

integer specifying which axis to normalize.

momentum

momentum value used for computation of the exponential average of the mean and standard deviation.

input_shape

Dimensionality of the input (integer) not including the samples axis.

Details

$initialize instantiates a new class.

$call main body.

$compute_output_shape computes the output shape.

Author(s)

Tustison NJ

Examples

library(keras)
inputImageSize = c( 256L, 256L, 1L )
inputs <- keras::layer_input( shape = inputImageSize )
outputs <- inputs %>% layer_zero_padding_2d( padding = c( 3L, 3L ) )
layer_scale = ANTsRNet:::layer_scale
outputs = outputs %>%
  layer_scale(axis = -1L)
lay = ScaleLayer$new()
## Not run: 
lay$build(input_shape = inputImageSize)

## End(Not run)

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