Skip to content

Commit

Permalink
supports leakyrelu when negative_slop != 0.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 317395286
Change-Id: I13c433a5d0d2b9ad94792fa28d047a430438158f
  • Loading branch information
zhuangh authored and copybara-github committed Jun 19, 2020
1 parent 01d9743 commit a1fb541
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qkeras/qtools/quantized_operators/quantizer_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def convert_qkeras_quantizer(
self.mode = mode
self.bits = bits
self.int_bits = int_bits
if hasattr(quantizer, "negative_slope") and quantizer.negative_slope != 0:
self.is_signed = 1


class Ternary(IQuantizer):
Expand Down

0 comments on commit a1fb541

Please sign in to comment.