chemprop.nn.utils#

Module Contents#

Classes#

Activation

Enum where members are also (and must be) strings

Functions#

get_activation_function(activation)

Gets an activation function module given the name of the activation.

class chemprop.nn.utils.Activation[source]#

Bases: chemprop.utils.utils.EnumMapping

Enum where members are also (and must be) strings

RELU#
LEAKYRELU#
PRELU#
TANH#
SELU#
ELU#
chemprop.nn.utils.get_activation_function(activation)[source]#

Gets an activation function module given the name of the activation.

See Activation for available activations.

Parameters:

activation (str | Activation) – The name of the activation function.

Returns:

The activation function module.

Return type:

nn.Module