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 onnx to engine #1

Open
sctrueew opened this issue Nov 18, 2022 · 1 comment
Open

Convert onnx to engine #1

sctrueew opened this issue Nov 18, 2022 · 1 comment

Comments

@sctrueew
Copy link

Hi, thanks for your work. when I want to convert onnx to engine I gt this error:
I convert yolov5s-seg to onnx first then I use your converter

/18/2022-19:10:17] [W] [TRT] onnx2trt_utils.cpp:366: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[11/18/2022-19:10:17] [E] [TRT] ModelImporter.cpp:769: While parsing node number 142 [Resize -> "onnx::Concat_277"]:
[11/18/2022-19:10:17] [E] [TRT] ModelImporter.cpp:770: --- Begin node ---
[11/18/2022-19:10:17] [E] [TRT] ModelImporter.cpp:771: input: "onnx::Resize_272"
input: "onnx::Resize_276"
input: "onnx::Resize_474"
output: "onnx::Concat_277"
name: "Resize_142"
op_type: "Resize"
attribute {
  name: "coordinate_transformation_mode"
  s: "asymmetric"
  type: STRING
}
attribute {
  name: "cubic_coeff_a"
  f: -0.75
  type: FLOAT
}
attribute {
  name: "mode"
  s: "nearest"
  type: STRING
}
attribute {
  name: "nearest_mode"
  s: "floor"
  type: STRING
}

[11/18/2022-19:10:17] [E] [TRT] ModelImporter.cpp:772: --- End node ---
[11/18/2022-19:10:17] [E] [TRT] ModelImporter.cpp:775: ERROR: builtin_op_importers.cpp:3603 In function importResize:
[8] Assertion failed: scales.is_weights() && "Resize scales must be an initializer!"
Assertion failed: scales.is_weights() && "Resize scales must be an initializer!"
successfully load the onnx model
[11/18/2022-19:11:33] [E] [TRT] 4: [network.cpp::nvinfer1::Network::validate::2605] Error Code 4: Internal Error (Network must have at least one output)
@fish-kong
Copy link
Owner

Is your tensorrt version 7. x or lower? please try to use 8.x version. this error occured when i used 7.x last few years,because 7.x do not support upsample(torch)

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

2 participants