Skip to content

Commit b9843f9

Browse files
authored
Merge pull request #282 from tigert1998/patch-1
Add symbolic for SwishJitAutoFn to support onnx
2 parents ea36a78 + 43f2500 commit b9843f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

timm/models/layers/activations_me.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class SwishJitAutoFn(torch.autograd.Function):
3030
Inspired by conversation btw Jeremy Howard & Adam Pazske
3131
https://twitter.com/jeremyphoward/status/1188251041835315200
3232
"""
33+
@staticmethod
34+
def symbolic(g, x):
35+
return g.op("Mul", x, g.op("Sigmoid", x))
3336

3437
@staticmethod
3538
def forward(ctx, x):

0 commit comments

Comments
 (0)