#include <EgammaDNNHelper.h>
Public Member Functions | |
EgammaDNNHelper (const DNNConfiguration &, const ModelSelector &sel, const std::vector< std::string > &availableVars) | |
std::vector< std::vector< float > > | evaluate (const std::vector< std::map< std::string, float >> &candidates, const std::vector< tensorflow::Session * > &sessions) const |
std::pair< uint, std::vector < float > > | getScaledInputs (const std::map< std::string, float > &variables) const |
std::vector < tensorflow::Session * > | getSessions () const |
Private Member Functions | |
void | initScalerFiles (const std::vector< std::string > &availableVars) |
void | initTensorFlowGraphs () |
Private Attributes | |
const DNNConfiguration | cfg_ |
std::vector< std::vector < ScalerConfiguration > > | featuresMap_ |
std::vector< std::unique_ptr < const tensorflow::GraphDef > > | graphDefs_ |
const ModelSelector | modelSelector_ |
std::vector< uint > | nInputs_ |
uint | nModels_ |
Definition at line 41 of file EgammaDNNHelper.h.
EgammaDNNHelper::EgammaDNNHelper | ( | const DNNConfiguration & | cfg, |
const ModelSelector & | sel, | ||
const std::vector< std::string > & | availableVars | ||
) |
Definition at line 9 of file EgammaDNNHelper.cc.
References initScalerFiles(), and initTensorFlowGraphs().
std::vector< std::vector< float > > EgammaDNNHelper::evaluate | ( | const std::vector< std::map< std::string, float >> & | candidates, |
const std::vector< tensorflow::Session * > & | sessions | ||
) | const |
Definition at line 100 of file EgammaDNNHelper.cc.
References a, b, HLT_FULL_cff::candidates, cfg_, dqmiodumpmetadata::counts, data, getScaledInputs(), mps_fire::i, PixelMapPlotter::inputs, egammaTools::DNNConfiguration::inputTensorName, isotrackApplyRegressor::k, LogDebug, visualization-live-secondInstance_cfg::m, nInputs_, nModels_, convertSQLitetoXML_cfg::output, egammaTools::DNNConfiguration::outputDim, egammaTools::DNNConfiguration::outputTensorName, alignCSCRings::r, mps_fire::result, tensorflow::run(), HcalDetIdTransform::transform(), and parallelization::uint().
Referenced by ElectronDNNEstimator::evaluate(), and PhotonDNNEstimator::evaluate().
std::pair< uint, std::vector< float > > EgammaDNNHelper::getScaledInputs | ( | const std::map< std::string, float > & | variables | ) | const |
Definition at line 76 of file EgammaDNNHelper.cc.
References featuresMap_, PixelMapPlotter::inputs, and modelSelector_.
Referenced by evaluate().
std::vector< tensorflow::Session * > EgammaDNNHelper::getSessions | ( | ) | const |
Definition at line 28 of file EgammaDNNHelper.cc.
References tensorflow::createSession(), graphDefs_, LogDebug, and nModels_.
Referenced by ElectronDNNEstimator::getSessions(), and PhotonDNNEstimator::getSessions().
|
private |
Definition at line 38 of file EgammaDNNHelper.cc.
References cfg_, dataset::end, Exception, lowptgsfeleseed::features(), featuresMap_, spr::find(), edm::FileInPath::fullPath(), match(), nInputs_, egammaTools::DNNConfiguration::scalersFiles, AlCaHLTBitMon_QueryRunRegistry::string, parallelization::uint(), and egammaTools::ScalerConfiguration::varName.
Referenced by EgammaDNNHelper().
|
private |
Definition at line 17 of file EgammaDNNHelper.cc.
References cfg_, contentValuesFiles::fullPath, graphDefs_, mps_fire::i, tensorflow::loadGraphDef(), LogDebug, egammaTools::DNNConfiguration::modelsFiles, and nModels_.
Referenced by EgammaDNNHelper().
|
private |
Definition at line 59 of file EgammaDNNHelper.h.
Referenced by evaluate(), initScalerFiles(), and initTensorFlowGraphs().
|
private |
Definition at line 69 of file EgammaDNNHelper.h.
Referenced by getScaledInputs(), and initScalerFiles().
|
private |
Definition at line 66 of file EgammaDNNHelper.h.
Referenced by getSessions(), and initTensorFlowGraphs().
|
private |
Definition at line 60 of file EgammaDNNHelper.h.
Referenced by getScaledInputs().
|
private |
Definition at line 64 of file EgammaDNNHelper.h.
Referenced by evaluate(), and initScalerFiles().
|
private |
Definition at line 62 of file EgammaDNNHelper.h.
Referenced by evaluate(), getSessions(), and initTensorFlowGraphs().