def get_activation(activation):
    if isinstance(activation, str):
        if (activation.lower() == 'relu'):
            return nn.ReLU()
        elif (activation.lower() == 'sigmoid'):
            return nn.Sigmoid()
        elif (activation.lower() == 'tanh'):
            return nn.Tanh()
        else:
            return getattr(nn, activation)()
    else:
        return activation
def get_activation(activation):
    if isinstance(activation, str):
        if (activation.lower() == 'relu'):
            return nn.ReLU()
        elif (activation.lower() == 'sigmoid'):
            return nn.Sigmoid()
        elif (activation.lower() == 'tanh'):
            return nn.Tanh()
        else:
            return getattr(nn, activation)()
    else:
        return activation