Skip to content
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

Error when try to generate file .engine #2

Open
dangcongtao opened this issue May 10, 2022 · 1 comment
Open

Error when try to generate file .engine #2

dangcongtao opened this issue May 10, 2022 · 1 comment

Comments

@dangcongtao
Copy link

dangcongtao commented May 10, 2022

thanks for share to community the implementation of yolo detect smoke and fire.
I'm trying to learn from your repo and following the document(README).

Everything all right but the final step for generate file .engine, for more specificly, I tried to run this command:
"sudo ./yolov5 -s yolov5s.wts yolov5s.engine s" after all step before.
But it aborted. I know that the problem about line 155 of file {tensorrtx_path}/yolov5/common.hpp then have no idea how to fix it

# This's Error detail:

Loading weights: yolov5s.wts
[05/10/2022-22:14:08] [E] [TRT] 3: [network.cpp::addScale::737] Error Code 3: API Usage Error (Parameter check failed at: optimizer/api/network.cpp::addScale::737, condition: shift.count > 0 ? (shift.values != nullptr) : (shift.values == nullptr)
)
yolov5: {tensorrtx_path}/yolov5/common.hpp:155: nvinfer1::IScaleLayer* addBatchNorm2d(nvinfer1::INetworkDefinition*, std::map<std::__cxx11::basic_string<char>, nvinfer1::Weights>&, nvinfer1::ITensor&, std::__cxx11::string, float): Assertion `scale_1' failed.
Aborted
@RichardoMrMu
Copy link
Owner

git clone -b yolov5-v5.0 https://github.com/wang-xinyu/tensorrtx.git
Please ensure your tensorrtx version is YOLOv5-v5.0. This may make mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants