#NEWLINE# def _test_softmax( self , x , x_gpu , f_z , f_gpu_z , cmp ) : #NEWLINE# #INDENT# "\n        This is basic test for GpuSoftmax and GpuDnnSoftmax\n\n        We check that we loop when there is too much block\n        We use slower code when there isn't enough shared memory\n        " #NEWLINE# f_z_out = f_z ( x ) #NEWLINE# f_gpu_z_out = f_gpu_z ( x_gpu ) #NEWLINE# f = theano . function ( [ x ] , f_z_out , mode = mode_without_gpu ) #NEWLINE# f_gpu = theano . function ( [ x_gpu ] , f_gpu_z_out , mode = self . mode ) #NEWLINE# self . _check_types ( f , f_gpu , T . nnet . Softmax , self . gpu_op ) #NEWLINE# cmp ( 1 , 5 , f , f_gpu ) #NEWLINE# cmp ( 2 , 5 , f , f_gpu ) #NEWLINE# cmp ( 10 , 5 , f , f_gpu ) #NEWLINE# cmp ( 100 , 5 , f , f_gpu ) #NEWLINE# cmp ( 1000 , 5 , f , f_gpu ) #NEWLINE# cmp ( 10000 , 5 , f , f_gpu ) #NEWLINE# cmp ( 4074 , 400 , f , f_gpu ) #NEWLINE# cmp ( 784 , 784 , f , f_gpu ) #NEWLINE# cmp ( 4 , 1000 , f , f_gpu ) #NEWLINE# cmp ( 4 , 1024 , f , f_gpu ) #NEWLINE# cmp ( 4 , 2000 , f , f_gpu ) #NEWLINE# cmp ( 4 , 2024 , f , f_gpu ) #NEWLINE# cmp ( 4 , 4074 , f , f_gpu ) #NEWLINE# cmp ( 2 , 10000 , f , f_gpu ) #NEWLINE# cmp ( 128 , ( 16 * 1024 ) , f , f_gpu ) #NEWLINE# cmp ( 128 , ( 64 * 1024 ) , f , f_gpu ) #NEWLINE# cmp ( ( ( 2 << 15 ) - 1 ) , 5 , f , f_gpu ) #NEWLINE# cmp ( 5 , ( 2 << 15 ) , f , f_gpu ) #NEWLINE# return ( f , f_gpu )