Skip to content

Commit

Permalink
replace assert with value error
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Sep 19, 2024
1 parent 50e42eb commit 438c7a3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions luxonis_train/nodes/backbones/ddrnet/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,16 @@ def __init__(
@type inter_mode: str
@param inter_mode: Interpolation mode for upscaling. Defaults to
"bilinear".
@raises ValueError: If the lengths of `kernel_sizes` and `strides`
are not the same.
"""
super().__init__()

assert len(kernel_sizes) == len(
strides
), "len of kernel_sizes and strides must be the same"
if len(kernel_sizes) != len(strides): # pragma: no cover
raise ValueError(
"The lenghts of `kernel_sizes` and `strides` must be the same"
)

self.branches = nn.ModuleList(
[
Expand Down

0 comments on commit 438c7a3

Please sign in to comment.