We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
I want to remplace Randomerasing by Gridmask in the compse step
def get_transform(resize, phase='train'): if phase == 'train': return transforms.Compose([ transforms.Resize(size=(int(resize[0] / 0.875), int(resize[1] / 0.875))), transforms.RandomHorizontalFlip(0.5), transforms.ColorJitter(brightness=0.126, saturation=0.5), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), GridMask(200, 300, rotate = 1, ratio = 0.8, mode=1, prob=1) ])
but i'm getting this error
n,c,h,w = x.size() ValueError: not enough values to unpack (expected 4, got 3)
i think that it need a batch, so is it possible to use it in compose ?
The text was updated successfully, but these errors were encountered:
Of course, you can use it in compose, just use Grid instead of GridMask in grid.py
Sorry, something went wrong.
i remplaced GridMask by Grid but i'm getting this error
"...grid.py", line 70, in__call__
mask = torch.from_numpy(mask).float().cuda() RuntimeError: CUDA error: initialization error
i remplaced GridMask by Grid but i'm getting this error "...grid.py", line 70, in__call__ mask = torch.from_numpy(mask).float().cuda() RuntimeError: CUDA error: initialization error
you can do like this: mask = torch.from_numpy(np.array(mask))
No branches or pull requests
Hello
I want to remplace Randomerasing by Gridmask in the compse step
def get_transform(resize, phase='train'): if phase == 'train': return transforms.Compose([ transforms.Resize(size=(int(resize[0] / 0.875), int(resize[1] / 0.875))), transforms.RandomHorizontalFlip(0.5), transforms.ColorJitter(brightness=0.126, saturation=0.5), transforms.ToTensor(), transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]), GridMask(200, 300, rotate = 1, ratio = 0.8, mode=1, prob=1) ])
but i'm getting this error
n,c,h,w = x.size()
ValueError: not enough values to unpack (expected 4, got 3)
i think that it need a batch, so is it possible to use it in compose ?
The text was updated successfully, but these errors were encountered: