#include <TFModel.h>
Public Member Functions | |
TFModel (const std::string &savedir, const std::vector< InputConfigKeys > &scalarInputKeys, const std::vector< InputConfigKeys > &vectorInputKeys, const std::vector< std::string > &outputKeys) | |
void | ensure_initialized () const |
std::vector< tensorflow::Tensor > | predict (const VarDict &vars) const |
Private Member Functions | |
void | initTFSession () const |
Static Private Member Functions | |
static tensorflow::Tensor | constructDummyVectorInput (const std::vector< std::string > &vars, float fillValue=0.0) |
static tensorflow::Tensor | constructScalarInput (const std::unordered_map< std::string, double > &varMap, const std::vector< std::string > &vars) |
static tensorflow::Tensor | constructVectorInput (const std::unordered_map< std::string, std::vector< double >> &varMap, const std::vector< std::string > &vars) |
Private Attributes | |
ModelConfig | config |
std::shared_ptr< tensorflow::Session > | tfSession |
bool | initialized |
TFModel::TFModel | ( | const std::string & | savedir, |
const std::vector< InputConfigKeys > & | scalarInputKeys, | ||
const std::vector< InputConfigKeys > & | vectorInputKeys, | ||
const std::vector< std::string > & | outputKeys | ||
) |
Definition at line 17 of file TFModel.cxx.
|
staticprivate |
Definition at line 27 of file TFModel.cxx.
|
staticprivate |
Definition at line 44 of file TFModel.cxx.
|
staticprivate |
Definition at line 61 of file TFModel.cxx.
void TFModel::ensure_initialized | ( | ) | const |
Definition at line 135 of file TFModel.cxx.
|
private |
Definition at line 101 of file TFModel.cxx.
std::vector< Tensor > TFModel::predict | ( | const VarDict & | vars | ) | const |
Definition at line 147 of file TFModel.cxx.
|
mutableprivate |
|
mutableprivate |