Skip to content

Commit 93c9a36

Browse files
committed
Use MRG_RandomStreams instead for shared_randomstreams for GPU compat.
1 parent e64a8fc commit 93c9a36

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

code/SdA.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
import theano
4242
import theano.tensor as T
43-
from theano.tensor.shared_randomstreams import RandomStreams
43+
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
4444

4545
from logistic_sgd import LogisticRegression, load_data
4646
from mlp import HiddenLayer

code/dA.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
import theano
4242
import theano.tensor as T
43-
from theano.tensor.shared_randomstreams import RandomStreams
43+
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
4444

4545
from logistic_sgd import load_data
4646
from utils import tile_raster_images

code/hmc/hmc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def new_from_shared_positions(
358358
stepsize = sharedX(initial_stepsize, 'hmc_stepsize')
359359
avg_acceptance_rate = sharedX(target_acceptance_rate,
360360
'avg_acceptance_rate')
361-
s_rng = TT.shared_randomstreams.RandomStreams(seed)
361+
s_rng = theano.sandbox.rng_mrg.MRG_RandomStreams(seed)
362362

363363
# define graph for an `n_steps` HMC simulation
364364
accept, final_pos = hmc_move(

code/rbm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import theano.tensor as T
2121
import os
2222

23-
from theano.tensor.shared_randomstreams import RandomStreams
23+
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
2424

2525
from utils import tile_raster_images
2626
from logistic_sgd import load_data

code/rnnrbm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from midi.utils import midiread, midiwrite
2020
import theano
2121
import theano.tensor as T
22-
from theano.tensor.shared_randomstreams import RandomStreams
22+
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
2323

2424
#Don't use a python long as this don't work on 32 bits computers.
2525
numpy.random.seed(0xbeef)

0 commit comments

Comments
 (0)