#NEWLINE# def test_LayerParamsSkipOneWithNone( self ) : #NEWLINE# #INDENT# nn = MLPR ( layers = [ L ( 'Sigmoid' , units = 32 ) , L ( 'Linear' , name = 'abcd' ) ] ) #NEWLINE# ( a_in , a_out ) = ( numpy . zeros ( ( 8 , 16 ) ) , numpy . zeros ( ( 8 , 4 ) ) ) #NEWLINE# nn . _initialize ( self , a_out ) #NEWLINE# weights = numpy . random . uniform ( ( - 1.0 ) , ( + 1.0 ) , ( 32 , 4 ) ) #NEWLINE# biases = numpy . random . uniform ( ( - 1.0 ) , ( + 1.0 ) , ( 4 , ) ) #NEWLINE# nn . set_parameters ( [ None , ( weights , biases ) ] ) #NEWLINE# p = nn . get_parameters ( ) #NEWLINE# assert_true ( ( p [ 1 ] . weights . astype ( 'float32' ) == weights . astype ( 'float32' ) ) . all ( ) ) #NEWLINE# assert_true ( ( p [ 1 ] . biases . astype ( 'float32' ) == biases . astype ( 'float32' ) ) . all ( ) )