yolo-tensorrt
yolo-tensorrt copied to clipboard
Invalid network type in trt_utils.loadWeights() on yolov4_scaled branch
I have gotten the executable to build on the yolov4_scaled branch but I encounter this error when loading the weights.
Loading pre-trained weights...
Invalid network type
yolo-trt: /home/ubuntu/yolo-tensorrt/modules/trt_utils.cpp:393: std::vector<float> loadWeights(std::__cxx11::string, const string&): Assertion `0' failed.
Aborted (core dumped)
Error is caused by this line in modules/trt_utils.cpp
loadWeights()
if ((int)(unsigned char)buf[0] == 1)
{
file.ignore(11);
}
else if ((int)(unsigned char)buf[0] == 2)
{
file.ignore(15);
}
else
{
std::cout << "Invalid network type" << std::endl;
assert(0);
}
What is this (int)(unsigned char)buf[0]
and what should the value be?