Skip to content

Commit

Permalink
Add softplus
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch0ronomato committed Nov 2, 2024
1 parent a7a62f9 commit f1d7852
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pytensor/link/pytorch/dispatch/scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Cast,
ScalarOp,
)
from pytensor.scalar.math import Softplus


@pytorch_funcify.register(ScalarOp)
Expand Down Expand Up @@ -56,3 +57,8 @@ def cast(x):
return x.to(dtype=dtype)

return cast


@pytorch_funcify.register(Softplus)
def pytorch_funcify_Softplus(op, node, **kwargs):
return torch.nn.Softplus()

Check warning on line 64 in pytensor/link/pytorch/dispatch/scalar.py

View check run for this annotation

Codecov / codecov/patch

pytensor/link/pytorch/dispatch/scalar.py#L64

Added line #L64 was not covered by tests

0 comments on commit f1d7852

Please sign in to comment.