get_pycox_activation {survivalmodels}R Documentation

Get Pytorch Activation Function

Description

Helper function to return a class or constructed object for pytorch activation function from torch.nn.modules.activation.

Usage

get_pycox_activation(
  activation = "relu",
  construct = TRUE,
  alpha = 1,
  dim = NULL,
  lambd = 0.5,
  min_val = -1,
  max_val = 1,
  negative_slope = 0.01,
  num_parameters = 1L,
  init = 0.25,
  lower = 1/8,
  upper = 1/3,
  beta = 1,
  threshold = 20,
  value = 20
)

Arguments

activation

(character(1))
Activation function method, see details for list of implemented methods.

construct

(logical(1))
If TRUE (default) returns constructed object, otherwise a class.

alpha

(numeric(1))
Passed to celu and elu.

dim

(integer(1))
Passed to glu, logsoftmax, softmax, and

lambd

(numeric(1))
Passed to hardshrink and softshrink.

min_val, max_val

(numeric(1))
Passed to hardtanh.

negative_slope

(numeric(1))
Passed to leakyrelu.

num_parameters

(integer(1))
Passed to prelu.

init

(numeric(1))
Passed to prelu.

lower, upper

(numeric(1))
Passed to rrelu.

beta

(numeric(1))
Passed to softplus.

threshold

(numeric(1))
Passed to softplus and threshold.

value

(numeric(1))
Passed to threshold.

Details

Implemented methods (with help pages) are

Value

No return value.


[Package survivalmodels version 0.1.191 Index]