|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "lwtnn/LightweightGraph.hh"
13 #include "lwtnn/parse_json.hh"
26 ATH_MSG_DEBUG(
"Making a new m_lwtnn_graph for copied network");
27 std::stringstream json_stream(
m_json);
43 ATH_MSG_VERBOSE(
"Reading the m_json string stream into a graph network");
44 std::stringstream json_stream(
m_json);
50 const std::string node_name =
node.first;
51 const lwt::OutputNodeConfig node_config =
node.second;
52 for (
const std::string &
label : node_config.labels) {
76 auto noiseNode = local_copy.extract(
"Noise");
77 noiseNode.key() =
"node_0";
78 local_copy.insert(std::move(noiseNode));
79 auto mycondNode = local_copy.extract(
"mycond");
80 mycondNode.key() =
"node_1";
81 local_copy.insert(std::move(mycondNode));
87 ATH_MSG_DEBUG(
"Computation on LWTNN graph network done, returning.");
92 void TFCSGANLWTNNHandler::Streamer(TBuffer &buf) {
94 if (buf.IsReading()) {
97 TFCSGANLWTNNHandler::Class()->ReadBuffer(buf,
this);
103 #ifndef __FastCaloSimStandAlone__
113 "Writing buffer in TFCSGANLWTNNHandler, but m_json is empty");
116 TFCSGANLWTNNHandler::Class()->WriteBuffer(buf,
this);
std::unique_ptr< lwt::LightweightGraph > m_lwtnn_graph
The network that we are wrapping here.
std::map< std::string, double > NetworkOutputs
Format for network outputs.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
std::map< std::string, std::map< std::string, double > > NetworkInputs
Format for network inputs.
std::string m_json
String containing json input file.
#define ATH_MSG_VERBOSE(x)
std::string * m_input
Do not persistify.
NetworkOutputs compute(NetworkInputs const &inputs) const override
Function to pass values to the network.
void deleteAllButNet() override
Get rid of any memory objects that arn't needed to run the net.
std::vector< std::string > getOutputLayers() const override
List the names of the outputs.
std::vector< std::string > m_outputLayers
Do not persistify.
void removePrefixes(NetworkOutputs &outputs) const
Remove any common prefix from the outputs.
void setupNet() override
Perform actions that prepare network for use.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
GraphConfig parse_json_graph(std::istream &json)
TFCSGANLWTNNHandler(const std::string &inputFile)
TFCSGANLWTNNHandler constructor.
#define ATH_MSG_WARNING(x)
void setupPersistedVariables() override
Perform actions that prep data to create the net.