Change ifelse import in Theano backend for compatibility with Theano 1.0.0
@@ -5,6 +5,7 @@ from theano import tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano.tensor.signal import pool
from theano.printing import Print
+from theano.ifelse import ifelse
try:
import theano.sparse as th_sparse_module
except ImportError:
@@ -1500,7 +1501,7 @@ def in_train_phase(x, alt, training=None):
alt = alt()
# else: assume learning phase is a placeholder tensor.
- x = theano.ifelse.ifelse(training, x, alt)
+ x = ifelse(training, x, alt)
if uses_learning_phase:
x._uses_learning_phase = True
return x
