class Mish()
API接口
class Mish(nn.Module):
功能描述
应用基于NPU的Mish操作。
示例
调用方式示例:
from torch_npu.contrib.module import Mish m = nn.Mish()
使用示例:
>>> m = nn.Mish() >>> input_tensor = torch.randn(2, 32, 5, 5) >>> output = m(input_tensor)
父主题: torch_npu.contrib