#include <TRTPIDNN.h>
|
| TRTPIDNN ()=default |
|
virtual | ~TRTPIDNN ()=default |
|
const std::string & | getDefaultOutputNode () const |
|
const std::string & | getDefaultOutputLabel () const |
|
const std::map< std::string, std::map< std::string, double > > & | getScalarInputs () const |
|
const std::map< std::string, std::map< std::string, std::vector< double > > > & | getVectorInputs () const |
|
double | evaluate (std::map< std::string, std::map< std::string, double >> &scalarInputs, std::map< std::string, std::map< std::string, std::vector< double >>> &vectorInputs) const |
|
double | evaluate (std::map< std::string, std::map< std::string, double >> &scalarInputs, std::map< std::string, std::map< std::string, std::vector< double >>> &vectorInputs, const std::string &outputNode, const std::string &outputLabel) const |
|
StatusCode | configure (const std::string &json) |
|
Definition at line 28 of file TRTPIDNN.h.
◆ TRTPIDNN()
InDet::TRTPIDNN::TRTPIDNN |
( |
| ) |
|
|
default |
◆ ~TRTPIDNN()
virtual InDet::TRTPIDNN::~TRTPIDNN |
( |
| ) |
|
|
virtualdefault |
◆ configure()
StatusCode InDet::TRTPIDNN::configure |
( |
const std::string & |
json | ) |
|
Definition at line 35 of file TRTPIDNN.cxx.
38 std::istringstream inputCfg(
json);
40 }
catch (boost::property_tree::ptree_error&
err) {
41 log << MSG::ERROR <<
" NN not readable: " <<
err.what() <<
endmsg;
42 return StatusCode::FAILURE;
47 }
catch (lwt::NNConfigurationException&
err) {
48 log << MSG::ERROR <<
" NN configuration failed: " <<
err.what() <<
endmsg;
49 return StatusCode::FAILURE;
54 log << MSG::ERROR <<
" unable to define NN output." <<
endmsg;
55 return StatusCode::FAILURE;
76 return StatusCode::SUCCESS;
◆ evaluate() [1/2]
double InDet::TRTPIDNN::evaluate |
( |
std::map< std::string, std::map< std::string, double >> & |
scalarInputs, |
|
|
std::map< std::string, std::map< std::string, std::vector< double >>> & |
vectorInputs |
|
) |
| const |
|
inline |
◆ evaluate() [2/2]
double InDet::TRTPIDNN::evaluate |
( |
std::map< std::string, std::map< std::string, double >> & |
scalarInputs, |
|
|
std::map< std::string, std::map< std::string, std::vector< double >>> & |
vectorInputs, |
|
|
const std::string & |
outputNode, |
|
|
const std::string & |
outputLabel |
|
) |
| const |
Definition at line 22 of file TRTPIDNN.cxx.
26 const auto result =
m_nn->compute(scalarInputs, vectorInputs, outputNode);
28 if (itResult ==
result.end()) {
29 log << MSG::ERROR <<
" unable to find output: node=" << outputNode <<
", label=" <<
outputLabel <<
endmsg;
32 return itResult->second;
◆ getDefaultOutputLabel()
const std::string& InDet::TRTPIDNN::getDefaultOutputLabel |
( |
| ) |
const |
|
inline |
◆ getDefaultOutputNode()
const std::string& InDet::TRTPIDNN::getDefaultOutputNode |
( |
| ) |
const |
|
inline |
◆ getScalarInputs()
const std::map<std::string, std::map<std::string, double> >& InDet::TRTPIDNN::getScalarInputs |
( |
| ) |
const |
|
inline |
◆ getVectorInputs()
const std::map<std::string, std::map<std::string, std::vector<double> > >& InDet::TRTPIDNN::getVectorInputs |
( |
| ) |
const |
|
inline |
◆ m_nn
std::unique_ptr<lwt::LightweightGraph> InDet::TRTPIDNN::m_nn |
|
private |
◆ m_nnConfig
lwt::GraphConfig InDet::TRTPIDNN::m_nnConfig |
|
private |
◆ m_outputLabel
std::string InDet::TRTPIDNN::m_outputLabel |
|
private |
◆ m_outputNode
std::string InDet::TRTPIDNN::m_outputNode |
|
private |
◆ m_scalarInputs
std::map<std::string, std::map<std::string, double> > InDet::TRTPIDNN::m_scalarInputs |
|
private |
◆ m_vectorInputs
std::map<std::string, std::map<std::string, std::vector<double> > > InDet::TRTPIDNN::m_vectorInputs |
|
private |
The documentation for this class was generated from the following files:
double evaluate(std::map< std::string, std::map< std::string, double >> &scalarInputs, std::map< std::string, std::map< std::string, std::vector< double >>> &vectorInputs) const