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

About export model #117

Open
Egorundel opened this issue Sep 12, 2023 · 8 comments
Open

About export model #117

Egorundel opened this issue Sep 12, 2023 · 8 comments

Comments

@Egorundel
Copy link

Egorundel commented Sep 12, 2023

Hello, I have a question related to exporting a model. Ultimately, I'm interested in the TensorRT (.trt or .engine) format, but I'm also interested in ONNX (.onnx). Then from ONNX I will be able to make the TensorRT engine myself using trtexec from NVIDIA.

My question is, is it possible to export a trained model to ONNX?

@NVigne-cloud
Copy link

Hi, I am also interested. Have you tried ?

@Egorundel
Copy link
Author

@NVigne-cloud Haven't tried :(

Apparently, we will not wait for the solution of our question

@SangbumChoi
Copy link

SangbumChoi commented Oct 26, 2023

Currently I'm trying to convert into tensorRT. converting to ONNX seems OK but like always I think tensorRT conversion need some extra work.

@SangbumChoi
Copy link

it seems that 2d RoPE

class VisionRotaryEmbeddingFast(nn.Module):

makes trouble with following error
[graphShapeAnalyzer.cpp::analyzeShapes::1872] Error Code 4: Miscellaneous (IElementWiseLayer /backbone/net/blocks.2/attn/rope_glb_1/Mul: broadcast dimensions must be conformable)

@xinlin-xiao
Copy link

any update? converting to ONNX is OK but converting to tensorRT had returned a erros:
`[12/18/2023-15:05:48] [E] [TRT] [graph.cpp::symbolicExecute::611] Error Code 4: Internal Error (/ScatterND: an IScatterLayer cannot be used to compute a shape tensor)
[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:726: While parsing node number 90 [Pad -> "/Pad_output_0"]:
[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:727: --- Begin node ---
[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:728: input: "/Div_output_0"
input: "/Cast_2_output_0"
input: "/Constant_36_output_0"
output: "/Pad_output_0"
name: "/Pad"
op_type: "Pad"
attribute {
name: "mode"
s: "constant"
type: STRING
}

[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:729: --- End node ---
[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:732: ERROR: ModelImporter.cpp:185 In function parseGraph:
[6] Invalid Node - /Pad
[graph.cpp::symbolicExecute::611] Error Code 4: Internal Error (/ScatterND: an IScatterLayer cannot be used to compute a shape tensor)
`

@woshidengweimo
Copy link

is there anyone tells me how to connvert "pth" to "onnx"

@LordonCN
Copy link

LordonCN commented Jan 4, 2024

any update? converting to ONNX is OK but converting to tensorRT had returned a erros: `[12/18/2023-15:05:48] [E] [TRT] [graph.cpp::symbolicExecute::611] Error Code 4: Internal Error (/ScatterND: an IScatterLayer cannot be used to compute a shape tensor) [12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:726: While parsing node number 90 [Pad -> "/Pad_output_0"]: [12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:727: --- Begin node --- [12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:728: input: "/Div_output_0" input: "/Cast_2_output_0" input: "/Constant_36_output_0" output: "/Pad_output_0" name: "/Pad" op_type: "Pad" attribute { name: "mode" s: "constant" type: STRING }

[12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:729: --- End node --- [12/18/2023-15:05:48] [E] [TRT] ModelImporter.cpp:732: ERROR: ModelImporter.cpp:185 In function parseGraph: [6] Invalid Node - /Pad [graph.cpp::symbolicExecute::611] Error Code 4: Internal Error (/ScatterND: an IScatterLayer cannot be used to compute a shape tensor) `

hello, I meet the same error, have you solved it?

@xinlin-xiao
Copy link

xinlin-xiao commented Jan 4, 2024 via email

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

6 participants