Wrapper for caffe::Net which handles construction and prediction. More...
#include <TFNetHandler.h>
Public Member Functions | |
TFNetHandler (const fhicl::ParameterSet &pset) | |
Constructor which takes a pset with DeployProto and ModelFile fields. More... | |
int | NOutput () const |
Number of outputs in neural net. More... | |
int | NFeatures () const |
Number of outputs in neural net. More... | |
std::vector< std::vector< float > > | Predict (const PixelMap &pm) |
Return prediction arrays for PixelMap. More... | |
std::vector< float > | PredictFlavour (const PixelMap &pm) |
Return four element vector with summed numu, nue, nutau and NC elements. More... | |
Private Attributes | |
std::string | fLibPath |
Library path (typically dune_pardata...) More... | |
std::string | fTFProtoBuf |
location of the tf .pb file in the above path More... | |
bool | fUseLogChargeScale |
Is the charge using a log scale? More... | |
unsigned int | fImageWires |
Number of wires for the network to classify. More... | |
unsigned int | fImageTDCs |
Number of tdcs for the network to classify. More... | |
std::vector< bool > | fReverseViews |
Do we need to reverse any views? More... | |
std::unique_ptr< tf::Graph > | fTFGraph |
Tensorflow graph. More... | |
Wrapper for caffe::Net which handles construction and prediction.
Definition at line 22 of file TFNetHandler.h.
cvn::TFNetHandler::TFNetHandler | ( | const fhicl::ParameterSet & | pset | ) |
Constructor which takes a pset with DeployProto and ModelFile fields.
Definition at line 22 of file TFNetHandler.cxx.
int cvn::TFNetHandler::NFeatures | ( | ) | const |
Number of outputs in neural net.
int cvn::TFNetHandler::NOutput | ( | ) | const |
Number of outputs in neural net.
std::vector< std::vector< float > > cvn::TFNetHandler::Predict | ( | const PixelMap & | pm | ) |
Return prediction arrays for PixelMap.
Definition at line 69 of file TFNetHandler.cxx.
std::vector<float> cvn::TFNetHandler::PredictFlavour | ( | const PixelMap & | pm | ) |
Return four element vector with summed numu, nue, nutau and NC elements.
|
private |
Number of tdcs for the network to classify.
Definition at line 47 of file TFNetHandler.h.
|
private |
Number of wires for the network to classify.
Definition at line 46 of file TFNetHandler.h.
|
private |
Library path (typically dune_pardata...)
Definition at line 43 of file TFNetHandler.h.
|
private |
Do we need to reverse any views?
Definition at line 48 of file TFNetHandler.h.
|
private |
Tensorflow graph.
Definition at line 49 of file TFNetHandler.h.
|
private |
location of the tf .pb file in the above path
Definition at line 44 of file TFNetHandler.h.
|
private |
Is the charge using a log scale?
Definition at line 45 of file TFNetHandler.h.