Skip to content

Commit

Permalink
Added assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
peiva-git committed Dec 16, 2023
1 parent 75fb88c commit 1c83357
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions basketballtrainer/models/pp_liteseg_rancrops.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self,
resize_mode=resize_mode,
pretrained=pretrained
)
assert random_crops >= 0, 'Number of random crops should be a positive integer'
self.__random_crops = random_crops
self.__num_classes = num_classes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(self,
resize_mode=resize_mode,
pretrained=pretrained
)
assert random_crops >= 0, 'Number of random crops should be a positive integer'
self.__random_crops = random_crops
self.__num_classes = num_classes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self,
resize_mode=resize_mode,
pretrained=pretrained
)
assert random_crops >= 0, 'Number of random crops should be a positive integer'
self.__random_crops = random_crops

def forward(self, x):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(self,
resize_mode=resize_mode,
pretrained=pretrained
)
assert random_crops >= 0, 'Number of random crops should be a positive integer'
self.__random_crops = random_crops
self.__num_classes = num_classes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(self,
resize_mode=resize_mode,
pretrained=pretrained
)
assert random_crops >= 0, 'Number of random crops should be a positive integer'
self.__random_crops = random_crops
self.__num_classes = num_classes

Expand Down

0 comments on commit 1c83357

Please sign in to comment.