ATLAS Offline Software
TFCSSimpleLWTNNHandler.h
Go to the documentation of this file.
1 
20 // Hopefully documentation gets inherited from VNetworkBase
21 
22 #ifndef TFCSSIMPLELWTNNHANDLER_H
23 #define TFCSSIMPLELWTNNHANDLER_H
24 
26 #include <iostream>
27 
28 // Becuase we have a field of type LightweightNeuralNetwork
29 #include "lwtnn/LightweightNeuralNetwork.hh"
30 
31 // For writing to a tree
32 #include "TTree.h"
33 
35 public:
36  // Don't lose the default constructor
38 
49  explicit TFCSSimpleLWTNNHandler(const std::string &inputFile);
50 
60 
73  NetworkOutputs compute(NetworkInputs const &inputs) const override;
74 
83  std::vector<std::string> getOutputLayers() const override;
84 
85 protected:
95  void setupNet() override;
96 
97 private:
98  // unique ptr deletes the object when it goes out of scope
102  std::unique_ptr<lwt::LightweightNeuralNetwork>
104 
107  std::vector<std::string> m_outputLayers;
108 
109  // Suppling a ClassDef for writing to file.
111 };
112 
113 #endif // TFCSSIMPLELWTNNHANDLER_H
VNetworkBase::NetworkOutputs
std::map< std::string, double > NetworkOutputs
Format for network outputs.
Definition: VNetworkBase.h:100
TFCSSimpleLWTNNHandler::setupNet
void setupNet() override
Perform actions that prepare network for use.
Definition: TFCSSimpleLWTNNHandler.cxx:35
TFCSSimpleLWTNNHandler::m_lwtnn_neural
std::unique_ptr< lwt::LightweightNeuralNetwork > m_lwtnn_neural
The network that we are wrapping here.
Definition: TFCSSimpleLWTNNHandler.h:103
VNetworkBase::NetworkInputs
std::map< std::string, std::map< std::string, double > > NetworkInputs
Format for network inputs.
Definition: VNetworkBase.h:90
TFCSSimpleLWTNNHandler::compute
NetworkOutputs compute(NetworkInputs const &inputs) const override
Function to pass values to the network.
Definition: TFCSSimpleLWTNNHandler.cxx:59
TFCSSimpleLWTNNHandler::m_outputLayers
std::vector< std::string > m_outputLayers
Do not persistify.
Definition: TFCSSimpleLWTNNHandler.h:107
TFCSSimpleLWTNNHandler
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: TFCSSimpleLWTNNHandler.h:34
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
VNetworkLWTNN.h
TFCSSimpleLWTNNHandler::TFCSSimpleLWTNNHandler
TFCSSimpleLWTNNHandler(const std::string &inputFile)
TFCSSimpleLWTNNHandler constructor.
Definition: TFCSSimpleLWTNNHandler.cxx:15
TFCSSimpleLWTNNHandler::ClassDefOverride
ClassDefOverride(TFCSSimpleLWTNNHandler, 1)
Do not persistify.
TFCSSimpleLWTNNHandler::getOutputLayers
std::vector< std::string > getOutputLayers() const override
List the names of the outputs.
Definition: TFCSSimpleLWTNNHandler.cxx:53
VNetworkLWTNN
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
Definition: VNetworkLWTNN.h:31
VNetworkLWTNN::VNetworkLWTNN
VNetworkLWTNN(const VNetworkLWTNN &copy_from)
VNetworkLWTNN copy constructor.
Definition: VNetworkLWTNN.cxx:14