Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Nov 13, 2019
1 parent e66323e commit 444a9f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ def forward(self, x):
return x * torch.sigmoid(x)


class Mish(nn.Module): # https://github.com/digantamisra98/Mish
# Applies the mish function element-wise: mish(x) = x * tanh(softplus(x)) = x * tanh(ln(1 + exp(x)))
def __init__(self):
super().__init__()

def forward(self, x):
return x * torch.tanh(F.softplus(x))


class YOLOLayer(nn.Module):
def __init__(self, anchors, nc, img_size, yolo_index, arc):
super(YOLOLayer, self).__init__()
Expand Down

0 comments on commit 444a9f7

Please sign in to comment.