LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TFLoader.h
Go to the documentation of this file.
1 // Class: TFLoader
3 // Plugin Type: tool
4 // File: TFLoader.cc TFLoader.h
5 // Aug. 20, 2022 by Mu Wei (wmu@fnal.gov)
7 #ifndef TFLoader_H
8 #define TFLoader_H
9 
10 #include <memory>
11 #include <string>
12 #include <vector>
13 
14 //#include "tensorflow/core/public/session.h"
15 //#include "tensorflow/core/platform/env.h"
16 
17 #include "tensorflow/cc/saved_model/loader.h"
18 #include "tensorflow/cc/saved_model/tag_constants.h"
19 
20 //namespace tensorflow
21 //{
22 // class Session;
23 // class Tensor;
24 // struct SavedModelBundle;
25 //}
26 
27 namespace phot {
28  class TFLoader {
29  public:
30  TFLoader();
31  virtual ~TFLoader() = default;
32 
33  virtual void Initialization() = 0;
34  virtual void CloseSession() = 0;
35  virtual void Predict(std::vector<double> pars) = 0;
36  std::vector<double> GetPrediction() const { return prediction; }
37 
38  protected:
39  std::vector<double> prediction;
40  };
41 }
42 #endif
virtual ~TFLoader()=default
virtual void CloseSession()=0
std::vector< double > GetPrediction() const
Definition: TFLoader.h:36
std::vector< double > prediction
Definition: TFLoader.h:39
General LArSoft Utilities.
virtual void Initialization()=0
virtual void Predict(std::vector< double > pars)=0