Skip to content

Commit

Permalink
fix (nn/convxd): typo fix on conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfraser committed Sep 4, 2024
1 parent bc703e5 commit 9de92f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/brevitas/nn/quant_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def __init__(
dtype: Optional[torch.dtype] = None,
**kwargs) -> None:
# avoid an init error in the super class by setting padding to 0
if padding_mode == 'zeros' and padding == 'same' and stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride)):
if padding_mode == 'zeros' and padding == 'same' and (stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride))):
padding = 0
is_same_padded_strided = True
else:
Expand Down Expand Up @@ -133,8 +133,8 @@ def __init__(
dtype: Optional[torch.dtype] = None,
**kwargs) -> None:
# avoid an init error in the super class by setting padding to 0
if padding_mode == 'zeros' and padding == 'same' and stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride)):
if padding_mode == 'zeros' and padding == 'same' and (stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride))):
padding = 0
is_same_padded_strided = True
else:
Expand Down Expand Up @@ -222,8 +222,8 @@ def __init__(
dtype: Optional[torch.dtype] = None,
**kwargs) -> None:
# avoid an init error in the super class by setting padding to 0
if padding_mode == 'zeros' and padding == 'same' and stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride)):
if padding_mode == 'zeros' and padding == 'same' and (stride > 1 if isinstance(
stride, int) else any(map(lambda x: x > 1, stride))):
padding = 0
is_same_padded_strided = True
else:
Expand Down

0 comments on commit 9de92f2

Please sign in to comment.