PyUpgrade 3.8 updates (#15941)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
ea13dc6208
commit
9ec8e9acbf
13 changed files with 25 additions and 25 deletions
|
|
@ -100,7 +100,7 @@ class FastSAMPredictor(SegmentationPredictor):
|
|||
texts = [texts]
|
||||
crop_ims, filter_idx = [], []
|
||||
for i, b in enumerate(result.boxes.xyxy.tolist()):
|
||||
x1, y1, x2, y2 = [int(x) for x in b]
|
||||
x1, y1, x2, y2 = (int(x) for x in b)
|
||||
if masks[i].sum() <= 100:
|
||||
filter_idx.append(i)
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class DropPath(nn.Module):
|
|||
|
||||
def __init__(self, drop_prob=0.0, scale_by_keep=True):
|
||||
"""Initialize DropPath module for stochastic depth regularization during training."""
|
||||
super(DropPath, self).__init__()
|
||||
super().__init__()
|
||||
self.drop_prob = drop_prob
|
||||
self.scale_by_keep = scale_by_keep
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue