#NEWLINE# def pytest_generate_tests( metafunc ) : #NEWLINE# #INDENT# np . random . seed ( 1 ) #NEWLINE# if metafunc . config . option . all : #NEWLINE# #INDENT# bsz_rng = [ 32 , 64 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bsz_rng = [ 128 ] #NEWLINE# #UNINDENT# if ( 'zeros_convargs' in metafunc . fixturenames ) : #NEWLINE# #INDENT# fargs = [ ] #NEWLINE# if metafunc . config . option . all : #NEWLINE# #INDENT# fs_rng = [ 2 , 3 , 5 , 7 ] #NEWLINE# nofm_rng = [ 16 , 32 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fs_rng = [ 2 , 5 ] #NEWLINE# nofm_rng = [ 16 ] #NEWLINE# #UNINDENT# fargs = itt . product ( fs_rng , nofm_rng , bsz_rng ) #NEWLINE# metafunc . parametrize ( 'zeros_convargs' , fargs ) #NEWLINE# #UNINDENT# if ( 'ones_convargs' in metafunc . fixturenames ) : #NEWLINE# #INDENT# fargs = [ ] #NEWLINE# if metafunc . config . option . all : #NEWLINE# #INDENT# bsz_rng = [ 64 ] #NEWLINE# indim_rng = [ 16 , 32 ] #NEWLINE# nifm_rng = [ 1 , 2 , 3 ] #NEWLINE# fs_rng = [ 2 , 3 ] #NEWLINE# stride_rng = [ 1 , 2 ] #NEWLINE# nofm_rng = [ 16 , 32 , 64 ] #NEWLINE# pad_rng = [ 0 , 1 , 2 ] #NEWLINE# fargs1 = itt . product ( fargs1 , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , pad_rng ) #NEWLINE# fs_rng = [ 5 ] #NEWLINE# stride_rng = [ 1 , 5 ] #NEWLINE# fargs2 = itt . product ( indim_rng , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , pad_rng ) #NEWLINE# fargs = itt . chain ( fargs1 , fargs2 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bsz_rng = [ 64 ] #NEWLINE# indim_rng = [ 32 ] #NEWLINE# nifm_rng = [ 3 ] #NEWLINE# fs_rng = [ 2 , 5 ] #NEWLINE# nofm_rng = [ 16 ] #NEWLINE# stride_rng = [ 1 , 2 ] #NEWLINE# pad_rng = [ 0 , 1 ] #NEWLINE# fargs = itt . product ( indim_rng , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , pad_rng ) #NEWLINE# #UNINDENT# metafunc . parametrize ( 'ones_convargs' , fargs ) #NEWLINE# #UNINDENT# if ( 'rand_convargs' in metafunc . fixturenames ) : #NEWLINE# #INDENT# fargs = [ ] #NEWLINE# eps = np . finfo ( np . float32 ) . eps #NEWLINE# if metafunc . config . option . all : #NEWLINE# #INDENT# indim_rng = [ 16 , 32 ] #NEWLINE# nifm_rng = [ 1 , 3 ] #NEWLINE# fs_rng = [ 2 , 3 ] #NEWLINE# nofm_rng = [ 16 ] #NEWLINE# rng_max_rng = [ eps , ( eps * 10 ) , 1.0 , 100 ] #NEWLINE# wrng = [ [ 0.0 , 1.0 ] , [ ( - 1.0 ) , 0.0 ] , [ ( - 1.0 ) , 1.0 ] ] #NEWLINE# stride_rng = [ 1 , 2 , 3 ] #NEWLINE# pad_rng = [ 0 , 1 , 2 ] #NEWLINE# fargs1 = itt . product ( indim_rng , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , rng_max_rng , wrng , pad_rng ) #NEWLINE# fs_rng = [ 5 ] #NEWLINE# stride_rng = [ 1 , 5 ] #NEWLINE# fargs2 = itt . product ( indim_rng , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , rng_max_rng , wrng , pad_rng ) #NEWLINE# fargs = itt . chain ( fargs1 , fargs2 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# indim_rng = [ 16 ] #NEWLINE# nifm_rng = [ 1 , 3 ] #NEWLINE# fs_rng = [ 2 , 5 ] #NEWLINE# nofm_rng = [ 16 ] #NEWLINE# rng_max_rng = [ 2.0 ] #NEWLINE# stride_rng = [ 1 , 2 ] #NEWLINE# wrng = [ [ ( - 1.0 ) , 1.0 ] ] #NEWLINE# pad_rng = [ 0 , 1 ] #NEWLINE# fargs = itt . product ( indim_rng , nifm_rng , fs_rng , nofm_rng , bsz_rng , stride_rng , rng_max_rng , wrng , pad_rng ) #NEWLINE# #UNINDENT# metafunc . parametrize ( 'rand_convargs' , fargs )