layer_spline: Wrapper function to create spline layer

View source: R/psplinelayer.R

layer_splineR Documentation

Wrapper function to create spline layer

Description

Wrapper function to create spline layer

Usage

layer_spline(
  object,
  name = NULL,
  trainable = TRUE,
  input_shape,
  regul = NULL,
  Ps,
  use_bias = FALSE,
  kernel_initializer = "glorot_uniform",
  bias_initializer = "zeros",
  variational = FALSE,
  posterior_fun = NULL,
  diffuse_scale = 1000,
  output_dim = 1L,
  k_summary = k_sum,
  ...
)

Arguments

object

or layer object.

name

An optional name string for the layer (should be unique).

trainable

logical, whether the layer is trainable or not.

input_shape

Input dimensionality not including samples axis.

regul

if set to 0, no regularization is applied

Ps

list of penalty matrices times lambdas

use_bias

whether or not to use a bias in the layer. Default is FALSE.

kernel_initializer

function to initialize the kernel (weight). Default is "glorot_uniform".

bias_initializer

function to initialize the bias. Default is 0.

variational

logical, if TRUE, priors corresponding to the penalties and posteriors as defined in posterior_fun are created

posterior_fun

function defining the variational posterior

diffuse_scale

diffuse scale prior for scalar weights

output_dim

the number of units for the layer

k_summary

keras function for the penalty (see ?deepregression for details)

...

further arguments passed to args used in create_layer


davidruegamer/deepregression documentation built on May 30, 2022, 6:21 p.m.