MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _get_activation

Function _get_activation

PATH/core/models/necks/simple_fpn.py:74–81  ·  view source on GitHub ↗

Return an activation function given a string

(activation)

Source from the content-addressed store, hash-verified

72
73
74def _get_activation(activation):
75 """Return an activation function given a string"""
76 if activation == "relu":
77 return nn.ReLU()
78 elif activation == "gelu":
79 return nn.GELU()
80 else:
81 raise RuntimeError(F"activation should be relu/gelu, not {activation}.")
82
83
84class SimpleFPN(nn.Module):

Callers 4

__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected