#NEWLINE# def test_log1pexp_to_softplus( self ) : #NEWLINE# #INDENT# m = theano . config . mode #NEWLINE# if ( m == 'FAST_COMPILE' ) : #NEWLINE# #INDENT# m = 'FAST_RUN' #NEWLINE# #UNINDENT# x = T . vector ( ) #NEWLINE# out = T . log ( ( 1 + T . exp ( x ) ) ) #NEWLINE# f = theano . function ( [ x ] , out , mode = self . m ) #NEWLINE# topo = f . maker . fgraph . toposort ( ) #NEWLINE# assert ( len ( topo ) == 1 ) #NEWLINE# assert isinstance ( topo [ 0 ] . op . scalar_op , theano . tensor . nnet . sigm . ScalarSoftplus ) #NEWLINE# f ( numpy . random . rand ( 54 ) . astype ( config . floatX ) )