fcdl94/WILSON

not return in transform.py

Closed this issue · 2 comments

Hi! I have little question about dataset > transform.py.
In line 89:

class Resize(object):
    ...
    def __call__(self, img, lbl=None):
        if lbl is not None:
            if isinstance(lbl, torch.Tensor):
                F.resize(img, self.size, self.interpolation), F.resize(lbl, self.size, InterpolationMode.BILINEAR)# no return

Is there missing return?

fcdl94 commented

Yes you're right! Anyway, I'd suggest you to use the PIL Images instead of torch tensors as labels, since it wasn't tested during the experiments (we used PIL Images).

Thank you for your reply!