CMS 3D CMS Logo

Classes | Typedefs | Functions
tensorflow Namespace Reference

Classes

class  NoThreadPool
 
struct  SessionCache
 
class  TBBThreadPool
 

Typedefs

typedef std::pair< std::string, Tensor > NamedTensor
 
typedef std::vector< NamedTensorNamedTensorList
 

Functions

bool closeSession (Session *&session)
 
bool closeSession (const Session *&session)
 
SessioncreateSession (SessionOptions &sessionOptions)
 
SessioncreateSession (int nThreads=1)
 
SessioncreateSession (const MetaGraphDef *metaGraphDef, const std::string &exportDir, SessionOptions &sessionOptions)
 
SessioncreateSession (const MetaGraphDef *metaGraphDef, const std::string &exportDir, int nThreads=1)
 
SessioncreateSession (const GraphDef *graphDef, SessionOptions &sessionOptions)
 
SessioncreateSession (const GraphDef *graphDef, int nThreads=1)
 
GraphDef * loadGraphDef (const std::string &pbFile)
 
MetaGraphDef * loadMetaGraph (const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
 
MetaGraphDef * loadMetaGraph (const std::string &exportDir, const std::string &tag=kSavedModelTagServe, int nThreads=1)
 
MetaGraphDef * loadMetaGraphDef (const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
 
MetaGraphDef * loadMetaGraphDef (const std::string &exportDir, const std::string &tag=kSavedModelTagServe, int nThreads=1)
 
void run (Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
 
void run (const Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
 
void run (Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, thread::ThreadPoolInterface *threadPool)
 
void run (const Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, thread::ThreadPoolInterface *threadPool)
 
void run (Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
 
void run (const Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
 
void run (Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
 
void run (const Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
 
void setLogging (const std::string &level="3")
 
void setThreading (SessionOptions &sessionOptions, int nThreads=1)
 
void setThreading (SessionOptions &sessionOptions, int nThreads, const std::string &singleThreadPool)
 

Typedef Documentation

◆ NamedTensor

typedef std::pair<std::string, Tensor> tensorflow::NamedTensor

Definition at line 28 of file TensorFlow.h.

◆ NamedTensorList

Definition at line 29 of file TensorFlow.h.

Function Documentation

◆ closeSession() [1/2]

bool tensorflow::closeSession ( Session *&  session)

Definition at line 197 of file TensorFlow.cc.

References mps_update::status.

Referenced by closeSession(), tensorflow::SessionCache::closeSession(), DTOccupancyTestML::dqmEndLuminosityBlock(), GEDPhotonProducer::endStream(), GsfElectronProducer::endStream(), L2TauNNProducer::globalEndJob(), BaseMVACache::~BaseMVACache(), reco::DeepSCGraphEvaluation::~DeepSCGraphEvaluation(), deep_tau::DeepTauCache::~DeepTauCache(), PtAssignmentEngineDxy::~PtAssignmentEngineDxy(), TfGraphDefWrapper::~TfGraphDefWrapper(), and TSGForOIDNN::~TSGForOIDNN().

197  {
198  if (session == nullptr) {
199  return true;
200  }
201 
202  // close and delete the session
203  Status status = session->Close();
204  delete session;
205 
206  // reset the pointer
207  session = nullptr;
208 
209  return status.ok();
210  }

◆ closeSession() [2/2]

bool tensorflow::closeSession ( const Session *&  session)

Definition at line 212 of file TensorFlow.cc.

References closeSession(), and alignCSCRings::s.

212  {
213  auto s = const_cast<Session*>(session);
214  bool state = closeSession(s);
215 
216  // reset the pointer
217  session = nullptr;
218 
219  return state;
220  }
bool closeSession(Session *&session)
Definition: TensorFlow.cc:197

◆ createSession() [1/6]

Session * tensorflow::createSession ( SessionOptions &  sessionOptions)

Definition at line 84 of file TensorFlow.cc.

References Exception, and mps_update::status.

Referenced by BaseMVACache::BaseMVACache(), PtAssignmentEngineDxy::configure(), createSession(), tensorflow::SessionCache::createSession(), deep_tau::DeepTauCache::DeepTauCache(), DTOccupancyTestML::dqmEndLuminosityBlock(), egammaTools::EgammaDNNHelper::getSessions(), HGCalConcentratorAutoEncoderImpl::HGCalConcentratorAutoEncoderImpl(), L2TauNNProducer::initializeGlobalCache(), reco::DeepSCGraphEvaluation::initTensorFlowGraphAndSession(), TfGraphDefProducer::produce(), and TSGForOIDNN::TSGForOIDNN().

84  {
85  // objects to create the session
86  Status status;
87 
88  // create a new, empty session
89  Session* session = nullptr;
90  status = NewSession(sessionOptions, &session);
91  if (!status.ok()) {
92  throw cms::Exception("InvalidSession") << "error while creating session: " << status.ToString();
93  }
94 
95  return session;
96  }

◆ createSession() [2/6]

Session * tensorflow::createSession ( int  nThreads = 1)

Definition at line 98 of file TensorFlow.cc.

References createSession(), and setThreading().

98  {
99  // create session options and set thread options
100  SessionOptions sessionOptions;
101  setThreading(sessionOptions, nThreads);
102 
103  return createSession(sessionOptions);
104  }
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:84
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
Definition: TensorFlow.cc:16

◆ createSession() [3/6]

Session * tensorflow::createSession ( const MetaGraphDef *  metaGraphDef,
const std::string &  exportDir,
SessionOptions &  sessionOptions 
)

Definition at line 106 of file TensorFlow.cc.

References createSession(), cms::soa::RestrictQualify::Default, Exception, convertSQLiteXML::ok, mps_update::status, and AlCaHLTBitMon_QueryRunRegistry::string.

108  {
109  // check for valid pointer
110  if (metaGraphDef == nullptr) {
111  throw cms::Exception("InvalidMetaGraphDef") << "error while creating session: metaGraphDef is nullptr";
112  }
113 
114  // check that the graph has nodes
115  if (metaGraphDef->graph_def().node_size() <= 0) {
116  throw cms::Exception("InvalidMetaGraphDef") << "error while creating session: graphDef has no nodes";
117  }
118 
119  Session* session = createSession(sessionOptions);
120 
121  // add the graph def from the meta graph
122  Status status;
123  status = session->Create(metaGraphDef->graph_def());
124  if (!status.ok()) {
125  throw cms::Exception("InvalidMetaGraphDef")
126  << "error while attaching metaGraphDef to session: " << status.ToString();
127  }
128 
129  // restore variables using the variable and index files in the export directory
130  // first, find names and paths
131  std::string varFileTensorName = metaGraphDef->saver_def().filename_tensor_name();
132  std::string restoreOpName = metaGraphDef->saver_def().restore_op_name();
133  std::string varDir = io::JoinPath(exportDir, kSavedModelVariablesDirectory);
134  std::string indexFile = io::JoinPath(varDir, MetaFilename(kSavedModelVariablesFilename));
135  std::string varFile = io::JoinPath(varDir, kSavedModelVariablesFilename);
136 
137  // when the index file is missing, there's nothing to do
138  if (!Env::Default()->FileExists(indexFile).ok()) {
139  return session;
140  }
141 
142  // create a tensor to store the variable file
143  Tensor varFileTensor(DT_STRING, TensorShape({}));
144  varFileTensor.scalar<tensorflow::tstring>()() = varFile;
145 
146  // run the restore op
147  status = session->Run({{varFileTensorName, varFileTensor}}, {}, {restoreOpName}, nullptr);
148  if (!status.ok()) {
149  throw cms::Exception("InvalidSession") << "error while restoring variables in session: " << status.ToString();
150  }
151 
152  return session;
153  }
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:84
constexpr bool Default
Definition: SoACommon.h:73

◆ createSession() [4/6]

Session * tensorflow::createSession ( const MetaGraphDef *  metaGraphDef,
const std::string &  exportDir,
int  nThreads = 1 
)

Definition at line 155 of file TensorFlow.cc.

References createSession(), and setThreading().

155  {
156  // create session options and set thread options
157  SessionOptions sessionOptions;
158  setThreading(sessionOptions, nThreads);
159 
160  return createSession(metaGraphDef, exportDir, sessionOptions);
161  }
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:84
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
Definition: TensorFlow.cc:16

◆ createSession() [5/6]

Session * tensorflow::createSession ( const GraphDef *  graphDef,
SessionOptions &  sessionOptions 
)

Definition at line 163 of file TensorFlow.cc.

References createSession(), Exception, and mps_update::status.

163  {
164  // check for valid pointer
165  if (graphDef == nullptr) {
166  throw cms::Exception("InvalidGraphDef") << "error while creating session: graphDef is nullptr";
167  }
168 
169  // check that the graph has nodes
170  if (graphDef->node_size() <= 0) {
171  throw cms::Exception("InvalidGraphDef") << "error while creating session: graphDef has no nodes";
172  }
173 
174  // create a new, empty session
175  Session* session = createSession(sessionOptions);
176 
177  // add the graph def
178  Status status;
179  status = session->Create(*graphDef);
180 
181  // check for success
182  if (!status.ok()) {
183  throw cms::Exception("InvalidSession") << "error while attaching graphDef to session: " << status.ToString();
184  }
185 
186  return session;
187  }
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:84

◆ createSession() [6/6]

Session * tensorflow::createSession ( const GraphDef *  graphDef,
int  nThreads = 1 
)

Definition at line 189 of file TensorFlow.cc.

References createSession(), and setThreading().

189  {
190  // create session options and set thread options
191  SessionOptions sessionOptions;
192  setThreading(sessionOptions, nThreads);
193 
194  return createSession(graphDef, sessionOptions);
195  }
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:84
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
Definition: TensorFlow.cc:16

◆ loadGraphDef()

GraphDef * tensorflow::loadGraphDef ( const std::string &  pbFile)

Definition at line 67 of file TensorFlow.cc.

References cms::soa::RestrictQualify::Default, Exception, and mps_update::status.

Referenced by BaseMVACache::BaseMVACache(), PtAssignmentEngineDxy::configure(), tensorflow::SessionCache::createSession(), deep_tau::DeepTauCache::DeepTauCache(), DTOccupancyTestML::dqmEndLuminosityBlock(), HGCalConcentratorAutoEncoderImpl::HGCalConcentratorAutoEncoderImpl(), L2TauNNProducer::initializeGlobalCache(), reco::DeepSCGraphEvaluation::initTensorFlowGraphAndSession(), egammaTools::EgammaDNNHelper::initTensorFlowGraphs(), TfGraphDefProducer::produce(), and TSGForOIDNN::TSGForOIDNN().

67  {
68  // objects to load the graph
69  Status status;
70 
71  // load it
72  GraphDef* graphDef = new GraphDef();
73  status = ReadBinaryProto(Env::Default(), pbFile, graphDef);
74 
75  // check for success
76  if (!status.ok()) {
77  throw cms::Exception("InvalidGraphDef")
78  << "error while loading graphDef from '" << pbFile << "': " << status.ToString();
79  }
80 
81  return graphDef;
82  }
constexpr bool Default
Definition: SoACommon.h:73

◆ loadMetaGraph() [1/2]

MetaGraphDef * tensorflow::loadMetaGraph ( const std::string &  exportDir,
const std::string &  tag,
SessionOptions &  sessionOptions 
)

Definition at line 45 of file TensorFlow.cc.

References loadMetaGraphDef(), and makeGlobalPositionRcd_cfg::tag.

45  {
46  edm::LogInfo("PhysicsTools/TensorFlow")
47  << "tensorflow::loadMetaGraph() is deprecated, use tensorflow::loadMetaGraphDef() instead";
48 
49  return loadMetaGraphDef(exportDir, tag, sessionOptions);
50  }
Log< level::Info, false > LogInfo
MetaGraphDef * loadMetaGraphDef(const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
Definition: TensorFlow.cc:28

◆ loadMetaGraph() [2/2]

MetaGraphDef * tensorflow::loadMetaGraph ( const std::string &  exportDir,
const std::string &  tag = kSavedModelTagServe,
int  nThreads = 1 
)

Definition at line 60 of file TensorFlow.cc.

References loadMetaGraphDef(), and makeGlobalPositionRcd_cfg::tag.

60  {
61  edm::LogInfo("PhysicsTools/TensorFlow")
62  << "tensorflow::loadMetaGraph() is deprecated, use tensorflow::loadMetaGraphDef() instead";
63 
64  return loadMetaGraphDef(exportDir, tag, nThreads);
65  }
Log< level::Info, false > LogInfo
MetaGraphDef * loadMetaGraphDef(const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
Definition: TensorFlow.cc:28

◆ loadMetaGraphDef() [1/2]

MetaGraphDef * tensorflow::loadMetaGraphDef ( const std::string &  exportDir,
const std::string &  tag,
SessionOptions &  sessionOptions 
)

Definition at line 28 of file TensorFlow.cc.

References Exception, mps_update::status, and makeGlobalPositionRcd_cfg::tag.

Referenced by loadMetaGraph(), and loadMetaGraphDef().

28  {
29  // objects to load the graph
30  Status status;
31  RunOptions runOptions;
32  SavedModelBundle bundle;
33 
34  // load the model
35  status = LoadSavedModel(sessionOptions, runOptions, exportDir, {tag}, &bundle);
36  if (!status.ok()) {
37  throw cms::Exception("InvalidMetaGraphDef")
38  << "error while loading metaGraphDef from '" << exportDir << "': " << status.ToString();
39  }
40 
41  // return a copy of the graph
42  return new MetaGraphDef(bundle.meta_graph_def);
43  }

◆ loadMetaGraphDef() [2/2]

MetaGraphDef * tensorflow::loadMetaGraphDef ( const std::string &  exportDir,
const std::string &  tag = kSavedModelTagServe,
int  nThreads = 1 
)

Definition at line 52 of file TensorFlow.cc.

References loadMetaGraphDef(), setThreading(), and makeGlobalPositionRcd_cfg::tag.

52  {
53  // create session options and set thread options
54  SessionOptions sessionOptions;
55  setThreading(sessionOptions, nThreads);
56 
57  return loadMetaGraphDef(exportDir, tag, sessionOptions);
58  }
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
Definition: TensorFlow.cc:16
MetaGraphDef * loadMetaGraphDef(const std::string &exportDir, const std::string &tag, SessionOptions &sessionOptions)
Definition: TensorFlow.cc:28

◆ run() [1/8]

void tensorflow::run ( Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const thread::ThreadPoolOptions &  threadPoolOptions 
)

Definition at line 222 of file TensorFlow.cc.

References Exception, PixelMapPlotter::inputs, jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and mps_update::status.

Referenced by PtAssignmentEngineDxy::call_tensorflow_dxy(), MkFitOutputConverter::computeDNNs(), ticl::PatternRecognitionbyCLUE3D< TILES >::energyRegressionAndID(), ticl::PatternRecognitionbyCA< TILES >::energyRegressionAndID(), ticl::PatternRecognitionbyFastJet< TILES >::energyRegressionAndID(), TrackstersMergeProducerV3::energyRegressionAndID(), TrackstersMergeProducer::energyRegressionAndID(), egammaTools::EgammaDNNHelper::evaluate(), reco::DeepSCGraphEvaluation::evaluate(), TSGForOIDNN::evaluateClassifier(), TauNNId::EvaluateNN(), TSGForOIDNN::evaluateRegressor(), DeepTauId::getPartialPredictions(), DeepTauId::getPredictionsV2(), L2TauNNProducer::getTauScore(), DeepMETProducer::produce(), BaseMVAValueMapProducer< pat::Muon >::produce(), run(), DTOccupancyTestML::runOccupancyTest(), DeepCoreSeedGenerator::SeedEvaluation(), and HGCalConcentratorAutoEncoderImpl::select().

226  {
227  if (session == nullptr) {
228  throw cms::Exception("InvalidSession") << "cannot run empty session";
229  }
230 
231  // create empty run options
232  RunOptions runOptions;
233 
234  // run and check the status
235  Status status = session->Run(runOptions, inputs, outputNames, {}, outputs, nullptr, threadPoolOptions);
236  if (!status.ok()) {
237  throw cms::Exception("InvalidRun") << "error while running session: " << status.ToString();
238  }
239  }

◆ run() [2/8]

void tensorflow::run ( const Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const thread::ThreadPoolOptions &  threadPoolOptions 
)
inline

Definition at line 116 of file TensorFlow.h.

References PixelMapPlotter::inputs, jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

120  {
121  // TF takes a non-const session in the run call which is, however, thread-safe and logically
122  // const, thus const_cast is consistent
123  run(const_cast<Session*>(session), inputs, outputNames, outputs, threadPoolOptions);
124  }
void run(const Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
Definition: TensorFlow.h:175

◆ run() [3/8]

void tensorflow::run ( Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
thread::ThreadPoolInterface *  threadPool 
)

Definition at line 241 of file TensorFlow.cc.

References PixelMapPlotter::inputs, jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

245  {
246  // create thread pool options
247  thread::ThreadPoolOptions threadPoolOptions;
248  threadPoolOptions.inter_op_threadpool = threadPool;
249  threadPoolOptions.intra_op_threadpool = threadPool;
250 
251  // run
252  run(session, inputs, outputNames, outputs, threadPoolOptions);
253  }

◆ run() [4/8]

void tensorflow::run ( const Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
thread::ThreadPoolInterface *  threadPool 
)
inline

Definition at line 136 of file TensorFlow.h.

References PixelMapPlotter::inputs, jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

140  {
141  // TF takes a non-const session in the run call which is, however, thread-safe and logically
142  // const, thus const_cast is consistent
143  run(const_cast<Session*>(session), inputs, outputNames, outputs, threadPool);
144  }
void run(const Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
Definition: TensorFlow.h:175

◆ run() [5/8]

void tensorflow::run ( Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const std::string &  threadPoolName = "no_threads" 
)

Definition at line 255 of file TensorFlow.cc.

References Exception, PixelMapPlotter::inputs, tensorflow::NoThreadPool::instance(), tensorflow::TBBThreadPool::instance(), jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

259  {
260  // lookup the thread pool and forward the call accordingly
261  if (threadPoolName == "no_threads") {
263  } else if (threadPoolName == "tbb") {
264  // the TBBTreadPool singleton should be already initialized before with a number of threads
266  } else if (threadPoolName == "tensorflow") {
267  run(session, inputs, outputNames, outputs, nullptr);
268  } else {
269  throw cms::Exception("UnknownThreadPool")
270  << "thread pool implementation'" << threadPoolName << "' unknown, use 'no_threads', 'tbb', or 'tensorflow'";
271  }
272  }
static PFTauRenderPlugin instance

◆ run() [6/8]

void tensorflow::run ( const Session session,
const NamedTensorList inputs,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const std::string &  threadPoolName = "no_threads" 
)
inline

Definition at line 156 of file TensorFlow.h.

References PixelMapPlotter::inputs, jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

160  {
161  // TF takes a non-const session in the run call which is, however, thread-safe and logically
162  // const, thus const_cast is consistent
163  run(const_cast<Session*>(session), inputs, outputNames, outputs, threadPoolName);
164  }
void run(const Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
Definition: TensorFlow.h:175

◆ run() [7/8]

void tensorflow::run ( Session session,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const std::string &  threadPoolName = "no_threads" 
)

◆ run() [8/8]

void tensorflow::run ( const Session session,
const std::vector< std::string > &  outputNames,
std::vector< Tensor > *  outputs,
const std::string &  threadPoolName = "no_threads" 
)
inline

Definition at line 175 of file TensorFlow.h.

References jetsAK4_CHS_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, and run().

178  {
179  // TF takes a non-const session in the run call which is, however, thread-safe and logically
180  // const, thus const_cast is consistent
181  run(const_cast<Session*>(session), outputNames, outputs, threadPoolName);
182  }
void run(const Session *session, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const std::string &threadPoolName="no_threads")
Definition: TensorFlow.h:175

◆ setLogging()

void tensorflow::setLogging ( const std::string &  level = "3")

◆ setThreading() [1/2]

void tensorflow::setThreading ( SessionOptions &  sessionOptions,
int  nThreads = 1 
)

Definition at line 16 of file TensorFlow.cc.

Referenced by createSession(), deep_tau::DeepTauCache::DeepTauCache(), loadMetaGraphDef(), and setThreading().

16  {
17  // set number of threads used for intra and inter operation communication
18  sessionOptions.config.set_intra_op_parallelism_threads(nThreads);
19  sessionOptions.config.set_inter_op_parallelism_threads(nThreads);
20  }

◆ setThreading() [2/2]

void tensorflow::setThreading ( SessionOptions &  sessionOptions,
int  nThreads,
const std::string &  singleThreadPool 
)

Definition at line 22 of file TensorFlow.cc.

References setThreading().

22  {
23  edm::LogInfo("PhysicsTools/TensorFlow") << "setting the thread pool via tensorflow::setThreading() is deprecated";
24 
25  setThreading(sessionOptions, nThreads);
26  }
void setThreading(SessionOptions &sessionOptions, int nThreads=1)
Definition: TensorFlow.cc:16
Log< level::Info, false > LogInfo