diff --git a/basketballtrainer/models/pp_liteseg_rancrops.py b/basketballtrainer/models/pp_liteseg_rancrops.py index d971961..9b1e07d 100644 --- a/basketballtrainer/models/pp_liteseg_rancrops.py +++ b/basketballtrainer/models/pp_liteseg_rancrops.py @@ -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 diff --git a/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py b/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py index a77afa5..5d38600 100644 --- a/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py +++ b/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py @@ -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 diff --git a/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py b/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py index 2dfa89b..e144383 100644 --- a/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py +++ b/rancrop_model_variants/mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py @@ -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): diff --git a/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py b/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py index f8bc0d0..5122be5 100644 --- a/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py +++ b/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_after_inference.py @@ -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 diff --git a/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py b/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py index 7d09503..9f4a3d3 100644 --- a/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py +++ b/rancrop_model_variants/softmax_plus_mean_aggregation/pp_liteseg_rancrops_pad_before_inference.py @@ -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