#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# source1 = numpy . zeros ( ( 9 , 3 , 7 , 5 ) , dtype = 'uint8' ) #NEWLINE# source1 [ : ] = numpy . arange ( ( ( 3 * 7 ) * 5 ) , dtype = 'uint8' ) . reshape ( 3 , 7 , 5 ) #NEWLINE# shapes = [ ( 5 , 9 ) , ( 6 , 8 ) , ( 5 , 6 ) , ( 5 , 5 ) , ( 6 , 4 ) , ( 7 , 4 ) , ( 9 , 4 ) , ( 5 , 6 ) , ( 6 , 5 ) ] #NEWLINE# source2 = [ ] #NEWLINE# biggest = 0 #NEWLINE# num_channels = 2 #NEWLINE# for shp in shapes : #NEWLINE# #INDENT# biggest = max ( biggest , ( ( shp [ 0 ] * shp [ 1 ] ) * 2 ) ) #NEWLINE# ex = numpy . arange ( ( ( shp [ 0 ] * shp [ 1 ] ) * num_channels ) ) . reshape ( ( ( num_channels , ) + shp ) ) . astype ( 'uint8' ) #NEWLINE# source2 . append ( self ) #NEWLINE# #UNINDENT# self . source2_biggest = biggest #NEWLINE# axis_labels = { #NEWLINE# #INDENT# 'source1' : ( 'batch' , 'channel' , 'height' , 'width' ) , #NEWLINE# 'source2' : ( 'batch' , 'channel' , 'height' , 'width' ) , #NEWLINE# #UNINDENT# } #NEWLINE# self . dataset = IndexableDataset ( OrderedDict ( [ ( 'source1' , source1 ) , ( 'source2' , source2 ) ] ) , axis_labels = axis_labels ) #NEWLINE# self . common_setup ( )