CMS 3D CMS Logo

tau_parameters.h
Go to the documentation of this file.
1 #ifndef PARAMETERS_H_
2 #define PARAMETERS_H_
3 
4 #include "ap_fixed.h"
5 #include "ap_int.h"
6 
7 #include <complex>
8 
9 // Tau NN components
13 
14 // Load the NN weights
29 
30 // hls-fpga-machine-learning insert layer-config
31 // Dense_1
33  static const unsigned n_in = 80;
34  static const unsigned n_out = 25;
35  static const unsigned io_type = nnet::io_parallel;
36  static const unsigned strategy = nnet::latency;
37  static const unsigned reuse_factor = 1;
38  static const unsigned n_zeros = 1205;
39  static const unsigned n_nonzeros = 795;
41  static const bool store_weights_in_bram = false;
43  typedef bias2_t bias_t;
46  template <class x_T, class y_T>
48 };
49 
50 // relu_1
52  static const unsigned n_in = 25;
53  static const unsigned table_size = 1024;
54  static const unsigned io_type = nnet::io_parallel;
55  static const unsigned reuse_factor = 1;
57 };
58 
59 // Dense_2
61  static const unsigned n_in = 25;
62  static const unsigned n_out = 25;
63  static const unsigned io_type = nnet::io_parallel;
64  static const unsigned strategy = nnet::latency;
65  static const unsigned reuse_factor = 1;
66  static const unsigned n_zeros = 375;
67  static const unsigned n_nonzeros = 250;
69  static const bool store_weights_in_bram = false;
71  typedef bias5_t bias_t;
74  template <class x_T, class y_T>
76 };
77 
78 // relu_2
80  static const unsigned n_in = 25;
81  static const unsigned table_size = 1024;
82  static const unsigned io_type = nnet::io_parallel;
83  static const unsigned reuse_factor = 1;
85 };
86 
87 // Dense_3
89  static const unsigned n_in = 25;
90  static const unsigned n_out = 15;
91  static const unsigned io_type = nnet::io_parallel;
92  static const unsigned strategy = nnet::latency;
93  static const unsigned reuse_factor = 1;
94  static const unsigned n_zeros = 225;
95  static const unsigned n_nonzeros = 150;
97  static const bool store_weights_in_bram = false;
99  typedef bias8_t bias_t;
102  template <class x_T, class y_T>
104 };
105 
106 // relu_3
108  static const unsigned n_in = 15;
109  static const unsigned table_size = 1024;
110  static const unsigned io_type = nnet::io_parallel;
111  static const unsigned reuse_factor = 1;
113 };
114 
115 // Dense_4
117  static const unsigned n_in = 15;
118  static const unsigned n_out = 15;
119  static const unsigned io_type = nnet::io_parallel;
120  static const unsigned strategy = nnet::latency;
121  static const unsigned reuse_factor = 1;
122  static const unsigned n_zeros = 135;
123  static const unsigned n_nonzeros = 90;
125  static const bool store_weights_in_bram = false;
127  typedef bias11_t bias_t;
130  template <class x_T, class y_T>
132 };
133 
134 // relu_4
136  static const unsigned n_in = 15;
137  static const unsigned table_size = 1024;
138  static const unsigned io_type = nnet::io_parallel;
139  static const unsigned reuse_factor = 1;
141 };
142 
143 // Dense_5
145  static const unsigned n_in = 15;
146  static const unsigned n_out = 10;
147  static const unsigned io_type = nnet::io_parallel;
148  static const unsigned strategy = nnet::latency;
149  static const unsigned reuse_factor = 1;
150  static const unsigned n_zeros = 90;
151  static const unsigned n_nonzeros = 60;
153  static const bool store_weights_in_bram = false;
155  typedef bias14_t bias_t;
158  template <class x_T, class y_T>
160 };
161 
162 // relu_5
164  static const unsigned n_in = 10;
165  static const unsigned table_size = 1024;
166  static const unsigned io_type = nnet::io_parallel;
167  static const unsigned reuse_factor = 1;
169 };
170 
171 // Dense_6
173  static const unsigned n_in = 10;
174  static const unsigned n_out = 1;
175  static const unsigned io_type = nnet::io_parallel;
176  static const unsigned strategy = nnet::latency;
177  static const unsigned reuse_factor = 1;
178  static const unsigned n_zeros = 6;
179  static const unsigned n_nonzeros = 4;
181  static const bool store_weights_in_bram = false;
183  typedef bias17_t bias_t;
186  template <class x_T, class y_T>
188 };
189 
190 // jetID_output
192  static const unsigned n_in = 1;
193  static const unsigned table_size = 1024;
194  static const unsigned io_type = nnet::io_parallel;
195  static const unsigned reuse_factor = 1;
197 };
198 
199 // pT_output
201  static const unsigned n_in = 10;
202  static const unsigned n_out = 1;
203  static const unsigned io_type = nnet::io_parallel;
204  static const unsigned strategy = nnet::latency;
205  static const unsigned reuse_factor = 1;
206  static const unsigned n_zeros = 6;
207  static const unsigned n_nonzeros = 4;
209  static const bool store_weights_in_bram = false;
211  typedef bias20_t bias_t;
214  template <class x_T, class y_T>
216 };
217 
218 #endif
model_default_t accum_t
static const unsigned io_type
static const unsigned multiplier_limit
static const unsigned io_type
static const unsigned n_out
weight17_t weight_t
static const unsigned io_type
weight2_t weight_t
static const unsigned n_in
static const unsigned n_nonzeros
layer20_index index_t
bias11_t bias_t
static const unsigned reuse_factor
static const unsigned n_nonzeros
static const unsigned n_zeros
static const unsigned reuse_factor
static const unsigned multiplier_limit
layer11_index index_t
static const unsigned n_nonzeros
ap_fixed< 18, 8 > relu_1_table_t
Definition: defines.h:35
static const unsigned n_zeros
ap_fixed< 9, 3 > bias8_t
Definition: defines.h:44
static const unsigned multiplier_limit
weight5_t weight_t
static const unsigned n_in
ap_uint< 1 > layer20_index
Definition: defines.h:68
static const unsigned strategy
ap_fixed< 16, 6 > model_default_t
Definition: defines.h:29
static const unsigned io_type
ap_fixed< 9, 3 > weight11_t
Definition: defines.h:49
static const unsigned n_in
static const unsigned n_zeros
ap_uint< 1 > layer8_index
Definition: defines.h:45
static const bool store_weights_in_bram
model_default_t accum_t
static const unsigned n_in
static const unsigned n_nonzeros
ap_fixed< 9, 3 > weight14_t
Definition: defines.h:55
ap_fixed< 9, 3 > weight8_t
Definition: defines.h:43
static const unsigned n_zeros
static const unsigned n_in
layer17_index index_t
ap_fixed< 16, 7 > bias17_t
Definition: defines.h:62
weight20_t weight_t
static const unsigned n_zeros
bias2_t bias_t
model_default_t accum_t
static const unsigned multiplier_limit
static const unsigned io_type
ap_fixed< 16, 7 > weight17_t
Definition: defines.h:61
bias20_t bias_t
static const bool store_weights_in_bram
relu_1_table_t table_t
layer2_index index_t
static const unsigned io_type
static const unsigned io_type
static const unsigned n_in
static const unsigned io_type
static const bool store_weights_in_bram
static const unsigned strategy
static const bool store_weights_in_bram
static const unsigned n_out
model_default_t accum_t
static const unsigned reuse_factor
relu_5_table_t table_t
ap_uint< 1 > layer5_index
Definition: defines.h:39
ap_fixed< 9, 3 > bias14_t
Definition: defines.h:56
static const unsigned table_size
layer8_index index_t
static const unsigned io_type
weight14_t weight_t
static const unsigned strategy
ap_fixed< 9, 3 > bias5_t
Definition: defines.h:38
static const unsigned n_nonzeros
static const bool store_weights_in_bram
model_default_t accum_t
relu_3_table_t table_t
static const unsigned strategy
static const unsigned n_in
static const unsigned io_type
ap_fixed< 18, 8 > jetID_output_table_t
Definition: defines.h:65
static const unsigned io_type
static const unsigned n_out
bias17_t bias_t
weight8_t weight_t
ap_fixed< 18, 8 > relu_2_table_t
Definition: defines.h:41
static const unsigned n_in
#define DIV_ROUNDUP(n, d)
Definition: nnet_layer.h:47
static const unsigned n_nonzeros
static const unsigned multiplier_limit
ap_fixed< 9, 3 > weight2_t
Definition: defines.h:31
ap_uint< 1 > layer14_index
Definition: defines.h:57
static const unsigned io_type
relu_2_table_t table_t
layer5_index index_t
jetID_output_table_t table_t
static const unsigned n_out
ap_fixed< 16, 7 > bias20_t
Definition: defines.h:67
static const unsigned reuse_factor
static const unsigned n_in
static const unsigned reuse_factor
static const unsigned table_size
ap_fixed< 18, 8 > relu_3_table_t
Definition: defines.h:47
model_default_t accum_t
static const unsigned n_in
static const unsigned strategy
static const unsigned n_in
bias8_t bias_t
static const unsigned n_in
static const unsigned reuse_factor
layer14_index index_t
bias5_t bias_t
static const unsigned table_size
static const unsigned n_out
ap_fixed< 9, 3 > bias11_t
Definition: defines.h:50
bias14_t bias_t
static const unsigned table_size
ap_fixed< 16, 7 > weight20_t
Definition: defines.h:66
static const unsigned reuse_factor
ap_fixed< 9, 3 > bias2_t
Definition: defines.h:32
static const unsigned strategy
static const unsigned reuse_factor
ap_uint< 1 > layer17_index
Definition: defines.h:63
static const unsigned reuse_factor
static const unsigned n_zeros
ap_uint< 1 > layer2_index
Definition: defines.h:33
ap_fixed< 18, 8 > relu_4_table_t
Definition: defines.h:53
static const unsigned reuse_factor
static const unsigned n_out
static const unsigned reuse_factor
static const unsigned multiplier_limit
static const unsigned n_nonzeros
static const unsigned n_in
static const unsigned multiplier_limit
ap_fixed< 9, 3 > weight5_t
Definition: defines.h:37
static const bool store_weights_in_bram
static const unsigned n_out
relu_4_table_t table_t
static const unsigned reuse_factor
static const bool store_weights_in_bram
ap_uint< 1 > layer11_index
Definition: defines.h:51
static const unsigned n_zeros
static const unsigned table_size
static const unsigned table_size
static const unsigned reuse_factor
static const unsigned strategy
static const unsigned io_type
model_default_t accum_t
weight11_t weight_t
ap_fixed< 18, 8 > relu_5_table_t
Definition: defines.h:59