[06/09/2023-08:59:03] [E] [TRT] 3: (Unnamed Layer* 5) [Convolution]:kernel weights has count 5184 but 3456 was expected [06/09/2023-08:59:03] [E] [TRT] 4: (Unnamed Layer* 5) [Convolution]: count of 5184 weights in kernel, but kernel dimensions (3,3) with 12 input channels, 32 output channels and 1 groups were specified. Expected Weights count is 12 * 3*3 * 32 / 1 = 3456 [06/09/2023-08:59:03] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::58] Error Code 4: Internal Error ((Unnamed Layer* 5) [Convolution]: number of kernel weights does not match tensor dimensions) [06/09/2023-08:59:03] [E] [TRT] 3: [network.cpp::addResize::1358] Error Code 3: API Usage Error (Parameter check failed at: optimizer/api/network.cpp::addResize::1358, condition: input.getDimensions().nbDims > 0 ) yolov5: /home/a/yolov5code/TRT/tensorrtx/yolov5/yolov5.cpp:63: nvinfer1::ICudaEngine* build_engine(unsigned int, nvinfer1::IBuilder*, nvinfer1::IBuilderConfig*, nvinfer1::DataType, float&, float&, std::string&): Assertion `upsample11' failed. 已放弃
时间: 2024-02-03 13:02:09 浏览: 235
onnx-tensorrt:ONNX-TensorRT:ONNX的TensorRT后端
这个错误看起来是由于神经网络中某个卷积层的权重数量不匹配导致的。错误消息中提到了预期的权重数量,但实际上权重数量与预期不符。这可能是由于网络的结构或权重文件本身出现了问题。
要解决这个问题,您可能需要检查卷积层的权重数量是否正确,并检查网络结构或权重文件是否正确。您还可以尝试使用不同的优化器或构建器来创建您的神经网络,以避免这些错误。
阅读全文