Wrapper for Tensorflow which handles construction and prediction. More...
Public Member Functions | |
TFHandler (std::string model, int CPUlimit=1) | |
Basic constructor, takes path to model pb. More... | |
~TFHandler () | |
void | Initialize (int CPUlimit) |
std::vector< Tensor > | Predict (std::vector< std::pair< std::string, Tensor >> inputs, std::vector< std::string > outputLabels) |
Private Attributes | |
Session * | fSession |
std::string | fModelPath |
Wrapper for Tensorflow which handles construction and prediction.
Definition at line 19 of file TFHandler.h.
tensorflow::TFHandler::TFHandler | ( | std::string | model, |
int | CPUlimit = 1 |
||
) |
Basic constructor, takes path to model pb.
Definition at line 18 of file TFHandler.cxx.
References Initialize().
tensorflow::TFHandler::~TFHandler | ( | ) |
Definition at line 30 of file TFHandler.cxx.
References om::cout, allTimeWatchdog::endl, fModelPath, fSession, fabricate::options, and fabricate::status.
Referenced by TFHandler().
std::vector< Tensor > tensorflow::TFHandler::Predict | ( | std::vector< std::pair< std::string, Tensor >> | inputs, |
std::vector< std::string > | outputLabels | ||
) |
Definition at line 64 of file TFHandler.cxx.
References om::cout, allTimeWatchdog::endl, fSession, dumpEventsToText::inputs, dumpEventsToText::outputs, and fabricate::status.
Referenced by cvnneutronprongtf::CVNNeutronProngTF::CalcResult(), cvntf::CVNTF::produce(), cvntf::CVNCosmicTF::produce(), regcvntf::RegCVNTF::produce(), nuonecvntf::NuonECVNTF::produce(), cvnprongtf::CVNProngTF::produce(), cvneventtf::CVNEventTF::produce(), cvntf::CVNProngEvaluatorTF::produce(), and nerd::NERDEval::run_graph().
|
private |
Definition at line 32 of file TFHandler.h.
Referenced by Initialize().
|
private |
Definition at line 31 of file TFHandler.h.
Referenced by Initialize(), Predict(), and ~TFHandler().