Skip to content

Commit 43f2500

Browse files
authored
Add symbolic for SwishJitAutoFn to support onnx
1 parent 80cd31f commit 43f2500

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)