Created
September 3, 2014 18:45
-
-
Save MarcCote/1f95703c6a3e599d6229 to your computer and use it in GitHub Desktop.
Shows nstreams limitation on GPU
This file contains 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
import theano | |
import numpy as np | |
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams | |
theano_rng = RandomStreams(42) | |
# This one works fine | |
print np.sum(theano_rng.uniform(size=(10000, 784), dtype=theano.config.floatX, nstreams=10000).eval(), 1) | |
# This one produces NaN at the end | |
print np.sum(theano_rng.uniform(size=(10000, 784), dtype=theano.config.floatX, nstreams=10000*400).eval(), 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment