先附上解决方案:参考修改config.h文件
[Convolution]:kernel weights has count 3840 but 32640 was expected,yolov5s生成engine模型失败_yolov5s.engine-优快云博客https://blog.youkuaiyun.com/pvmsmfchcs/article/details/131388796
修改这个config.h文件,然后继续修改
当前分割背景的类别不要算进去,训练的时候,是几个类别,这里就是几个,不要额外加一
遇见警告如下:
[04/10/2024-15:51:05] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.
[04/10/2024-15:51:06] [W] [TRT] Weights [name=(Unnamed Layer* 346) [Deconvolution].weight] had the following issues when converted to FP16:
[04/10/2024-15:51:06] [W] [TRT] - Subnormal FP16 values detected.
[04/10/2024-15:51:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to reduce the magnitude of the weights.