ATLAS Offline Software
Loading...
Searching...
No Matches
lightweight_network_config.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LIGHTWEIGHT_NETWORK_CONFIG_HH_TAURECTOOLS
6#define LIGHTWEIGHT_NETWORK_CONFIG_HH_TAURECTOOLS
7
8// NNLayerConfig is the "low level" configuration, which should
9// contain everything needed to create a "Stack" or "Graph".
10//
11#include "NNLayerConfig.h"
12
13// The code below is to configure the "high level" interface. These
14// structures are used to initalize the "LightweightNeuralNetwork" and
15// "LightweightGraph".
16
17#include <map>
18#include <string>
19
20namespace lwtDev {
21
22 typedef std::map<std::string, std::vector<double> > VectorMap;
23
24 struct Input
25 {
26 std::string name;
27 double offset;
28 double scale;
29 };
30
31 // feed forward structure
32 //
33 // Note that this isn't technically JSON-dependant, the name is mostly
34 // historical
36 {
37 std::vector<LayerConfig> layers;
38 std::vector<Input> inputs;
39 std::vector<std::string> outputs;
40 std::map<std::string, double> defaults;
41 std::map<std::string, std::string> miscellaneous;
42 };
43
44 // graph structures
46 {
47 std::string name;
48 std::vector<Input> variables;
49 std::map<std::string, std::string> miscellaneous;
50 std::map<std::string, double> defaults;
51 };
53 {
54 std::vector<std::string> labels;
55 size_t node_index;
56 };
58 {
59 std::vector<InputNodeConfig> inputs;
60 std::vector<InputNodeConfig> input_sequences;
61 std::vector<NodeConfig> nodes;
62 std::map<std::string, OutputNodeConfig> outputs;
63 std::vector<LayerConfig> layers;
64 };
65
66}
67
68#endif
std::map< std::string, std::vector< double > > VectorMap
std::vector< InputNodeConfig > inputs
std::vector< LayerConfig > layers
std::vector< NodeConfig > nodes
std::vector< InputNodeConfig > input_sequences
std::map< std::string, OutputNodeConfig > outputs
std::map< std::string, std::string > miscellaneous
std::map< std::string, std::string > miscellaneous
std::vector< std::string > outputs
std::vector< LayerConfig > layers
std::vector< Input > inputs
std::vector< std::string > labels