#NEWLINE# def test_collapse( self , input_data , input_var , input_layer ) : #NEWLINE# #INDENT# from lasagne.layers.shape import DimshuffleLayer #NEWLINE# ds_ok = DimshuffleLayer ( input_layer , [ 0 , 1 , 3 , 4 ] ) #NEWLINE# assert ( ds_ok . output_shape == ( 2 , 3 , 5 , 7 ) ) #NEWLINE# assert ( ds_ok . get_output_for ( input_var ) . eval ( { #NEWLINE# #INDENT# input_layer : input_data , #NEWLINE# #UNINDENT# } ) . shape == ( 2 , 3 , 5 , 7 ) ) #NEWLINE# with pytest . raises ( ValueError ) : #NEWLINE# #INDENT# DimshuffleLayer ( input_layer , [ 0 , 1 , 2 , 4 ] )