17 #include "caffe2/core/init.h" 18 #include "caffe2/core/operator.h" 19 #include "caffe2/proto/caffe2.pb.h" 20 #include "caffe2/utils/proto_utils.h" 21 #include "caffe2/core/logging.h" 23 CAFFE2_DEFINE_string(plan,
"",
"The given path to the plan protobuffer.");
25 int main(
int argc,
char** argv) {
27 if (caffe2::FLAGS_plan.size() == 0) {
28 LOG(ERROR) <<
"No plan specified. Use --plan=/path/to/plan.";
31 LOG(INFO) <<
"Loading plan: " << caffe2::FLAGS_plan;
32 caffe2::PlanDef plan_def;
33 CAFFE_ENFORCE(ReadProtoFromFile(caffe2::FLAGS_plan, &plan_def));
35 workspace->RunPlan(plan_def);
38 caffe2::ShutdownProtobufLibrary();
bool GlobalInit(int *pargc, char ***pargv)
Initialize the global environment of caffe2.
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...