facebookresearch / facebookresearch/segment-anything
Tensorrt Acceleration
- Dominant language
- Jupyter Notebook
- Stars
- 54.9k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Description
I tried the exported onnx with tensorrt.
However, I got Error Code 4: Internal Error (orig_im_size: network input that is shape tensor must have type Int32)
_[06/09/2023-17:25:55] [E] Error[4]: [graphShapeAnalyzer.cpp::demandAndResolveInputTensor::1226] Error Code 4: Internal Error (orig_im_size: network input that is shape tensor must have type Int32)
[06/09/2023-17:25:55] [E] [TRT] ModelImporter.cpp:740: While parsing node number 1158 [Slice -> "/Slice_2_output_0"]:
[06/09/2023-17:25:55] [E] [TRT] ModelImporter.cpp:741: --- Begin node ---
[06/09/2023-17:25:55] [E] [TRT] ModelImporter.cpp:742: input: "/Resize_output_0"
input: "/Constant_74_output_0"
input: "/Unsqueeze_21_output_0"
input: "/Constant_75_output_0"
input: "/Constant_76_output_0"
output: "/Slice_2_output_0"
name: "/Slice_2"
op_type: "Slice"_
Contributor guide
Research direction
Start by reproducing the exported ONNX model in TensorRT and inspect the reported Slice node inputs, especially orig_im_size. The issue's importer trace identifies the failing node and the Int32 shape-tensor error; done means TensorRT accepts the exported model without this error.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100