Hardware RTX 3060
DS version 5.1
This has been an open issue since long,
I’m reattaching relevant files with the error logs here,
I’ve attached the following files in the same,
- Exported Onnx File
- Pytorch trained Classifier
- Model Config File used in deepstream pipeline.
resnet18.onnx (42.6 MB)
resnet18.pt (42.7 MB)
[property]
gpu-id=0
# preprocessing parameters: These are the same for all classification models generated by TLT.
net-scale-factor=1.0
offsets=123.67;116.28;103.53
model-color-format=0
batch-size=64
labelfile-path=labels.txt
onnx-file=resnet18.onnx
infer-dims=3;224;224 # where c = number of channels, h = height of the model input, w = width of model input, 0: implies CHW format.
uff-input-blob-name=actual_input
output-blob-names=output
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=2
# process-mode: 2 - inferences on crops from primary detector, 1 - inferences on whole frame
process-mode=2
interval=0
network-type=1 # defines that the model is a classifier.
gie-unique-id=4
classifier-threshold=0.51
secondary-reinfer-interval=0
I’ve also been able to verify the following commands,
trtexec --onnx=resnet18.onnx --explicitBatch, This command runs perfectly fine with the following log, [02/25/2022-23:28:29] [I] total compute time: 2.99227 s &&&& PASSED TensorRT.trtexec # /usr/src/tensorrt/bin/trtexec --onnx=resnet18.onnx --explicitBatch
Please let me know if you need anything else. I feel the shared files should be more than enuff to replicate on your end.
The problem with DS pipeline is that the DS pipeline builds the engine successfuly but fails immediately after it with the same log attached in previous post,
8.onnx_b64_gpu0_fp16.engine successfully
ERROR: …/nvdsinfer/nvdsinfer_func_utils.cpp:33 [TRT]: Flatten_47: reshaping failed for tensor: 189
ERROR: …/nvdsinfer/nvdsinfer_func_utils.cpp:33 [TRT]: shapeMachine.cpp (160) - Shape Error in executeReshape: reshape would change volume
ERROR: …/nvdsinfer/nvdsinfer_func_utils.cpp:33 [TRT]: Instruction: RESHAPE{64 512 1 1} {1 512}
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:685 [FullDims Engine Info]: layers num: 2
0 INPUT kFLOAT actual_input 3x224x224 min: 1x3x224x224 opt: 64x3x224x224 Max: 64x3x224x224
1 OUTPUT kFLOAT output 2 min: 0 opt: 0 Max: 0iris-app: nvdsinfer_context_impl.cpp:1302: NvDsInferStatus nvdsinfer::NvDsInferContextImpl::allocateBuffers(): Assertion `bindingDims.numElements > 0’ failed.
Aborted (core dumped)
Would love if this issue could be addressed as soon as possible. Thanks.
Edit: labels file is a binary classifier, yes;no