Skip to content

Instantly share code, notes, and snippets.

@konverner
Created April 7, 2021 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konverner/9f1b62ae75b240586ba8e648c4a37b62 to your computer and use it in GitHub Desktop.
Save konverner/9f1b62ae75b240586ba8e648c4a37b62 to your computer and use it in GitHub Desktop.
dropout_pytorch.py
import torch
X = torch.rand((8,8))
p = 0.3
X = (X > p)*X/(1-p) # dropout itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment