#NEWLINE# def test_multiple_outputs( self ) : #NEWLINE# #INDENT# m = tensor . matrix ( 'm' ) #NEWLINE# v = tensor . vector ( 'v' ) #NEWLINE# m_ = tensor . matrix ( 'm_' ) #NEWLINE# v_ = tensor . vector ( 'v_' ) #NEWLINE# mval = self . rng . uniform ( size = ( 3 , 7 ) ) . astype ( theano . config . floatX ) #NEWLINE# vval = self . rng . uniform ( size = ( 7 , ) ) . astype ( theano . config . floatX ) #NEWLINE# m_val = self . rng . uniform ( size = ( 3 , 7 ) ) . astype ( theano . config . floatX ) #NEWLINE# v_val = self . rng . uniform ( size = ( 7 , ) ) . astype ( theano . config . floatX ) #NEWLINE# rop_out1 = tensor . Rop ( [ m , v , ( m + v ) ] , [ m , v ] , [ m_ , v_ ] ) #NEWLINE# assert isinstance ( rop_out1 , list ) #NEWLINE# assert ( len ( rop_out1 ) == 3 ) #NEWLINE# rop_out2 = tensor . Rop ( ( m , v , ( m + v ) ) , [ m , v ] , [ m_ , v_ ] ) #NEWLINE# assert isinstance ( rop_out2 , tuple ) #NEWLINE# assert ( len ( rop_out2 ) == 3 ) #NEWLINE# all_outs = [ ] #NEWLINE# for o in ( rop_out1 , rop_out2 ) : #NEWLINE# #INDENT# all_outs . extend ( o ) #NEWLINE# #UNINDENT# f = theano . function ( [ m , v , m_ , v_ ] , all_outs ) #NEWLINE# f ( mval , vval , all_outs , v_val )