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 C10_DEFINE_string(plan,
"",
"The given path to the plan protobuffer.");
25 int main(
int argc,
char** argv) {
27 if (FLAGS_plan.size() == 0) {
28 LOG(ERROR) <<
"No plan specified. Use --plan=/path/to/plan.";
31 LOG(INFO) <<
"Loading plan: " << FLAGS_plan;
32 caffe2::PlanDef plan_def;
33 CAFFE_ENFORCE(ReadProtoFromFile(FLAGS_plan, &plan_def));
35 workspace->RunPlan(plan_def);
38 caffe2::ShutdownProtobufLibrary();
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
bool GlobalInit(int *pargc, char ***pargv)
Initialize the global environment of caffe2.