Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nnf_selu

Selu


Description

Applies element-wise,

SELU(x) = scale * (max(0,x) + min(0, α * (exp(x) - 1)))

, with α=1.6732632423543772848170429916717 and scale=1.0507009873554804934193349852946.

Usage

nnf_selu(input, inplace = FALSE)

nnf_selu_(input)

Arguments

input

(N,*) tensor, where * means, any number of additional dimensions

inplace

can optionally do the operation in-place. Default: FALSE

Examples

if (torch_is_installed()) {
x <- torch_randn(2, 2)
y <- nnf_selu(x)
nnf_selu_(x)
torch_equal(x, y)

}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.