Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Convert to onnx] #76

Open
trungna1374 opened this issue Sep 25, 2019 · 17 comments
Open

[Convert to onnx] #76

trungna1374 opened this issue Sep 25, 2019 · 17 comments

Comments

@trungna1374
Copy link

Have anyone tried to convert .pth to .onnx?
I tried, but outputs were unchanged for difference inputs.

@SealQ
Copy link

SealQ commented Oct 12, 2019

Hello, has your problem been solved?

@visiont3lab
Copy link

Hi any news?

@arshv27
Copy link

arshv27 commented Apr 19, 2020

Hey, did anyone succeed at resolving this issue?

@DietDietDiet
Copy link

Hey, did anyone succeed at resolving this issue?
@trungna1374 @SealQ @arshv27 @visiont3lab

@xuhuaren
Copy link

has anyone solved it :)

@xuhuaren
Copy link

xuhuaren commented May 7, 2020

I successfully convert pytorch model to onnx one.

    self.workers = 1
    self.batch_size = 192
    self.onnx = os.path.join(main_path, "squeezenet1_1.onnx")
    self.batch_max_length = 25
    self.imgH = 32
    self.imgW = 100
    self.rgb = False
    self.character = '0123456789abcdefghijklmnopqrstuvwxyz'
    self.sensitive = False
    self.PAD = False
    self.Transformation = 'TPS'
    self.FeatureExtraction = 'ResNet'
    self.SequenceModeling = 'BiLSTM'
    self.Prediction = 'Attn'
    self.num_fiducial = 20
    self.input_channel = 1
    self.output_channel = 512
    self.hidden_size = 256
    self.num_gpu = 0

No better method, just step by step debug.

@aisensiy
Copy link

@xuhuaren

    self.workers = 1
    self.batch_size = 192
    self.onnx = os.path.join(main_path, "squeezenet1_1.onnx")
    self.batch_max_length = 25
    self.imgH = 32
    self.imgW = 100
    self.rgb = False
    self.character = '0123456789abcdefghijklmnopqrstuvwxyz'
    self.sensitive = False
    self.PAD = False
    self.Transformation = 'TPS'
    self.FeatureExtraction = 'ResNet'
    self.SequenceModeling = 'BiLSTM'
    self.Prediction = 'Attn'
    self.num_fiducial = 20
    self.input_channel = 1
    self.output_channel = 512
    self.hidden_size = 256
    self.num_gpu = 0

Could you please share some insights about this? That will be quite helpful.

@xuhuaren
Copy link

xuhuaren commented May 14, 2020 via email

@aisensiy
Copy link

@xuhuaren

Wow, thanks for your super fast reply!

You mean not self.Transformation = 'TPS' but self.Transformation = 'None' ?

@cowyyy
Copy link

cowyyy commented May 19, 2020

@xuhuaren @aisensiy
Hi, I'm also confronted with the problem of onnx export.
1 TPS has f.grid_sample which has no op in onnx
2 'Attn' has a loop
could you please share some insights about this?

@xuhuaren
Copy link

xuhuaren commented May 19, 2020 via email

@ark-42
Copy link

ark-42 commented May 19, 2020

@xuhuaren So this cannot be ported with the TPS module?

@DietDietDiet
Copy link

@xuhuaren could you share your code of export onnx

@jusim
Copy link

jusim commented Nov 10, 2020

Code would be very helpful, i have difficulties with this as well

@Greg-Tarr
Copy link

Yes, please share the code.

@SunAnLan
Copy link

SunAnLan commented Apr 1, 2021

@xuhuaren could you please tell me the version of your pytorch and cuda? As I just tried with the config like yours, there comes an error RuntimeError: Exporting the operator _thnn_fused_lstm_cell to ONNX opset version 9 is not supported. Please open a bug to request ONNX export support for the missing operator.

@kishcs
Copy link

kishcs commented Jul 28, 2022

I am trying to convert model to onnx or TRT.
I am facing issue while converting to onnx or TRT.

Anyone tried and succeeded ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests