Description
When I tried to generate engine with yolov5, I got following error, please anyone help me out.
./yolov5 -s …/best.wts b.engine s
[03/28/2024-07:09:31] [W] [TRT] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage and speed up TensorRT initialization. See “Lazy Loading” section of CUDA documentation CUDA C++ Programming Guide
[03/28/2024-07:09:31] [W] [TRT] The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
Loading weights: …/best.wts
[03/28/2024-07:09:31] [E] [TRT] 3: [scaleLayer.h::setScale::23] Error Code 3: API Usage Error (Parameter check failed at: /_src/build/x86_64-gnu/release/optimizer/api/layers/scaleLayer.h::setScale::23, condition: scale.count > 0
)
[03/28/2024-07:09:31] [E] [TRT] 3: [scaleLayer.h::setShift::24] Error Code 3: API Usage Error (Parameter check failed at: /_src/build/x86_64-gnu/release/optimizer/api/layers/scaleLayer.h::setShift::24, condition: shift.count > 0
)
[03/28/2024-07:09:31] [E] [TRT] 3: [scaleLayer.h::setPower::25] Error Code 3: API Usage Error (Parameter check failed at: /_src/build/x86_64-gnu/release/optimizer/api/layers/scaleLayer.h::setPower::25, condition: power.count > 0
)
[03/28/2024-07:09:31] [E] [TRT] 3: (Unnamed Layer* 247) [Scale]: shift weights are not permitted since they are of type
Building engine, please wait for a while…
[03/28/2024-07:09:31] [E] [TRT] 3: (Unnamed Layer* 201) [Convolution]:kernel weights has count 0 but 2304 was expected
[03/28/2024-07:09:31] [E] [TRT] 4: (Unnamed Layer* 201) [Convolution]: count of 0 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 18 output channels and 1 groups were specified. Expected Weights count is 128 * 11 * 18 / 1 = 2304
[03/28/2024-07:09:31] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::58] Error Code 4: Internal Error ((Unnamed Layer 201) [Convolution]: number of kernel weights does not match tensor dimensions)
[03/28/2024-07:09:31] [E] [TRT] 4: [network.cpp::validate::3093] Error Code 4: Internal Error (Could not compute dimensions for (Unnamed Layer* 201) [Convolution]_output, because the network is not valid.)
Build engine successfully!
CUDA error 1 at /home/ai/yololayer.cu:52yolov5: /home/ai/yololayer.cu:52: virtual nvinfer1::YoloLayerPlugin::~YoloLayerPlugin(): Assertion `0’ failed.
Aborted (core dumped)
Environment
TensorRT Version: 8.6.1
GPU Type: NVIDIA GeForce RTX 2060
Nvidia Driver Version: 525
CUDA Version: 11.4
CUDNN Version: 8.9.7
Operating System + Version: 18.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):