mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Add symbolic for SwishJitAutoFn to support onnx
This commit is contained in:
parent
80cd31f21f
commit
43f2500c26
@ -30,6 +30,9 @@ class SwishJitAutoFn(torch.autograd.Function):
|
|||||||
Inspired by conversation btw Jeremy Howard & Adam Pazske
|
Inspired by conversation btw Jeremy Howard & Adam Pazske
|
||||||
https://twitter.com/jeremyphoward/status/1188251041835315200
|
https://twitter.com/jeremyphoward/status/1188251041835315200
|
||||||
"""
|
"""
|
||||||
|
@staticmethod
|
||||||
|
def symbolic(g, x):
|
||||||
|
return g.op("Mul", x, g.op("Sigmoid", x))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def forward(ctx, x):
|
def forward(ctx, x):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user