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

Dropout #182

Open
wants to merge 1 commit into
base: R5
Choose a base branch
from
Open

Dropout #182

wants to merge 1 commit into from

Conversation

szagoruyko
Copy link
Collaborator

cudnn.Dropout should take about a ton less memory because it stores masks in binary format and faster as well, thanks to @ngimel for explaining this.
can someone review please?

Btw, R5 is released, it's time to make it master @soumith ?

local state = cudnn.dropout_rng_states[dev]
errcheck('cudnnSetDropoutDescriptor', self.dropDesc[0],
cudnn.getHandle(), self.p,
state:data(), state:nElement(), torch.seed())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would reset the seed of torch RNG - this is probably not something you want to do, as it can introduce non-desirable non-determinism. Better to use torch.random() here?

@ngimel
Copy link
Collaborator

ngimel commented May 16, 2016

cudnn.Dropout:setp() will be broken (for it to work, cudnn.Dropout:setp() should call setDropoutDescriptor using NULL as state argument if states are initialized already). (and thanks for these bindings!)

@ngimel
Copy link
Collaborator

ngimel commented May 16, 2016

There is a potential problem with several dropout layers sharing the states and running concurrently in the different streams, but its hard to make this scenario completely safe.

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

Successfully merging this pull request may close these issues.

2 participants