NVIDIA Xavier TensorRT TensorRTX 生成engine时报错

自己训练得到的yolov5s无法部署。能生成.wts文件,但在生成.engine时报错,报错内容:

Loading weights: best.wts
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: kernel weights has count 2304 but 32640 was expected
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: count of 2304 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 255 output channels and 1 groups were specified. Expected Weights count is 128 * 1*1 * 255 / 1 = 32640
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: kernel weights has count 2304 but 32640 was expected
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: count of 2304 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 255 output channels and 1 groups were specified. Expected Weights count is 128 * 1*1 * 255 / 1 = 32640
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: kernel weights has count 2304 but 32640 was expected
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: count of 2304 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 255 output channels and 1 groups were specified. Expected Weights count is 128 * 1*1 * 255 / 1 = 32640
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: kernel weights has count 2304 but 32640 was expected
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: count of 2304 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 255 output channels and 1 groups were specified. Expected Weights count is 128 * 1*1 * 255 / 1 = 32640
Building engine, please wait for a while...
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: kernel weights has count 2304 but 32640 was expected
[04/13/2022-18:13:44] [E] [TRT] (Unnamed Layer* 214) [Convolution]: count of 2304 weights in kernel, but kernel dimensions (1,1) with 128 input channels, 255 output channels and 1 groups were specified. Expected Weights count is 128 * 1*1 * 255 / 1 = 32640
[04/13/2022-18:13:44] [E] [TRT] Could not compute dimensions for (Unnamed Layer* 214) [Convolution]_output, because the network is not valid.
[04/13/2022-18:13:44] [E] [TRT] Network validation failed.
Build engine successfully!
yolov5: /home/xhr/tensorrtx-yolov5-v5.0/yolov5/yolov5.cpp:245: void APIToModel(unsigned int, nvinfer1::IHostMemory**, bool&, float&, float&, std::__cxx11::string&): Assertion `engine != nullptr' failed.

why?

查了一下,需要修改下类别数量。

你可能感兴趣的:(深度学习,目标检测,视觉检测,linux)