Skip to content

Commit

Permalink
Merge pull request #237 from ecker-lab/add-Exp-activation-function
Browse files Browse the repository at this point in the history
add-Exp-activation-function
  • Loading branch information
pollytur authored May 23, 2024
2 parents 736ca41 + 3f9b263 commit 504a5a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions neuralpredictors/layers/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def log1exp(x):
return torch.log(1.0 + torch.exp(x))


class Exp(nn.Module):
def forward(self, x):
return torch.exp(x)


class Log1Exp(nn.Module):
def forward(self, x):
return log1exp(x)
Expand Down

0 comments on commit 504a5a6

Please sign in to comment.