|
@@ -115,8 +115,8 @@ class SouthLoss(Loss):
|
|
|
name: str = "south_loss",
|
|
|
reduction: str = "sum_over_batch_size"):
|
|
|
# 参数校验
|
|
|
- # if not 0 <= cap <= 1:
|
|
|
- # raise ValueError("cap 必须为归一化后的值且位于 [0,1] 区间")
|
|
|
+ if not 0 <= cap <= 1:
|
|
|
+ raise ValueError("cap 必须为归一化后的值且位于 [0,1] 区间")
|
|
|
|
|
|
super().__init__(name=name, reduction=reduction)
|
|
|
|