Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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