Skip to content

Commit

Permalink
Fix stride2x2 validity check for out channel to check stride evenness
Browse files Browse the repository at this point in the history
  • Loading branch information
lukamac committed Jan 27, 2024
1 parent a6f142a commit c436ea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/Ne16TestConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ def check_valid_bias_type(cls, v: Optional[IntegerType]) -> Optional[IntegerType
return v

@model_validator(mode="after") # type: ignore
def check_valid_out_channel_with_stride_2x2(self) -> Ne16TestConf:
def check_valid_out_channel_stride_with_stride_2x2(self) -> Ne16TestConf:
assert implies(
self.stride == Stride(height=2, width=2), self.out_channel % 2 == 0
self.stride == Stride(height=2, width=2),
self.out_channel * (self.out_type._bits // 8) % 2 == 0,
), f"With stride 2x2 supported only even output channel sizes. Given output channel {self.out_channel}"
return self

Expand Down

0 comments on commit c436ea4

Please sign in to comment.