peal.global_utils.replace_relu_with_leakyrelu

peal.global_utils.replace_relu_with_leakyrelu(model)[source]

Replace every ReLU submodule by a LeakyReLU with slope 0.1.

Parameters:

model (torch.nn.Module) – Model modified in place.

Returns:

The same model, for convenience.

Return type:

torch.nn.Module