Skip to content

Commit 53f12bb

Browse files
committed
Restore dict copy.
1 parent e15f536 commit 53f12bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchvision/prototype/transforms/_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ def _setup_fill_arg(fill: Union[FillType, Dict[Type, FillType]]) -> Dict[Type, F
7575
_check_fill_arg(fill)
7676

7777
if isinstance(fill, dict):
78+
fill_copy = {}
7879
for k, v in fill.items():
79-
fill[k] = _convert_fill_arg(v)
80-
return fill
80+
fill_copy[k] = _convert_fill_arg(v)
81+
return fill_copy
8182

8283
return _get_defaultdict(_convert_fill_arg(fill))
8384

0 commit comments

Comments
 (0)