Files
pytorch/caffe2/predictor/predictor_utils.h
Shashank Singh f1bfe6750f Back out "[caffe2] Update blackbox predictor with new constructor" (#11105)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11105

Reverts: D9516972

See this discussion for context: https://fburl.com/w45hb1oc

Reviewed By: highker

Differential Revision: D9587931

fbshipit-source-id: 715247929d819dfa88e1d051021e51c5bf0c4835
2018-08-31 00:55:36 -07:00

28 lines
805 B
C++

#pragma once
#include "caffe2/core/db.h"
#include "caffe2/core/workspace.h"
#include "caffe2/predictor/predictor_config.h"
#include "caffe2/proto/metanet.pb.h"
namespace caffe2 {
namespace predictor_utils {
CAFFE2_API const NetDef& getNet(const MetaNetDef& def, const std::string& name);
const ::google::protobuf::RepeatedPtrField<::std::string>& getBlobs(
const MetaNetDef& def,
const std::string& name);
CAFFE2_API std::unique_ptr<MetaNetDef> extractMetaNetDef(
db::Cursor* cursor,
const std::string& key);
// Extract the MetaNetDef from `db`, and run the global init net on the
// `master` workspace.
CAFFE2_API std::unique_ptr<MetaNetDef> runGlobalInitialization(
std::unique_ptr<db::DBReader> db,
Workspace* master);
} // namespace predictor_utils
} // namespace caffe2