Skip to content

Commit f8d84ed

Browse files
Trying to fix mypy error
1 parent 1b60fe6 commit f8d84ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

torchvision/transforms/v2/_augment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def __init__(
7777
self.scale = scale
7878
self.ratio = ratio
7979
if isinstance(value, (int, float)):
80-
self.value = [float(value)]
80+
value = [float(value)]
8181
elif isinstance(value, str):
82-
self.value = None
82+
value = None
8383
elif isinstance(value, (list, tuple)):
84-
self.value = [float(v) for v in value]
85-
else:
86-
self.value = value
84+
value = [float(v) for v in value]
85+
86+
self.value: Optional[Sequence[float]] = value
8787
self.inplace = inplace
8888

8989
self._log_ratio = torch.log(torch.tensor(self.ratio))

0 commit comments

Comments
 (0)