peal.global_utils.replace_relu_with_leakyrelu¶
- peal.global_utils.replace_relu_with_leakyrelu(model)[source]¶
Replace every
ReLUsubmodule by aLeakyReLUwith slope 0.1.- Parameters:
model (
torch.nn.Module) – Model modified in place.- Returns:
The same model, for convenience.
- Return type: