9 #ifndef PHYSICSTOOLS_TENSORFLOW_TENSORFLOW_H
10 #define PHYSICSTOOLS_TENSORFLOW_TENSORFLOW_H
12 #include "tensorflow/core/framework/tensor.h"
13 #include "tensorflow/core/lib/core/threadpool.h"
14 #include "tensorflow/core/lib/io/path.h"
15 #include "tensorflow/core/public/session.h"
16 #include "tensorflow/core/util/tensor_bundle/naming.h"
17 #include "tensorflow/cc/client/client_session.h"
18 #include "tensorflow/cc/saved_model/loader.h"
19 #include "tensorflow/cc/saved_model/constants.h"
20 #include "tensorflow/cc/saved_model/tag_constants.h"
27 namespace tensorflow {
36 void setThreading(SessionOptions& sessionOptions,
int nThreads = 1);
81 SessionOptions& sessionOptions);
109 const std::vector<std::string>& outputNames,
110 std::vector<Tensor>* outputs,
111 const thread::ThreadPoolOptions& threadPoolOptions);
118 const std::vector<std::string>& outputNames,
119 std::vector<Tensor>* outputs,
120 thread::ThreadPoolInterface* threadPool);
127 const std::vector<std::string>& outputNames,
128 std::vector<Tensor>* outputs,
135 const std::vector<std::string>& outputNames,
136 std::vector<Tensor>* outputs,
141 #endif // PHYSICSTOOLS_TENSORFLOW_TENSORFLOW_H
Session * createSession(SessionOptions &sessionOptions)
std::vector< NamedTensor > NamedTensorList
GraphDef * loadGraphDef(const std::string &pbFile)
MetaGraphDef * loadMetaGraph(const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
std::pair< std::string, Tensor > NamedTensor
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
bool closeSession(Session *&session)
void setLogging(const std::string &level="3")
MetaGraphDef * loadMetaGraphDef(const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)