-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrunner.cpp
32 lines (25 loc) · 892 Bytes
/
runner.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <typeinfo>
#include <cassert>
#include "defaults.h"
#include <torch/torch.h>
#include <torch/script.h>
#include "trainer.h"
using namespace std;
using namespace monodepth;
int main(int argc, char *argv[], char *envp[]) {
// torch::set_default_dtype(torch::kF32);
//config path
monodepth::config::SetCFGFromFile(argv[1]);
cout << "load complete" << endl;
// monodepth::utils::jit_to_cpp<monodepth::utils::VoVNetMapper>("../python_utils", argv[1], std::vector<std::string>{"backbone.pth", "bbox_pred.pth", "cls_score.pth", "extractor_fc6.pth", "extractor_fc7.pth", "rpn_bbox.pth", "rpn_conv.pth", "rpn_logits.pth"});
// if(string(argv[2]).compare("inference") == 0)
// engine::inference();
if(string(argv[2]).compare("train") == 0)
engine::do_train();
else{
//only supports train and inference
assert(false);
}
return 0;
}