Spaces:
Runtime error
Runtime error
File size: 250 Bytes
e3dea0f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import torch
class Swish(torch.nn.Module):
"""
Construct an Swish activation function for Conformer.
"""
def forward(self, x):
"""
Return Swish activation function.
"""
return x * torch.sigmoid(x)
|