def get_activation_layer
函数功能
从字符串中获取激活函数的辅助函数。该函数在MindIE SD仓的路径为:mindiesd/layers/activation.py,其具体方法请参见activation。
函数原型
def get_activation_layer(act_type: str) -> nn.Module:
参数说明
参数名 |
输入/输出 |
类型 |
说明 |
---|---|---|---|
act_type |
输入 |
str |
激活函数的名称。 |
返回值说明
返回激活函数。
父主题: API参考(Python)