Last active
August 27, 2016 05:47
-
-
Save peiyunh/f14f27e11e6be01360d47ba69c466bb1 to your computer and use it in GitHub Desktop.
Fix GPU's random seed in Matlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randSeed = 0; | |
rng(randSeed); | |
a = gpuArray(rand(1,5)); | |
% uncomment below to fix gpu random seed | |
%randStream = parallel.gpu.RandStream('CombRecursive', 'Seed', randSeed); | |
%parallel.gpu.RandStream.setGlobalStream(randStream); | |
vl_nndropout(a, 'rate', 0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment