sshuair / torchsat

🔥TorchSat 🌏 is an open-source deep learning framework for satellite imagery analysis based on PyTorch.
https://torchsat.readthedocs.io
MIT License
393 stars 49 forks source link

What does "target" mean in Seg*.__call__(self,img,target)? #2

Closed qwesdfok closed 5 years ago

qwesdfok commented 6 years ago

For example:

class SegResize(object): def init (self, size): if isinstance(size, int): self.size = (size, size) else: self.size = size def call (self, img, target): return F.resize(img, self.size), F.resize(target, self.size, Image.NEAREST)

Hello, I was wondering if I could pass the "img" parameter only? Because in the F.resize function, it checks if target is None. So, it will throw an exception if I pass the "target" parameter by None.

Thanks for your sharing anyway.

qwesdfok commented 5 years ago

I read your code and resolved this question. Thank you for your code :D