Skip to content

Commit 69a3d6c

Browse files
author
pytorchbot
committed
2025-03-19 nightly release (8ea4772)
1 parent d9e1f4b commit 69a3d6c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

torchvision/models/optical_flow/raft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def forward(self, image1, image2, num_flow_updates: int = 12):
486486
batch_size, _, h, w = image1.shape
487487
if (h, w) != image2.shape[-2:]:
488488
raise ValueError(f"input images should have the same shape, instead got ({h}, {w}) != {image2.shape[-2:]}")
489-
if not (h % 8 == 0) and (w % 8 == 0):
489+
if not ((h % 8 == 0) and (w % 8 == 0)):
490490
raise ValueError(f"input image H and W should be divisible by 8, instead got {h} (h) and {w} (w)")
491491

492492
fmaps = self.feature_encoder(torch.cat([image1, image2], dim=0))

torchvision/ops/boxes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def batched_nms(
7878
_log_api_usage_once(batched_nms)
7979
# Benchmarks that drove the following thresholds are at
8080
# https://github.com/pytorch/vision/issues/1311#issuecomment-781329339
81-
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing():
81+
# and https://github.com/pytorch/vision/pull/8925
82+
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 100_000) and not torchvision._is_tracing():
8283
return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold)
8384
else:
8485
return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold)

torchvision/transforms/v2/_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _check_input(
134134
raise TypeError(f"{name}={value} should be a single number or a sequence with length 2.")
135135

136136
if not bound[0] <= value[0] <= value[1] <= bound[1]:
137-
raise ValueError(f"{name} values should be between {bound}, but got {value}.")
137+
raise ValueError(f"{name} values should be between {bound} and increasing, but got {value}.")
138138

139139
return None if value[0] == value[1] == center else (float(value[0]), float(value[1]))
140140

0 commit comments

Comments
 (0)