Closed qwesdfok closed 5 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.
I read your code and resolved this question. Thank you for your code :D
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.