MCPcopy Create free account
hub / github.com/apple/ml-pointersect / _get_activation_fn

Function _get_activation_fn

pointersect/models/network_transformer.py:234–240  ·  view source on GitHub ↗
(activation)

Source from the content-addressed store, hash-verified

232
233
234def _get_activation_fn(activation):
235 if activation == "relu":
236 return F.relu
237 elif activation == "gelu":
238 return F.gelu
239
240 raise RuntimeError("activation should be relu/gelu, not {}".format(activation))

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected