![]() |
ETRI IVCL 1.0.0
Acceleration SW Platform for Ondevice
|
#include <gflags/gflags.h>#include <glog/logging.h>#include <cstring>#include <map>#include <string>#include <vector>#include "boost/algorithm/string.hpp"#include "caffe/caffe.hpp"#include "caffe/util/signal_handler.h"Macros | |
| #define | RegisterBrewFunction(func) |
Typedefs | |
| typedef int(* | BrewFunction) () |
| typedef std::map< caffe::string, BrewFunction > | BrewMap |
Functions | |
| DEFINE_string (gpu, "", "Optional; run in GPU mode on given device IDs separated by ','." "Use '-gpu all' to run on all available GPUs. The effective training " "batch size is multiplied by the number of devices.") | |
| DEFINE_string (solver, "", "The solver definition protocol buffer text file.") | |
| DEFINE_string (model, "", "The model definition protocol buffer text file.") | |
| DEFINE_string (phase, "", "Optional; network phase (TRAIN or TEST). Only used for 'time'.") | |
| DEFINE_int32 (level, 0, "Optional; network level.") | |
| DEFINE_string (stage, "", "Optional; network stages (not to be confused with phase), " "separated by ','.") | |
| DEFINE_string (snapshot, "", "Optional; the snapshot solver state to resume training.") | |
| DEFINE_string (weights, "", "Optional; the pretrained weights to initialize finetuning, " "separated by ','. Cannot be set simultaneously with snapshot.") | |
| DEFINE_int32 (iterations, 50, "The number of iterations to run.") | |
| DEFINE_string (sigint_effect, "stop", "Optional; action to take when a SIGINT signal is received: " "snapshot, stop or none.") | |
| DEFINE_string (sighup_effect, "snapshot", "Optional; action to take when a SIGHUP signal is received: " "snapshot, stop or none.") | |
| caffe::Phase | get_phase_from_flags (caffe::Phase default_value) |
| vector< string > | get_stages_from_flags () |
| int | device_query () |
| RegisterBrewFunction (device_query) | |
| caffe::SolverAction::Enum | GetRequestedAction (const std::string &flag_value) |
| int | train () |
| RegisterBrewFunction (train) | |
| int | test () |
| RegisterBrewFunction (test) | |
| int | time () |
| RegisterBrewFunction (time) | |
| int | main (int argc, char **argv) |
Variables | |
| BrewMap | g_brew_map |
| #define RegisterBrewFunction | ( | func | ) |
| typedef int(* BrewFunction) () |
| typedef std::map<caffe::string, BrewFunction> BrewMap |
| DEFINE_int32 | ( | iterations | , |
| 50 | , | ||
| "The number of iterations to run." | |||
| ) |
| DEFINE_int32 | ( | level | , |
| 0 | , | ||
| "Optional; network level." | |||
| ) |
| DEFINE_string | ( | gpu | , |
| "" | , | ||
| "Optional; run in GPU mode on given device IDs separated by ' | , | ||
| '." "Use '-gpu all' to run on all available GPUs. The effective training " "batch size is multiplied by the number of devices." | |||
| ) |
| DEFINE_string | ( | model | , |
| "" | , | ||
| "The model definition protocol buffer text file." | |||
| ) |
| DEFINE_string | ( | sighup_effect | , |
| "snapshot" | , | ||
| "Optional; action to take when a SIGHUP signal is received: " " | snapshot, | ||
| stop or none." | |||
| ) |
| DEFINE_string | ( | sigint_effect | , |
| "stop" | , | ||
| "Optional; action to take when a SIGINT signal is received: " " | snapshot, | ||
| stop or none." | |||
| ) |
| DEFINE_string | ( | snapshot | , |
| "" | , | ||
| "Optional; the snapshot solver state to resume training." | |||
| ) |
| DEFINE_string | ( | solver | , |
| "" | , | ||
| "The solver definition protocol buffer text file." | |||
| ) |
| DEFINE_string | ( | stage | , |
| "" | , | ||
| "Optional; network stages | not to be confused with phase, | ||
| " "separated by ' | , | ||
| '." | |||
| ) |
| DEFINE_string | ( | weights | , |
| "" | , | ||
| "Optional; the pretrained weights to initialize | finetuning, | ||
| " "separated by ' | , | ||
| '. Cannot be set simultaneously with snapshot." | |||
| ) |
| int device_query | ( | ) |
| caffe::Phase get_phase_from_flags | ( | caffe::Phase | default_value | ) |
| vector< string > get_stages_from_flags | ( | ) |
| caffe::SolverAction::Enum GetRequestedAction | ( | const std::string & | flag_value | ) |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| RegisterBrewFunction | ( | device_query | ) |
| RegisterBrewFunction | ( | test | ) |
| RegisterBrewFunction | ( | time | ) |
| RegisterBrewFunction | ( | train | ) |
| int test | ( | ) |
| int time | ( | ) |
| int train | ( | ) |
| BrewMap g_brew_map |