Skip to content

Commit 8faaefc

Browse files
buoyancy99fmassa
authored andcommitted
update shallow copy method to allow variable size tensor input (#1111)
1 parent 95a8785 commit 8faaefc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/models/detection/transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, min_size, max_size, image_mean, image_std):
3030
self.image_std = image_std
3131

3232
def forward(self, images, targets=None):
33-
images = images[:]
33+
images = [img for img in images]
3434
for i in range(len(images)):
3535
image = images[i]
3636
target = targets[i] if targets is not None else targets

0 commit comments

Comments
 (0)