Skip to content

Commit

Permalink
Fix for None dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed May 23, 2024
1 parent 8a9196b commit 975edaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/brevitas/core/quant/float.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def __init__(
self.float_clamp_impl = float_clamp_impl

# To avoid log(0), we add small a small value based on the used dtype
if dtype is None:
dtype = torch.get_default_dtype()
self.eps = torch.finfo(dtype).tiny

@brevitas.jit.script_method
Expand Down

0 comments on commit 975edaa

Please sign in to comment.