3 #include <unordered_set> 4 #include "caffe2/core/net.h" 5 #include "caffe2/core/tensor.h" 6 #include "caffe2/predictor/predictor_config.h" 12 using TensorList = std::vector<TensorCPU>;
13 using TensorMap = std::unordered_map<std::string, TensorCPU>;
16 const NetDef& init_net,
17 const NetDef& run_net,
20 int optimization = 1);
40 virtual bool operator()(
const TensorList& inputs, TensorList* outputs);
43 bool operator()(
const TensorMap& inputs, TensorList* outputs);
47 bool operator()(
const TensorMap& inputs, TensorMap* outputs);
49 const NetDef& def()
const {
50 return *config_.predict_net;
54 return config_.ws.get();
57 const std::vector<std::string>& input_names()
const {
58 return config_.input_names;
61 const std::vector<std::string>& output_names()
const {
62 return config_.output_names;
66 bool run_map_workspace(
const TensorMap& inputs);
Stores parameters nessasary for creating a PredictorInterface object.
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...