-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YOLOV8 Assertion `serialized_engine' failed. 使用自己的.pt 生成 .wts 是成功的,但转.engine 是报错。chat说是卷积层权重数量不匹配 #1527
Comments
How can I overcome this issue? |
Haven't solved yet |
Can you mail me.regarding this issue |
@lindsayshuo pls advice. |
Thank you for your help.
…________________________________
发件人: Wang Xinyu ***@***.***>
发送时间: 2024年5月30日 11:17
收件人: wang-xinyu/tensorrtx ***@***.***>
抄送: cimmen ***@***.***>; State change ***@***.***>
主题: Re: [wang-xinyu/tensorrtx] YOLOV8 Assertion `serialized_engine' failed. 使用自己的.pt 生成 .wts 是成功的,但转.engine 是报错。chat说是卷积层权重数量不匹配 (Issue #1527)
@lindsayshuo<https://github.com/lindsayshuo> pls advice.
―
Reply to this email directly, view it on GitHub<#1527 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAHASBHSKWKCXLZC3CTXTIDZE2K6PAVCNFSM6AAAAABH6JXWQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYGU4TSMRVGA>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
各版本
cuda 12.1
tensorrt 8.6.1
pytorch 2.2.2
cudnn 8.9.7
生成.pt的框架(是yolov8的官方镜像)
pytorch 2.0
cuda 11.8
:~/YOLO/yolov8$ python gen_wts.py -w cricle-n.pt -o c8n.wts -t detect
Generating .wts for detect model
Loading cricle-n.pt
~/YOLO/yolov8/build$ ./yolov8_det -s c8n.wts c8.engine n
^[[ALoading weights: c8n.wts
[05/19/2024-19:49:18] [W] [TRT] The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
[05/19/2024-19:49:18] [E] [TRT] 3: (Unnamed Layer* 239) [Convolution]:kernel weights has count 36864 but 46080 was expected
[05/19/2024-19:49:18] [E] [TRT] 4: (Unnamed Layer* 239) [Convolution]: count of 36864 weights in kernel, but kernel dimensions (3,3) with 64 input channels, 80 output channels and 1 groups were specified. Expected Weights count is 64 * 33 * 80 / 1 = 46080
[05/19/2024-19:49:18] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::58] Error Code 4: Internal Error ((Unnamed Layer 239) [Convolution]: number of kernel weights does not match tensor dimensions)
[05/19/2024-19:49:18] [E] [TRT] 3: (Unnamed Layer* 258) [Convolution]:kernel weights has count 73728 but 92160 was expected
[05/19/2024-19:49:18] [E] [TRT] 4: (Unnamed Layer* 258) [Convolution]: count of 73728 weights in kernel, but kernel dimensions (3,3) with 128 input channels, 80 output channels and 1 groups were specified. Expected Weights count is 128 * 33 * 80 / 1 = 92160
[05/19/2024-19:49:18] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::58] Error Code 4: Internal Error ((Unnamed Layer 258) [Convolution]: number of kernel weights does not match tensor dimensions)
[05/19/2024-19:49:18] [E] [TRT] 3: (Unnamed Layer* 277) [Convolution]:kernel weights has count 147456 but 184320 was expected
[05/19/2024-19:49:18] [E] [TRT] 4: (Unnamed Layer* 277) [Convolution]: count of 147456 weights in kernel, but kernel dimensions (3,3) with 256 input channels, 80 output channels and 1 groups were specified. Expected Weights count is 256 * 33 * 80 / 1 = 184320
[05/19/2024-19:49:18] [E] [TRT] 4: [convolutionNode.cpp::computeOutputExtents::58] Error Code 4: Internal Error ((Unnamed Layer 277) [Convolution]: number of kernel weights does not match tensor dimensions)
Building engine, please wait for a while...
[05/19/2024-19:49:18] [E] [TRT] 4: [graphShapeAnalyzer.cpp::needTypeAndDimensions::2212] Error Code 4: Internal Error ((Unnamed Layer* 239) [Convolution]: output shape can not be computed)
[05/19/2024-19:49:18] [E] [TRT] 4: [network.cpp::validate::3093] Error Code 4: Internal Error (Could not compute dimensions for (Unnamed Layer* 239) [Convolution]_output, because the network is not valid.)
Build engine successfully!
yolov8_det: /home/big/YOLO/yolov8/yolov8_det.cpp:30: void serialize_engine(std::string&, std::string&, int&, std::string&, float&, float&, int&): Assertion `serialized_engine' failed.
已放弃 (核心已转储)
The text was updated successfully, but these errors were encountered: