Custom scale layer
A keras layer
integer specifying which axis to normalize.
momentum value used for computation of the exponential average of the mean and standard deviation.
Dimensionality of the input (integer) not including the samples axis.
$initialize
instantiates a new class.
$call
main body.
$compute_output_shape
computes the output shape.
Tustison NJ
library(keras) inputImageSize = c( 256L, 256L, 1L ) inputs <- keras::layer_input( shape = inputImageSize )#> Error in py_discover_config(required_module, use_environment): Python specified in RETICULATE_PYTHON (/Users/ntustison/anaconda3/envs/antsx/bin/python3) does not exist#> Error in py_discover_config(required_module, use_environment): Python specified in RETICULATE_PYTHON (/Users/ntustison/anaconda3/envs/antsx/bin/python3) does not existlayer_scale = ANTsRNet:::layer_scale outputs = outputs %>% layer_scale(axis = -1L)#> Error in py_discover_config(required_module, use_environment): Python specified in RETICULATE_PYTHON (/Users/ntustison/anaconda3/envs/antsx/bin/python3) does not existlay = ScaleLayer$new() if (FALSE) { lay$build(input_shape = inputImageSize) }