you can create a dictionary with several activation function mappings:
activations = {
    'relu': nn.ReLU()
    'sigmoid': nn.Sigmoid(),
    'tanh': nn.Tanh()
}

and then call
activation_function = activations[activation_string]
u = activation_function(v)