Learn R Programming

RBERT (version 0.1.11)

get_activation: Map a string to a Python function

Description

Example: "relu" => `tensorflow::tf$nn$relu`.

Usage

get_activation(activation_string)

Arguments

activation_string

String name of the activation function.

Value

A function corresponding to the activation function. If activation_string is NA, empty, or "linear", this will return NA. If activation_string is not a string, it will return activation_string.

Examples

Run this code
# NOT RUN {
get_activation("gelu")
# }

Run the code above in your browser using DataLab