tensorrtx icon indicating copy to clipboard operation
tensorrtx copied to clipboard

engine file create faile

Open ONNONS opened this issue 3 years ago • 5 comments

Env

  • GPU, Jetson Nano,
  • OS, e.g. Ubuntu18.04
  • Cuda version 10.2
  • TensorRT version 8.0

About this repo

  • which branch/tag/commit are you using?
  • which model? yolov5, retinaface?

Your problem

Ihaven't been able to solve this problem for 2 months ... please help

sudo ./yolov5 -s yolov5n.wts yolov5n.engine c 0.17 0.25

Loading weights: yolov5n.wts [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: (Unnamed Layer* 0) [Convolution]:kernel weights has count 3456 but 1728 was expected [02/14/2022-16:50:04] [E] [TRT] 4: (Unnamed Layer* 0) [Convolution]: count of 3456 weights in kernel, but kernel dimensions (6,6) with 3 input channels, 16 output channels and 1 groups were specified. Expected Weights count is 3 * 66 * 16 / 1 = 1728 [02/14/2022-16:50:04] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::28] Error Code 4: Internal Error ((Unnamed Layer 0) [Convolution]: number of kernel weights does not match tensor dimensions) [02/14/2022-16:50:04] [E] [TRT] 3: [network.cpp::addResize::1190] Error Code 3: Internal Error (Parameter check failed at: optimizer/api/network.cpp::addResize::1190, condition: input.getDimensions().nbDims > 0 ) yolov5: /home/Desktop/tensorrtx-master/yolov5/yolov5.cpp:63: nvinfer1::ICudaEngine* build_engine(unsigned int, nvinfer1::IBuilder*, nvinfer1::IBuilderConfig*, nvinfer1::DataType, float&, float&, std::__cxx11::string&): Assertion `upsample11' failed. Aborted

ONNONS avatar Feb 14 '22 07:02 ONNONS

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 15 '22 15:04 stale[bot]

请问这个问题解决了吗?我也遇到了类似问题

Lixinixn115 avatar Apr 20 '22 10:04 Lixinixn115

我发现是因为生成.wts文件时,gen_wts.py中.pt的文件路径忘记改了。

Lixinixn115 avatar Apr 22 '22 12:04 Lixinixn115

Was this issue solved? @wang-xinyu

sicarioakki avatar Jun 19 '22 14:06 sicarioakki

Errors like this is due to model mismatch between pytorch and tensorrt. You can follow the readme to use the matched version, and try official model first.

[04/15/2022-00:10:18] [E] [TRT] (Unnamed Layer* 201) [Convolution]: kernel weights has count 2304 but 32640 was expected

wang-xinyu avatar Jun 29 '22 02:06 wang-xinyu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 31 '22 02:08 stale[bot]

Errors like this is due to model mismatch between pytorch and tensorrt. You can follow the readme to use the matched version, and try official model first.

[04/15/2022-00:10:18] [E] [TRT] (Unnamed Layer* 201) [Convolution]: kernel weights has count 2304 but 32640 was expected

Hi @wang-xinyu, what is meant by model mismatch between pytorch and tensorrt. I have tested official model without any error, but once I tested with my custom trained model, the error occurred.

danielzhangau avatar Dec 06 '22 23:12 danielzhangau

Means your custom trained model is different from the official model. You can load the model in pytorch, then print(model) to compare them layer by layer.

wang-xinyu avatar Dec 07 '22 07:12 wang-xinyu