get_keras_optimizer: Get Keras Optimizer

View source: R/helpers_keras.R

get_keras_optimizerR Documentation

Get Keras Optimizer

Description

Utility function to construct optimiser from keras, primarily for internal use.

Usage

get_keras_optimizer(
  optimizer = "adam",
  lr = 0.001,
  beta_1 = 0.9,
  beta_2 = 0.999,
  epsilon = 1e-07,
  decay = NULL,
  clipnorm = NULL,
  clipvalue = NULL,
  momentum = 0,
  nesterov = FALSE,
  rho = 0.95,
  global_clipnorm = NULL,
  use_ema = FALSE,
  ema_momentum = 0.99,
  ema_overwrite_frequency = NULL,
  jit_compile = TRUE,
  initial_accumultator_value = 0.1,
  amsgrad = FALSE,
  lr_power = -0.5,
  l1_regularization_strength = 0,
  l2_regularization_strength = 0,
  l2_shrinkage_regularization_strength = 0,
  beta = 0,
  centered = FALSE
)

Arguments

optimizer

(character(1))
Optimizer to construct, see details for those available. Default is "adam".

lr

(numeric(1))
Learning rate passed to all optimizers.

beta_1, beta_2

(numeric(1))
Passed to adamax, adam, and nadam.

epsilon

(numeric(1))
Passed to adadelta, adagrad, adam, adamax, nadam, rmsprop

decay, clipnorm, clipvalue, global_clipnorm

(numeric(1))
Passed to all optimizers.

momentum

(numeric(1))
Passed to rmsprop and sgd.

nesterov

(logical(1))
Passed to sgd.

rho

(numeric(1))
Passed to adadelta and rmsprop.

use_ema, jit_compile

(logical(1))
Passed to all optimizers.

ema_momentum, ema_overwrite_frequency

(numeric(1))
Passed to all optimizers.

initial_accumultator_value

(numeric(1))
Passed to adagrad and ftrl.

amsgrad

(logical(1))
Passed to adam and sgd.

lr_power, l1_regularization_strength, l2_regularization_strength, l2_shrinkage_regularization_strength, beta

(numeric(1))
Passed to ftrl.

centered

(logical(1))
Passed to rmsprop.

Details

Implemented optimizers are

  • "adadelta"
    keras::optimizer_adadelta

  • "adagrad"
    keras::optimizer_adagrad

  • "adam"
    keras::optimizer_adam

  • "adamax"
    keras::optimizer_adamax

  • "ftrl"
    keras::optimizer_ftrl

  • "nadam"
    keras::optimizer_nadam

  • "rmsprop"
    keras::optimizer_rmsprop

  • "sgd"
    keras::optimizer_sgd

Value

No return value.


survivalmodels documentation built on May 29, 2024, 7:26 a.m.