Skip to content

Commit

Permalink
Merge pull request #7 from cms-hls4ml/axol1tl_v3
Browse files Browse the repository at this point in the history
Weights and scales for Axol1tl v3
  • Loading branch information
quinnanm authored Nov 7, 2023
2 parents a139169 + d4469a9 commit f21d72b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
1 change: 1 addition & 0 deletions AXOL1TL_v3/GTADModel_emulator_v3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <utility>
#include "ap_fixed.h"
#include "ap_int.h"
#include "scales.h"

class GTADModel_emulator_v3 : public hls4mlEmulator::Model {

Expand Down
4 changes: 0 additions & 4 deletions AXOL1TL_v3/NN/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

//hls-fpga-machine-learning insert layer-precision
//copied from https://gitlab.cern.ch/ssummers/run3_ugt_ml/-/blob/axol1tl_v3/ugt_hls/src/anomaly_detection/Axol1tl_v3.h
typedef ap_fixed<4,4> ad_shift_t;
typedef ap_fixed<10,9> ad_offset_t;
typedef ap_fixed<8,6,AP_RND_CONV,AP_SAT> input_t;
typedef ap_fixed<21,16> q_dense_accum_t;
typedef ap_fixed<21,16> layer2_t;
Expand Down Expand Up @@ -55,7 +53,5 @@ extern weight4_t w4[512];
extern bias4_t b4[16];
extern weight6_t w6[128];
extern bias6_t b6[8];
extern ad_shift_t ad_shift[57];
extern ad_offset_t ad_offsets[57];

#endif
10 changes: 1 addition & 9 deletions AXOL1TL_v3/NN/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,7 @@

//hls-fpga-machine-learning insert weights
#include "defines.h"
//weights/.h files outdated
// #include "weights/w2.h"
// #include "weights/b2.h"
// #include "weights/w4.h"
// #include "weights/b4.h"
// #include "weights/w6.h"
// #include "weights/b6.h"
// #include "weights/ad_shift.h"
// #include "weights/ad_offsets.h"
#include "weights.h"

//from https://gitlab.cern.ch/ssummers/run3_ugt_ml/-/blob/axol1tl_v3/ugt_hls/src/anomaly_detection/Axol1tl_v3.h

Expand Down
Loading

0 comments on commit f21d72b

Please sign in to comment.