MCPcopy Index your code
hub / github.com/SooLab/CGFormer / get_activation

Function get_activation

bert/activations.py:52–56  ·  view source on GitHub ↗
(activation_string)

Source from the content-addressed store, hash-verified

50
51
52def get_activation(activation_string):
53 if activation_string in ACT2FN:
54 return ACT2FN[activation_string]
55 else:
56 raise KeyError("function {} not found in ACT2FN mapping {}".format(activation_string, list(ACT2FN.keys())))

Callers 1

__init__Method · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected