clovaai / rexnet

Official Pytorch implementation of ReXNet (Rank eXpansion Network) with pretrained models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ONNX export failed: Couldn't export Python operator SiLUJitImplementation

xiangyun-hz opened this issue · comments

Thanks for sharing your wonderful work.

When I convert to onnx, I encounter a problem: ONNX export failed: Couldn't export Python operator SiLUJitImplementation.
The convert code is as follow:

def pth2onnx(model_name, model, input_shape):
input_name = ["input"]
output_name = ["output"]
input = Variable(torch.randn(input_shape)).cpu()
m_model = model.cpu()
test_path = r'./'
torch.onnx.export(m_model, input, model_name, input_names=input_name, output_names=output_name, verbose=False, opset_version=11)

Use the lastest code

Thank you for your interest in our work!

The activation implementation is not compatible with the ONNX export of the model. Please set this to False for using the basic implementation.

The memory increase will not be a matter in the running with the ONNX model.

thank you for your reply, I know set USE_MEMORY_EFFICIENT_SiLU=False is well, but I want to know why? Does it affect performance or results?