def test_none_Constant():
 o1 = Constant(NoneTypeT(), None, name='NoneConst')
 o2 = Constant(NoneTypeT(), None, name='NoneConst')
 assert o1.equals(o2)
 assert NoneConst.equals(o1)
 assert o1.equals(NoneConst)
 assert NoneConst.equals(o2)
 assert o2.equals(NoneConst)
 import six.moves.cPickle as pickle
 import theano
 from theano import tensor
 x = tensor.vector('x')
 y = tensor.argmax(x)
 kwargs = {}
 if (theano.config.mode in ['DebugMode', 'DEBUG_MODE']):
  kwargs = {'mode': 'FAST_RUN'}
 f = theano.function([x], [y], **kwargs)
 pickle.loads(pickle.dumps(f))

def test_none_Constant ( ) : o1 = Constant ( NoneTypeT ( ) , None , name = 'NoneConst' ) o2 = Constant ( NoneTypeT ( ) , None , name = 'NoneConst' ) assert o1 . equals ( o2 ) assert NoneConst . equals ( o1 ) assert o1 . equals ( NoneConst ) assert NoneConst . equals ( o2 ) assert o2 . equals ( NoneConst ) import six . moves . cPickle as pickle import theano from theano import tensor x = tensor . vector ( 'x' ) y = tensor . argmax ( x ) kwargs = { } if ( theano . config . mode in [ 'DebugMode' , 'DEBUG_MODE' ] ) : kwargs = { 'mode' : 'FAST_RUN' } f = theano . function ( [ x ] , [ y ] , ** kwargs ) pickle . loads ( pickle . dumps ( f ) )
tests equals we had an error in the past with unpickling .