Skip to content

Commit 6af796a

Browse files
authored
silence mypy (#6857)
1 parent cb60e97 commit 6af796a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/prototype/transforms/_augment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _mixup_onehotlabel(self, inpt: features.OneHotLabel, lam: float) -> features
125125

126126
class RandomMixup(_BaseMixupCutmix):
127127
def _get_params(self, flat_inputs: List[Any]) -> Dict[str, Any]:
128-
return dict(lam=float(self._dist.sample(())))
128+
return dict(lam=float(self._dist.sample(()))) # type: ignore[arg-type]
129129

130130
def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
131131
lam = params["lam"]
@@ -147,7 +147,7 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
147147

148148
class RandomCutmix(_BaseMixupCutmix):
149149
def _get_params(self, flat_inputs: List[Any]) -> Dict[str, Any]:
150-
lam = float(self._dist.sample(()))
150+
lam = float(self._dist.sample(())) # type: ignore[arg-type]
151151

152152
H, W = query_spatial_size(flat_inputs)
153153

0 commit comments

Comments
 (0)