Public Member Functions | Private Attributes | List of all members
cnn::RegCNNNumuHandler Class Reference

Wrapper for caffe::Net which handles construction and prediction. More...

#include <RegCNNNumuHandler.h>

Public Member Functions

 RegCNNNumuHandler (const fhicl::ParameterSet &pset)
 Constructor which takes a pset with DeployProto and ModelFile fields. More...
 
std::vector< float > Predict (const RegPixelMap &pm, bool fLongestTrackContained)
 Return prediction arrays for RegPixelMap. More...
 

Private Attributes

cnn::TFRegNetHandler fTFHandlerContained
 
cnn::TFRegNetHandler fTFHandlerExiting
 

Detailed Description

Wrapper for caffe::Net which handles construction and prediction.

Definition at line 21 of file RegCNNNumuHandler.h.

Constructor & Destructor Documentation

cnn::RegCNNNumuHandler::RegCNNNumuHandler ( const fhicl::ParameterSet pset)

Constructor which takes a pset with DeployProto and ModelFile fields.

Definition at line 21 of file RegCNNNumuHandler.cxx.

21  :
22  fTFHandlerContained (pset.get<fhicl::ParameterSet> ("TFNetHandlerContained")),
23  fTFHandlerExiting (pset.get<fhicl::ParameterSet> ("TFNetHandlerExiting"))
24  {
25  }
T get(std::string const &key) const
Definition: ParameterSet.h:271
cnn::TFRegNetHandler fTFHandlerExiting
cnn::TFRegNetHandler fTFHandlerContained

Member Function Documentation

std::vector< float > cnn::RegCNNNumuHandler::Predict ( const RegPixelMap pm,
bool  fLongestTrackContained 
)

Return prediction arrays for RegPixelMap.

Definition at line 27 of file RegCNNNumuHandler.cxx.

28  {
29  std::vector<float> cnnResults;
30  if (fLongestTrackContained) {
31  cnnResults = fTFHandlerContained.Predict(pm);
32  } else {
33  cnnResults = fTFHandlerExiting.Predict(pm);
34  }
35 
36  //std::cout << "Number of CNN result vectors " << cnnResults.size() << " with " << cnnResults[0].size() << " categories" << std::endl;
37 
38  //std::cout << "summary: ";
39  //for(auto const v : cnnResults[0]){
40  // std::cout << v << ", ";
41  //}
42  //std::cout << std::endl;
43 
44  return cnnResults;
45  }
std::vector< float > Predict(const RegPixelMap &pm)
Return prediction arrays for RegPixelMap.
cnn::TFRegNetHandler fTFHandlerExiting
cnn::TFRegNetHandler fTFHandlerContained

Member Data Documentation

cnn::TFRegNetHandler cnn::RegCNNNumuHandler::fTFHandlerContained
private

Definition at line 33 of file RegCNNNumuHandler.h.

cnn::TFRegNetHandler cnn::RegCNNNumuHandler::fTFHandlerExiting
private

Definition at line 34 of file RegCNNNumuHandler.h.


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