Skip to content

Commit

Permalink
Merge pull request #2 from cms-hls4ml/namespaces
Browse files Browse the repository at this point in the history
add namespace protection
  • Loading branch information
jmduarte authored Mar 25, 2024
2 parents 8d6c73a + 35b88c3 commit b43ab08
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 16 deletions.
3 changes: 3 additions & 0 deletions TOoLLiP_v1/NN/TOoLLiP_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "TOoLLiP_v1.h"
#include "parameters.h"

namespace hls4ml_toollip_v1 {

void TOoLLiP_v1(
input_t input_1[N_INPUT_1_1*N_INPUT_2_1],
result_t layer14_out[N_LAYER_12]
Expand Down Expand Up @@ -70,4 +72,5 @@ void TOoLLiP_v1(

nnet::sigmoid<layer12_t, result_t, sigmoid_config14>(layer12_out, layer14_out); // sigmoid

} // namespace hls4ml_toollip_v1
}
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/TOoLLiP_v1.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@

#include "defines.h"

namespace hls4ml_toollip_v1 {

// Prototype of top level function for C-synthesis
void TOoLLiP_v1(
input_t input_1[N_INPUT_1_1*N_INPUT_2_1],
result_t layer14_out[N_LAYER_12]
);

} // namespace hls4ml_toollip_v1

#endif
34 changes: 18 additions & 16 deletions TOoLLiP_v1/NN/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
#include "ap_int.h"
#include "nnet_utils/nnet_types.h"
#include <cstddef>
#include <cstdio>
#include <cstdio>

namespace hls4ml_toollip_v1 {

// hls-fpga-machine-learning insert numbers
#define N_INPUT_1_1 10
#define N_INPUT_2_1 14
#define N_OUTPUTS_15 10
#define N_FILT_15 10
#define N_OUTPUTS_2 10
#define N_FILT_2 10
#define N_OUTPUTS_16 10
#define N_FILT_16 10
#define N_OUTPUTS_5 10
#define N_FILT_5 10
#define N_FILT_8 10
#define N_LAYER_9 10
#define N_LAYER_9 10
#define N_LAYER_12 1
#define N_LAYER_12 1
static const int N_INPUT_1_1 = 10;
static const int N_INPUT_2_1 = 14;
static const int N_OUTPUTS_15 = 10;
static const int N_FILT_15 = 10;
static const int N_OUTPUTS_2 = 10;
static const int N_FILT_2 = 10;
static const int N_OUTPUTS_16 = 10;
static const int N_FILT_16 = 10;
static const int N_OUTPUTS_5 = 10;
static const int N_FILT_5 = 10;
static const int N_FILT_8 = 10;
static const int N_LAYER_9 = 10;
static const int N_LAYER_12 = 1;

// hls-fpga-machine-learning insert layer-precision
typedef ap_fixed<16,6> input_t;
Expand Down Expand Up @@ -51,4 +51,6 @@ typedef ap_uint<1> layer12_index;
typedef ap_fixed<16,6> result_t;
typedef ap_fixed<18,8> sigmoid_table_t;

} // namespace hls4ml_toollip_v1

#endif
3 changes: 3 additions & 0 deletions TOoLLiP_v1/NN/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "weights/w12.h"
#include "weights/b12.h"

namespace hls4ml_toollip_v1 {

// hls-fpga-machine-learning insert layer-config
// q_conv1d
struct config15_mult : nnet::dense_config {
Expand Down Expand Up @@ -203,5 +205,6 @@ struct sigmoid_config14 : nnet::activ_config {
typedef sigmoid_table_t table_t;
};

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b10.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B10_H_
#define B10_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias10_t b10[50];
#else
bias10_t b10[50] = {-0.0234375, -0.0234375, -0.0078125, 0.2578125, -0.0078125, -0.0546875, 0.0000000, -0.0781250, 0.0000000, 0.0000000, -0.0156250, -0.0312500, -0.0156250, -0.0468750, -0.0312500, -0.0078125, -0.0234375, 0.0000000, 0.0000000, -0.0390625, -0.0234375, 0.0468750, -0.0156250, -0.0078125, -0.0468750, -0.0078125, 0.0000000, 0.1640625, -0.0312500, -0.0078125, -0.0156250, 0.0000000, 0.0000000, -0.0078125, -0.0546875, -0.0156250, 0.0000000, -0.0234375, -0.0078125, -0.0234375, -0.0312500, -0.0078125, -0.0156250, -0.0078125, -0.0156250, -0.0390625, -0.0078125, 0.8828125, -0.0078125, 0.0000000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b12.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B12_H_
#define B12_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias12_t b12[1];
#else
bias12_t b12[1] = {0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b13.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B13_H_
#define B13_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias13_t b13[1];
#else
bias13_t b13[1] = {0.2187500};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b15.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B15_H_
#define B15_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias15_t b15[10];
#else
bias15_t b15[10] = {0.0000, 0.0000, 0.0000, 0.0000, 0.0625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b16.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B16_H_
#define B16_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias16_t b16[10];
#else
bias16_t b16[10] = {0.0000, -0.2500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.1875, -0.0625};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b17.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B17_H_
#define B17_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
q_conv1d_bias_t b17[50];
#else
q_conv1d_bias_t b17[50] = {-0.4115940928, -0.0010528869, 0.3890162706, -0.2260325402, -0.4667757452, 0.2235222906, 0.1380449384, 0.1003968120, -0.0085173426, -0.0061792936, -0.0039348761, -0.0048593758, 0.1057755426, -0.0035531062, -0.3062836230, -0.1379081905, -0.0002671743, -0.0007693227, 0.0037731770, -0.0126592154, -0.2416174263, -0.1210659891, -0.0142613463, 0.0550298914, -0.0175254922, 0.3239859641, -0.4248504639, 0.0104979658, 0.1794869453, 0.0791832656, -0.0035287975, -0.0038278394, 0.0021984677, 0.4417434633, 0.1560084671, -0.0008751448, 0.0074956827, -0.0007063944, -0.2629254758, -0.0102417022, -0.0573031008, -0.0018064796, -0.2579841912, -0.0078082848, -0.1005568802, 0.0284095388, -0.1654957831, 0.0196669176, -0.0026190006, -0.3332908750};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b18.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B18_H_
#define B18_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
q_conv1d_1_bias_t b18[50];
#else
q_conv1d_1_bias_t b18[50] = {-0.3482380509, -0.0534316301, -0.3644149601, -0.0748788342, -0.0119600175, -0.2091283351, -0.2278249264, -0.0242777802, -0.2379040718, -0.1500966996, -0.7085729837, -0.4931750894, -0.0044113649, -0.3392141163, -0.3724137545, -0.1679714918, -0.2186387628, -0.0589473993, -0.0396624506, -0.3840157092, -0.6772336960, -0.1571202576, -0.0490602031, -0.1349195689, -0.1388565302, -0.2384278476, -0.2835735381, 0.6143143773, -0.6024023890, -0.1510907412, -0.2904964387, 0.1027948633, -0.2247825265, -0.5252794623, -0.4746022820, -0.1970760524, -0.3301044703, -0.3090827167, -0.3551985919, -0.1208903268, -0.3734928668, -0.1575199813, -0.3375508189, -0.5508997440, -0.2921801507, -0.3900706172, -0.3078178465, -0.2331871986, -0.2451208085, -0.1887256801};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/b9.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef B9_H_
#define B9_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
bias9_t b9[10];
#else
bias9_t b9[10] = {0.0000, 0.0000, 0.4375, 0.0000, -0.0625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w10.h

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w12.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W12_H_
#define W12_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight12_t w12[10];
#else
weight12_t w12[10] = {0.0000, 0.0000, 5.7500, 0.0000, -3.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w13.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W13_H_
#define W13_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight13_t w13[50];
#else
weight13_t w13[50] = {0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9921875, 0.0000000, 0.0000000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w15.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W15_H_
#define W15_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight15_t w15[140];
#else
weight15_t w15[140] = {0.0000, 0.0000, 0.0000, 0.0000, -0.1250, 0.0000, 0.0000, 0.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0625, -0.1250, 0.0000, 0.0000, 0.6250, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.7500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.3750, 0.6875, 0.0000, 0.3125, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.1875, 0.0000, 0.0000, 0.4375, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.1875, 0.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.3750, 0.0000, 0.0000, 0.0000, -0.1875, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 5.1250, 0.0000, 0.0000, 3.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.9375, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.9375, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.9375, 0.0000, 0.0000, 0.0000, 0.3125, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0625, 1.3750, 0.0000, 0.0000, 0.8125, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w16.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W16_H_
#define W16_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight16_t w16[100];
#else
weight16_t w16[100] = {0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.6250, 0.0000, -0.1250, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.6250, 0.0000, -1.3750, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0625, 0.0000, -1.6250, 0.0000, -2.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.9375, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.1875, 0.0000, 0.9375, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.6250, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w17.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W17_H_
#define W17_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight17_t w17[700];
#else
weight17_t w17[700] = {0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6640625, 0.0000000, -1.0000000, 0.0000000, -0.1484375, 0.0000000, 0.4921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.1015625, 0.0000000, 0.7187500, 0.4218750, 0.0000000, 0.0390625, 0.0000000, 0.0000000, -0.8125000, 0.0000000, 0.0000000, 0.8359375, 0.0000000, 0.0000000, 0.0000000, -0.7031250, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9765625, 0.0000000, 0.0000000, 0.0000000, 0.5156250, 0.2656250, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.0625000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.1250000, 0.0000000, 0.0000000, 0.0000000, 0.6796875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.5000000, 0.3984375, 0.9765625, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.5078125, 0.0000000, -0.6875000, 0.0000000, 0.0000000, -0.7265625, 0.0000000, 0.0000000, -0.0937500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.8203125, -0.8125000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -1.0000000, 0.0000000, 0.0000000, 0.9921875, -0.1171875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.7109375, 0.0000000, 0.0000000, 0.0000000, 0.2812500, 0.3203125, 0.2187500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.7500000, 0.0000000, 0.0000000, -0.2656250, 0.9140625, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.1640625, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3750000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9687500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6328125, 0.0000000, -0.7421875, 0.0000000, 0.0000000, -0.8046875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.7265625, 0.0000000, 0.1406250, 0.0000000, 0.0000000, 0.0000000, -0.4921875, 0.0000000, 0.0000000, -1.0000000, 0.9687500, 0.0000000, -0.7812500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.6796875, 0.0000000, 0.0000000, 0.0000000, 0.4218750, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.2578125, -0.2187500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9687500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.0234375, 0.0000000, 0.0000000, 0.0000000, -0.0234375, 0.0000000, 0.0000000, 0.0000000, -0.0546875, 0.0000000, 0.5312500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6484375, -0.8437500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.7421875, -0.6562500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.5234375, 0.0000000, -0.6015625, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.0390625, -0.2031250, 0.0000000, 0.0000000, 0.0000000, -0.0468750, 0.0000000, 0.0000000, 0.0000000, -0.0234375, 0.0000000, 0.0000000, 0.0000000, -0.5859375, 0.0000000, 0.7421875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.6171875, 0.4843750, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6328125, -0.8828125, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9453125, 0.0000000, 0.6484375, 0.0000000, 0.0000000, 0.0000000, -0.4765625, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.3828125, 0.0000000, 0.0000000, 0.0000000, 0.7343750, 0.0000000, 0.0000000, 0.7968750, -0.5156250, 0.3203125, 0.4062500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9296875, -0.5000000, 0.0000000, 0.0000000, -1.0000000, 0.8125000, 0.0000000, 0.0000000, 0.0000000, 0.4765625, 0.0000000, 0.9531250, 0.0000000, 0.0000000, -0.2734375, -0.5000000, 0.0000000, 0.8359375, 0.0000000, 0.0000000, 0.0000000, -0.9921875, 0.0000000, -0.8984375, 0.0000000, -0.4375000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6484375, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.7109375, 0.0000000, 0.0000000, 0.4609375, 0.0000000, 0.0000000, 0.0000000, -0.4687500, 0.0000000, 0.0000000, -0.7734375, 0.0000000, 0.0000000, 0.5625000, 0.2187500, 0.0000000, 0.9921875, 0.0000000, 0.0546875, 0.0000000, 0.0000000, 0.0000000, -0.6796875, 0.0000000, 0.0000000, 0.9531250, 0.0000000, -0.9453125, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.9921875, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.9843750, 0.0000000, 0.0234375, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.9921875, 0.0000000, -0.9921875, 0.9921875, 0.0000000, -1.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -1.0000000, 0.0000000, 0.9765625, -1.0000000, 0.8046875, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.9843750, 0.9062500, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -1.0000000, -0.9062500, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.9531250, 0.0000000, 0.9921875, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9921875, -1.0000000, 0.0000000, 0.0000000, 0.0000000, -0.1093750, 0.9765625, 0.1640625, 0.0000000, -0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -1.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.6406250, -1.0000000, 0.0000000, -0.9765625, 0.0000000, 0.0000000, 0.0000000, -0.1953125, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.9843750, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9843750, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9921875, -0.3984375, 0.3984375, 0.0000000, 0.0000000, -0.9843750, 0.0000000, 0.0000000, 0.0000000, 0.0859375, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.3906250, 0.0000000, 0.0000000, 0.0000000, -0.7031250, 0.0000000, 0.0000000, -0.5078125, 0.0000000, 0.0000000, -0.3750000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.6640625, 0.0000000, 0.0000000, 0.6796875, 0.0000000, 0.0000000, 0.0000000, 0.9921875, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.9843750, 0.0000000, -0.8437500, 0.0000000, -1.0000000, 0.0000000, 0.0000000, -0.5312500, -0.4531250, 0.0000000, 0.9921875, 0.9921875, 0.0000000, 0.9843750, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.8750000, 0.0000000, -0.9687500, 0.9531250, 0.0000000, 0.0000000, 0.0000000, -1.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, -0.9843750, 0.0000000, 0.0000000, 0.0000000, -0.8750000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000};
#endif

} // namespace hls4ml_toollip_v1

#endif
4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w18.h

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions TOoLLiP_v1/NN/weights/w9.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
#ifndef W9_H_
#define W9_H_

namespace hls4ml_toollip_v1 {

#ifdef __HLS4ML_LOAD_TXT_WEIGHTS__
weight9_t w9[100];
#else
weight9_t w9[100] = {0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -3.7500, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -1.6250, 0.0000, 2.0625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.5625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0625, 0.0000, 1.0625, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000};
#endif

} // namespace hls4ml_toollip_v1

#endif
2 changes: 2 additions & 0 deletions TOoLLiP_v1/TOoLLiP_emulator_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <any>
#include "ap_fixed.h"

using namespace hls4ml_toollip_v1;

class TOoLLiP_emulator_v1 : public hls4mlEmulator::Model{
private:
input_t _input[N_INPUT_1_1*N_INPUT_2_1];
Expand Down

0 comments on commit b43ab08

Please sign in to comment.