(activation_string)
| 50 | |
| 51 | |
| 52 | def 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()))) |