Skip to content

How MultiThreshold works #914

Answered by fpjentzsch
wanglu4042 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
the Muls and Adds correspond to the quantizer's scale value and zero point and should be merged into the MultiThreshold node by the streamlining transformations in FINN. This is possible because the MultiThreshold can implement any monotonically non-decreasing function. Streamlining simply updates the stored threshold values by absorbing the Mul/Add nodes. You can see the operating principle here:

The threshold initializer in your 2nd picture has shape [8,255]:

  • 8 is the number of channels; you can have different scaling factors (and thus thresholds) for each channel if you allow it in Brevitas
  • 255 is (2^8)-1 because your output activation bitwidth is 8
  • Each of the threshold values i…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by auphelia
Comment options

You must be logged in to vote
1 reply
@fpjentzsch
Comment options

Comment options

You must be logged in to vote
4 replies
@fpjentzsch
Comment options

@wanglu4042
Comment options

@fpjentzsch
Comment options

@wanglu4042
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants