Skip to content

Commit

Permalink
Merge pull request #18 from achaiah/WIP
Browse files Browse the repository at this point in the history
Wip
  • Loading branch information
achaiah committed Mar 1, 2021
2 parents 1afffd1 + f81f9c6 commit b7acf4d
Show file tree
Hide file tree
Showing 5 changed files with 635 additions and 201 deletions.
4 changes: 4 additions & 0 deletions pywick/README_loss_functions.md
@@ -0,0 +1,4 @@
## Summarized Loss functions and their use-cases
![alt text](https://raw.githubusercontent.com/shruti-jadon/Semantic-Segmentation-Loss-Functions/master/summary.png)

![alt text](https://raw.githubusercontent.com/JunMa11/SegLoss/master/test/LossOverview.PNG)
7 changes: 3 additions & 4 deletions pywick/functions/swish.py
Expand Up @@ -47,12 +47,11 @@ class Aria2(nn.Module):

def __init__(self, a=1.5, b = 2.):
super(Aria2, self).__init__()
self.a = a
self.b = b
self.alpha = a
self.beta = b

def forward(self, x):
aria2 = 1 + ((F.exp(-x) ** self.b) ** (-self.a))
return x * aria2
return x * torch.sigmoid(self.beta*x) ** self.alpha


# Source: https://github.com/rwightman/gen-efficientnet-pytorch/blob/master/geffnet/activations/activations.py (Apache 2.0)
Expand Down

0 comments on commit b7acf4d

Please sign in to comment.