Skip to content

Commit 118c46c

Browse files
committed
Add stride-32 output when using deep supervision
1 parent 4be0954 commit 118c46c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pytorch_toolbelt/datasets/segmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def __getitem__(self, index):
139139
sample[TARGET_MASK_WEIGHT_KEY] = image_to_tensor(compute_weight_mask(mask)).float()
140140

141141
if self.need_supervision_masks:
142-
for i in range(1, 5):
142+
for i in range(1, 6):
143143
stride = 2 ** i
144144
mask = block_reduce(mask, (2, 2), partial(_block_reduce_dominant_label))
145145
sample[name_for_stride(TARGET_MASK_KEY, stride)] = self.make_target(mask)

pytorch_toolbelt/inference/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections import Sized, Iterable
1+
from collections.abc import Sized, Iterable
22
from typing import Union, Tuple
33

44
import torch

0 commit comments

Comments
 (0)