henry000 commited on
Commit
4d14abc
·
1 Parent(s): 9beb383

⚡️ [Update] add activation function -> inplace

Browse files
Files changed (1) hide show
  1. yolo/tools/module_helper.py +1 -1
yolo/tools/module_helper.py CHANGED
@@ -31,7 +31,7 @@ def get_activation(activation: str) -> nn.Module:
31
  if isinstance(obj, type) and issubclass(obj, nn.Module)
32
  }
33
  if activation.lower() in activation_map:
34
- return activation_map[activation.lower()]()
35
  else:
36
  raise ValueError(f"Activation function '{activation}' is not found in torch.nn")
37
 
 
31
  if isinstance(obj, type) and issubclass(obj, nn.Module)
32
  }
33
  if activation.lower() in activation_map:
34
+ return activation_map[activation.lower()](inplace=True)
35
  else:
36
  raise ValueError(f"Activation function '{activation}' is not found in torch.nn")
37