#NEWLINE# def test_topo_c01b( self ) : #NEWLINE# #INDENT# "\n        Tests that a topological batch with axes ('c',0,1,'b')\n        can be dimshuffled back to match the standard ('b',0,1,'c')\n        format.\n        " #NEWLINE# batch_size = 100 #NEWLINE# c01b_test = CIFAR10 ( which_set = 'test' , axes = ( 'c' , 0 , 1 , 'b' ) ) #NEWLINE# c01b_X = c01b_test . X [ 0 : batch_size , : ] #NEWLINE# c01b = c01b_test . get_topological_view ( c01b_X ) #NEWLINE# assert ( c01b . shape == ( 3 , 32 , 32 , batch_size ) ) #NEWLINE# b01c = c01b . transpose ( 3 , 1 , 2 , 0 ) #NEWLINE# b01c_X = self . test . X [ 0 : batch_size , : ] #NEWLINE# assert ( c01b_X . shape == b01c_X . shape ) #NEWLINE# assert np . all ( ( c01b_X == b01c_X ) ) #NEWLINE# b01c_direct = self . test . get_topological_view ( b01c_X ) #NEWLINE# assert ( b01c_direct . shape == b01c . shape ) #NEWLINE# assert np . all ( ( b01c_direct == c01b_test ) )