Skip to content
New issue

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

make dropblock run faster #45

Open
xieyxclack opened this issue Aug 6, 2021 · 1 comment
Open

make dropblock run faster #45

xieyxclack opened this issue Aug 6, 2021 · 1 comment

Comments

@xieyxclack
Copy link

mask = (torch.rand(x.shape[0], *x.shape[2:]) < gamma).float()

Modify this line to " mask = (torch.rand(x.shape[0], *x.shape[2:]).to(x.device) < gamma).float() " can be dropblock run faster.

@xieyxclack xieyxclack changed the title mask dropblock run faster make dropblock run faster Aug 6, 2021
@miguelvr
Copy link
Owner

miguelvr commented Aug 6, 2021

Feel free to make a PR to the repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants