13_halfrate_current_layers [main]  run_13_halfrate_current_layers.keras
=======================================================================
input (128, 4, 1) -> output (1,) (raw score; trigger when score > threshold)

layer                          type             filters/units  kernel   step groups     act     input shape    output shape      w+b      MACs
conv1                          QConv2D                     12     5,1    3,1      1    relu     (128, 4, 1)     (42, 4, 12)       72    10,080
pool1                          MaxPooling2D                 -     2,1    2,1      -       -     (42, 4, 12)     (21, 4, 12)        0         0
conv2                          QConv2D                     12     5,1    3,1      1    relu     (21, 4, 12)      (6, 4, 12)      732    17,280
pool2                          MaxPooling2D                 -     2,1    2,1      -       -      (6, 4, 12)      (3, 4, 12)        0         0
flatten                        Flatten                      -       -      -      -       -      (3, 4, 12)          (144,)        0         0
dense1                         QDense                       1       -      -      -  linear          (144,)            (1,)      145       144

total weights+biases 949   total MACs per window 27,504   heaviest layer conv2 (17,280 MACs)

Learned bit widths (HGQ kif fixed point, one width per tensor; iq = layer input, kq = kernel, bq = bias;
k = sign bit, i = integer bits, f = fractional bits; values as stored in the .keras file;
width = k + round(i) + round(f), i.e. ap_fixed<k+i+f, k+i>; the .keras file is authoritative):
  conv1                          iq: k 1  i   4.005  f   4.602   -> 10 bits  ap_fixed<10,5>
  conv1                          kq: k 1  i   4.000  f   5.706   -> 11 bits  ap_fixed<11,5>
  conv1                          bq: k 1  i   4.000  f   4.249   ->  9 bits  ap_fixed<9,5>
  conv2                          iq: k 1  i   4.000  f   5.151   -> 10 bits  ap_fixed<10,5>
  conv2                          kq: k 1  i   4.000  f   5.112   -> 10 bits  ap_fixed<10,5>
  conv2                          bq: k 1  i   4.000  f   4.209   ->  9 bits  ap_fixed<9,5>
  dense1                         iq: k 1  i   4.000  f   5.180   -> 10 bits  ap_fixed<10,5>
  dense1                         kq: k 1  i   4.000  f   5.072   -> 10 bits  ap_fixed<10,5>
  dense1                         bq: k 1  i   4.000  f   4.034   ->  9 bits  ap_fixed<9,5>


13_halfrate_current_layers [decimate_in_model]  run_13_halfrate_current_layers__decimate_in_model.keras
=======================================================================================================
input (256, 4, 1) -> output (1,) (raw score; trigger when score > threshold)

layer                          type             filters/units  kernel   step groups     act     input shape    output shape      w+b      MACs
decimate_keep_every_2nd        Conv2D                       1     1,1    2,1      1  linear     (256, 4, 1)     (128, 4, 1)        1         0   (fixed selection, not a learned layer (weight 1): keeps every 2nd sample)
conv1                          QConv2D                     12     5,1    3,1      1    relu     (128, 4, 1)     (42, 4, 12)       72    10,080
pool1                          MaxPooling2D                 -     2,1    2,1      -       -     (42, 4, 12)     (21, 4, 12)        0         0
conv2                          QConv2D                     12     5,1    3,1      1    relu     (21, 4, 12)      (6, 4, 12)      732    17,280
pool2                          MaxPooling2D                 -     2,1    2,1      -       -      (6, 4, 12)      (3, 4, 12)        0         0
flatten                        Flatten                      -       -      -      -       -      (3, 4, 12)          (144,)        0         0
dense1                         QDense                       1       -      -      -  linear          (144,)            (1,)      145       144

total weights+biases 950   total MACs per window 27,504   heaviest layer conv2 (17,280 MACs)

Learned bit widths (HGQ kif fixed point, one width per tensor; iq = layer input, kq = kernel, bq = bias;
k = sign bit, i = integer bits, f = fractional bits; values as stored in the .keras file;
width = k + round(i) + round(f), i.e. ap_fixed<k+i+f, k+i>; the .keras file is authoritative):
  conv1                          iq: k 1  i   4.005  f   4.602   -> 10 bits  ap_fixed<10,5>
  conv1                          kq: k 1  i   4.000  f   5.706   -> 11 bits  ap_fixed<11,5>
  conv1                          bq: k 1  i   4.000  f   4.249   ->  9 bits  ap_fixed<9,5>
  conv2                          iq: k 1  i   4.000  f   5.151   -> 10 bits  ap_fixed<10,5>
  conv2                          kq: k 1  i   4.000  f   5.112   -> 10 bits  ap_fixed<10,5>
  conv2                          bq: k 1  i   4.000  f   4.209   ->  9 bits  ap_fixed<9,5>
  dense1                         iq: k 1  i   4.000  f   5.180   -> 10 bits  ap_fixed<10,5>
  dense1                         kq: k 1  i   4.000  f   5.072   -> 10 bits  ap_fixed<10,5>
  dense1                         bq: k 1  i   4.000  f   4.034   ->  9 bits  ap_fixed<9,5>
