ATLAS Offline Software
Loading...
Searching...
No Matches
TFCSSimpleLWTNNHandler.h
Go to the documentation of this file.
1
19
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
35public:
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
85protected:
95 void setupNet() override;
96
97private:
98 // unique ptr deletes the object when it goes out of scope
102 std::unique_ptr<lwt::LightweightNeuralNetwork>
107 std::vector<std::string> m_outputLayers;
108
109 // Suppling a ClassDef for writing to file.
111};
112
113#endif // TFCSSIMPLELWTNNHANDLER_H
std::vector< std::string > m_outputLayers
Do not persistify.
ClassDefOverride(TFCSSimpleLWTNNHandler, 1)
Do not persistify.
NetworkOutputs compute(NetworkInputs const &inputs) const override
Function to pass values to the network.
void setupNet() override
Perform actions that prepare network for use.
std::unique_ptr< lwt::LightweightNeuralNetwork > m_lwtnn_neural
The network that we are wrapping here.
VNetworkLWTNN(const VNetworkLWTNN &copy_from)
VNetworkLWTNN copy constructor.
std::vector< std::string > getOutputLayers() const override
List the names of the outputs.
TFCSSimpleLWTNNHandler(const std::string &inputFile)
TFCSSimpleLWTNNHandler constructor.
std::map< std::string, std::map< std::string, double > > NetworkInputs
Format for network inputs.
std::map< std::string, double > NetworkOutputs
Format for network outputs.
VNetworkLWTNN(const VNetworkLWTNN &copy_from)
VNetworkLWTNN copy constructor.