serialize fix
This commit is contained in:
+1
-1
@@ -595,7 +595,7 @@ ILayer* NetworkRT::convert_layer(ITensor *input, DeformConv2d *l) {
|
||||
|
||||
bool NetworkRT::serialize(const char *filename) {
|
||||
|
||||
std::ofstream p(filename);
|
||||
std::ofstream p(filename, std::ios::binary);
|
||||
if (!p) {
|
||||
FatalError("could not open plan output file");
|
||||
return false;
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
#include "DarknetParser.h"
|
||||
|
||||
int main() {
|
||||
std::string bin_path = "yolo3";
|
||||
std::string bin_path = "yolov3-sppx";
|
||||
std::vector<std::string> input_bins = {
|
||||
bin_path + "/layers/input.bin"
|
||||
};
|
||||
std::vector<std::string> output_bins = {
|
||||
bin_path + "/debug/layer82_out.bin",
|
||||
bin_path + "/debug/layer94_out.bin",
|
||||
bin_path + "/debug/layer106_out.bin"
|
||||
bin_path + "/debug/layer89_out.bin",
|
||||
bin_path + "/debug/layer101_out.bin",
|
||||
bin_path + "/debug/layer113_out.bin"
|
||||
};
|
||||
std::string wgs_path = bin_path + "/layers";
|
||||
std::string cfg_path = "../tests/darknet/cfg/yolo3.cfg";
|
||||
std::string name_path = "../tests/darknet/names/coco.names";
|
||||
downloadWeightsifDoNotExist(input_bins[0], bin_path, "https://cloud.hipert.unimore.it/s/jPXmHyptpLoNdNR/download");
|
||||
std::string cfg_path = "../tests/darknet/cfg/yolov3-sppx.cfg";
|
||||
std::string name_path = "../tests/darknet/names/coco4.names";
|
||||
//downloadWeightsifDoNotExist(input_bins[0], bin_path, "https://cloud.hipert.unimore.it/s/jPXmHyptpLoNdNR/download");
|
||||
|
||||
// parse darknet network
|
||||
tk::dnn::Network *net = tk::dnn::darknetParser(cfg_path, wgs_path, name_path);
|
||||
|
||||
Reference in New Issue
Block a user