Public Member Functions | Private Attributes | Static Private Attributes | List of all members
VLN::VLNEnergyModel Class Reference

#include <VLNEnergyModel.h>

Public Member Functions

 VLNEnergyModel (const std::string &savedir)
 
VLNEnergy predict (const VarDict &varDict) const
 

Private Attributes

TFModel model
 

Static Private Attributes

static const std::vector< InputConfigKeysscalarInputKeys
 
static const std::vector< InputConfigKeysvectorInputKeys
 
static const std::vector< std::stringoutputKeys
 

Detailed Description

Definition at line 13 of file VLNEnergyModel.h.

Constructor & Destructor Documentation

VLN::VLNEnergyModel::VLNEnergyModel ( const std::string savedir)
explicit

Definition at line 21 of file VLNEnergyModel.cxx.

23 { }
static const std::vector< std::string > outputKeys
static const std::vector< InputConfigKeys > scalarInputKeys
static const std::vector< InputConfigKeys > vectorInputKeys

Member Function Documentation

VLNEnergy VLN::VLNEnergyModel::predict ( const VarDict varDict) const

Definition at line 25 of file VLNEnergyModel.cxx.

26 {
27  std::vector<tensorflow::Tensor> outputs = model.predict(vars);
28 
29  const float primaryE = outputs[0].tensor<float,2>()(0, 0);
30  const float totalE = outputs[1].tensor<float,2>()(0, 0);
31 
32  return VLNEnergy{ primaryE, totalE };
33 }
Definition: model.py:1

Member Data Documentation

TFModel VLN::VLNEnergyModel::model
private

Definition at line 16 of file VLNEnergyModel.h.

const std::vector< std::string > VLN::VLNEnergyModel::outputKeys
staticprivate

Definition at line 20 of file VLNEnergyModel.h.

const std::vector< InputConfigKeys > VLN::VLNEnergyModel::scalarInputKeys
staticprivate

Definition at line 18 of file VLNEnergyModel.h.

const std::vector< InputConfigKeys > VLN::VLNEnergyModel::vectorInputKeys
staticprivate

Definition at line 19 of file VLNEnergyModel.h.


The documentation for this class was generated from the following files: