Skip to content

Commit 32d8341

Browse files
authored
Fixed issue in torchvision_tutorial.rst (#2537)
Forgot to update image_id in rst but using correct type in complete code: https://github.com/pytorch/tutorials/blob/6b31dd0da52178c21170217680370d4430bd1b54/_static/tv-training-code.py#L52
1 parent 6b31dd0 commit 32d8341

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intermediate_source/torchvision_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ As datapoints are :class:`torch.Tensor` subclasses, wrapped objects are also ten
151151
# there is only one class
152152
labels = torch.ones((num_objs,), dtype=torch.int64)
153153
154-
image_id = torch.tensor([idx])
154+
image_id = idx
155155
area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])
156156
# suppose all instances are not crowd
157157
iscrowd = torch.zeros((num_objs,), dtype=torch.int64)

0 commit comments

Comments
 (0)