EfficientNet SwishImplementation Error

Hey there!

Im new to PyTorch Lighting and I am trying to export my model (EfficientNet based) to .onnx.
According to this forum ( ONNX can't export SwishImplementation · Issue #91 · lukemelas/EfficientNet-PyTorch · GitHub ) i need to perform:

model.set_swish(memory_efficient=False)

before exporting:

torch.onnx.export(model, torch.rand(10,3,240,240), "EfficientNet-B0.onnx")

however, this raises an error:

RuntimeError: ONNX export failed: Couldn't export Python operator SwishImplementation

is there a workaround to this?

Hi, this is not a PyTorch Lightning issue, as PyTorch Lightning is not even used in this repository. I would recommend reaching out to the author of the repository, or opening another issue. Best of luck!

Alrighty,

Thanks for the reply Teddy!