4 #include "caffe2/predictor/emulator/data_filler.h" 5 #include "caffe2/predictor/emulator/utils.h" 11 const caffe2::NetDef& netdef;
13 std::string debug_info;
16 const caffe2::NetDef& netdef_,
18 const std::string& info_ =
"")
19 : netdef(netdef_), filler(filler_), debug_info(info_) {}
41 : filler_(std::move(filler)), netdef_(netdef) {}
48 const unique_ptr<Filler> filler_;
49 const caffe2::NetDef netdef_;
60 std::unique_ptr<Filler> filler,
61 caffe2::NetDef netdef,
62 std::shared_ptr<Workspace> ws)
65 std::shared_ptr<Workspace> get_loaded_workspace() {
70 const std::shared_ptr<Workspace> ws_;
76 std::unique_ptr<NetSupplier>&& core,
77 std::function<
void(NetDef*)> m)
78 : core_(std::move(core)), mutator_(m) {}
82 NetDef* new_net =
nullptr;
84 std::lock_guard<std::mutex> guard(lock_);
85 nets_.push_back(orig.netdef);
86 new_net = &nets_.back();
89 return RunnableNet(*new_net, orig.filler, orig.debug_info);
94 std::unique_ptr<NetSupplier> core_;
95 std::vector<NetDef> nets_;
96 std::function<void(NetDef*)> mutator_;
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...