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