#NEWLINE# def test_iterator( self ) : #NEWLINE# #INDENT# batch_size = 100 #NEWLINE# b01c_X = self . test . X [ 0 : batch_size , : ] #NEWLINE# b01c_topo = self . test . get_topological_view ( b01c_X ) #NEWLINE# b01c_b01c_it = self . test . iterator ( mode = 'sequential' , batch_size = batch_size , data_specs = ( Conv2DSpace ( shape = ( 32 , 32 ) , num_channels = 3 , axes = ( 'b' , 0 , 1 , 'c' ) ) , 'features' ) ) #NEWLINE# b01c_b01c = b01c_b01c_it . next ( ) #NEWLINE# assert np . all ( ( b01c_topo == b01c_b01c ) ) #NEWLINE# c01b_test = CIFAR10 ( which_set = 'test' , axes = ( 'c' , 0 , 1 , 'b' ) ) #NEWLINE# c01b_X = c01b_test . X [ 0 : batch_size , : ] #NEWLINE# c01b_topo = c01b_test . get_topological_view ( b01c_topo ) #NEWLINE# c01b_c01b_it = c01b_test . iterator ( mode = 'sequential' , batch_size = batch_size , data_specs = ( Conv2DSpace ( shape = ( 32 , 32 ) , num_channels = 3 , axes = ( 'c' , 0 , 1 , 'b' ) ) , 'features' ) ) #NEWLINE# c01b_c01b = c01b_c01b_it . next ( ) #NEWLINE# assert np . all ( ( c01b_topo == c01b_c01b ) ) #NEWLINE# b01c_c01b_it = self . test . iterator ( mode = 'sequential' , batch_size = batch_size , data_specs = ( Conv2DSpace ( shape = ( 32 , 32 ) , num_channels = 3 , axes = ( 'c' , 0 , 1 , 'b' ) ) , 'features' ) ) #NEWLINE# b01c_c01b = b01c_c01b_it . next ( ) #NEWLINE# assert np . all ( ( b01c_c01b == c01b_c01b ) ) #NEWLINE# c01b_b01c_it = c01b_test . iterator ( mode = 'sequential' , batch_size = batch_size , data_specs = ( Conv2DSpace ( shape = ( 32 , 32 ) , num_channels = 3 , axes = ( 'b' , 0 , 1 , 'c' ) ) , 'features' ) ) #NEWLINE# c01b_b01c = c01b_b01c_it . next ( ) #NEWLINE# assert np . all ( ( c01b_b01c == b01c_b01c ) )