12#include <trg/grl/dataobjects/GRLMLP.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/database/DBObjPtr.h>
62 std::vector<float> i_cdc_sector;
65 std::vector<float> i_ecl_sector;
100 void save(
const std::string& filename,
const std::string& arrayname =
"MLPs");
107 bool load(
unsigned isector,
const std::string& wfilename,
const std::string& bfilename);
113 float runMLP(
unsigned isector,
const std::vector<float>& input);
Class to keep all parameters of an expert MLP for the neuro trigger.
Class to represent the GRL Neuro.
GRLMLP & operator[](unsigned index)
Set parameters and get some network independent parameters.
void initialize(const Parameters &p)
Set parameters and get some network independent parameters.
virtual ~GRLNeuro()
Default destructor.
bool load(unsigned isector, const std::string &wfilename, const std::string &bfilename)
Load MLPs from file.
float mysigmiod(float num)
discrete sigmoid activation function (1024 bins)
void save(const std::string &filename, const std::string &arrayname="MLPs")
Save MLPs to file.
float runMLP(unsigned isector, const std::vector< float > &input)
Run an expert MLP.
GRLNeuro()
Default constructor.
const GRLMLP & operator[](unsigned index) const
return const reference to a neural network
std::vector< GRLMLP > m_MLPs
List of networks.
float relu(float x)
ReLu activation function.
float float_to_fixed(float num, int m, int n)
change the percision of number, m = number of integer bits, n = number of decimal
unsigned nSectors() const
return number of neural networks
Abstract base class for different kinds of events.
Struct to keep neurotrigger parameters.
std::vector< std::vector< float > > outputScale
Output scale for all networks.
bool multiplyHidden
If true, multiply nHidden with number of input nodes.
unsigned nMLP
Number of networks.
bool targetresult
train result as output
unsigned n_ecl_sector
Number of ECL sectors.
std::vector< std::vector< float > > nHidden
Number of nodes in each hidden layer for all networks or factor to multiply with number of inputs.
unsigned n_cdc_sector
Number of CDC sectors.