Skip to content

Commit 771d937

Browse files
committed
fixed flake8 errors
1 parent 5293f47 commit 771d937

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchvision/datasets/voc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ def __call__(self, target, channels, height, width):
114114
bndbox = []
115115
for i, cur_bb in enumerate(bbox):
116116
bb_sz = int(cur_bb.text) - 1
117-
bb_sz = bb_sz/width if i%2 == 0 else bb_sz/height # scale height or width
117+
# scale height or width
118+
bb_sz = bb_sz / width if i % 2 == 0 else bb_sz / height
118119
bndbox.append(bb_sz)
119120

120121
label_ind = self.class_to_ind[name]
@@ -194,7 +195,7 @@ def show(self, index, subparts=False):
194195
draw = ImageDraw.Draw(img)
195196
i = 0
196197
bndboxs = []
197-
classes = dict() # maps class name to a class number
198+
classes = dict() # maps class name to a class number
198199
for obj in target.iter('object'):
199200
bbox = obj.find('bndbox')
200201
name = obj.find('name').text.lower().strip()

0 commit comments

Comments
 (0)