Move download of weights inside build folder
Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
+2
-2
@@ -90,8 +90,8 @@ NetworkRT::NetworkRT(Network *net, const char *name) {
|
||||
* Each network is located in a folder with the same name as the network.
|
||||
* If the folder has a different name, the calibration table is saved in build/ folder.
|
||||
*/
|
||||
std::string calib_table_name = "../tests/"+ net->networkName + "/" + net->networkNameRT.substr(0, net->networkNameRT.find('.')) + "-calibration.table";
|
||||
std::string calib_table_path = "../tests/"+ net->networkName;
|
||||
std::string calib_table_name = net->networkName + "/" + net->networkNameRT.substr(0, net->networkNameRT.find('.')) + "-calibration.table";
|
||||
std::string calib_table_path = net->networkName;
|
||||
if(!fileExist((const char *)calib_table_path.c_str()))
|
||||
calib_table_name = "./" + net->networkNameRT.substr(0, net->networkNameRT.find('.')) + "-calibration.table";
|
||||
|
||||
|
||||
@@ -22,9 +22,11 @@ bool fileExist(const char *fname) {
|
||||
|
||||
void downloadWeightsifDoNotExist(const std::string& input_bin, const std::string& test_folder, const std::string& weights_url){
|
||||
if(!fileExist(input_bin.c_str())){
|
||||
std::string mkdir_cmd = "mkdir " + test_folder;
|
||||
std::string wget_cmd = "wget " + weights_url + " -O " + test_folder + "/weights.zip";
|
||||
std::string unzip_cmd = "unzip " + test_folder + "/weights.zip -d" + test_folder;
|
||||
std::string rm_cmd = "rm " + test_folder + "/weights.zip";
|
||||
system(mkdir_cmd.c_str());
|
||||
system(wget_cmd.c_str());
|
||||
system(unzip_cmd.c_str());
|
||||
system(rm_cmd.c_str());
|
||||
|
||||
Reference in New Issue
Block a user