towhee.models.vis4mer.linearactivation.LinearActivation

towhee.models.vis4mer.linearactivation.LinearActivation(d_input, d_output, bias=True, zero_bias_init=False, transposed=False, initializer=None, activation=None, activate=False, weight_norm=False, **kwargs)[source]

generate activation module :param d_input: input dimension :type d_input: int :param d_output: output dimension :type d_output: int :param bias: bias :type bias: bool :param zero_bias_init: bias :type zero_bias_init: bool :param transposed: transposed :type transposed: bool :param initializer: initializer :type initializer: str :param activation: activation :type activation: str :param activate: activation :type activate: str :param weight_norm: weight normalization :type weight_norm: bool

return: a linear nn.Module with control over axes order, initialization, and activation