|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #ifndef VNETWORKBASE_H
19 #define VNETWORKBASE_H
90 typedef std::map<std::string, std::map<std::string, double>>
NetworkInputs;
156 vNetworkBase.
print(strm);
277 virtual void print(std::ostream &strm)
const;
303 void removePrefixes(std::vector<std::string> &output_names)
const;
std::map< std::string, double > NetworkOutputs
Format for network outputs.
VNetworkBase()
VNetworkBase default constructor.
static std::string representNetworkOutputs(NetworkOutputs const &outputs, int maxValues=3)
String representation of network outputs.
virtual void setupPersistedVariables()=0
Perform actions that prep data to create the net.
std::map< std::string, std::map< std::string, double > > NetworkInputs
Format for network inputs.
static const std::string m_defaultTreeName
Default name for the TTree to save in.
bool isFile() const
Check if the argument inputFile is the path of a file on disk.
virtual NetworkOutputs compute(NetworkInputs const &inputs) const =0
Function to pass values to the network.
friend std::ostream & operator<<(std::ostream &strm, const VNetworkBase &vNetworkBase)
Put-to operator to facilitate printing.
virtual std::vector< std::string > getOutputLayers() const =0
List the names of the outputs.
void removePrefixes(NetworkOutputs &outputs) const
Remove any common prefix from the outputs.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
static std::string representNetworkInputs(NetworkInputs const &inputs, int maxValues=3)
String representation of network inputs.
virtual void setupNet()=0
Perform actions that prepare network for use.
bool isRootFile(std::string const &filename="") const
Check if a string is possibly a root file path.
virtual void writeNetToTTree(TTree &tree)=0
Save the network to a TTree.
std::string m_inputFile
Path to the file describing the network, including filename.
virtual void deleteAllButNet()=0
Get rid of any memory objects that arn't needed to run the net.
virtual void print(std::ostream &strm) const
Write a short description of this net to the string stream.
ClassDef(VNetworkBase, 1)