Created
June 14, 2017 13:48
-
-
Save gautamMalu/416b276a486b3280a1eed916ee635407 to your computer and use it in GitHub Desktop.
Proposed Conv Trainer file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef OPENDETECTION_ODCONVTRAINER_H | |
#define OPENDETECTION_ODCONVTRAINER_H | |
#include "common/pipeline/ODTrainer.h" | |
#include "common/utils/utils.h" | |
#include <opencv2/opencv.hpp> | |
#include <cstring> | |
#include <cstdlib> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <stdio.h> | |
#include "caffe/caffe.hpp" | |
#include "caffe/util/io.hpp" | |
#include "caffe/blob.hpp" | |
#include "caffe/solver.hpp" | |
#include "caffe/sgd_solvers.hpp" | |
using namespace caffe; | |
using namespace std; | |
using namespace cv; | |
namespace od | |
{ | |
namespace g2d | |
{ | |
class ODConvTrainer : public ODTrainer | |
{ | |
//we can probably change its constructor and set solver location there, | |
public: | |
ODConvTrainer(std::string const &training_input_location_ = "", std::string const &trained_data_location_ = ""):ODTrainer(training_input_location_, trained_data_location_){} | |
int train(); // if we set the solver state in the constructer then we can use train to start training | |
void init(){} // or init | |
void setSolverLocation(std::string location); | |
std::string getSolverLocation(); | |
void startTraining(); | |
void fineTuning(std::string const &weight_file_location); | |
void resumeTraining(std::string const &weight_file_location, std::string const &solver_state_location); | |
void test(std::string const &weight_file_location); | |
private: | |
std::string solverLocation; | |
}; | |
} | |
} | |
#endif //OPENDETECTION_ODCONVTRAINER_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment