def run_conv_nnet2_classif(use_gpu, seed, isize, ksize, bsize, n_train=10, check_isfinite=True, verbose=0, version=(-1)):
 utt.seed_rng(seed)
 (train, params, x_shape, y_shape, mode) = build_conv_nnet2_classif(use_gpu=use_gpu, isize=isize, ksize=ksize, n_batch=bsize, verbose=verbose, version=version, check_isfinite=check_isfinite)
 xval = my_rand(*x_shape)
 yval = my_rand(*y_shape)
 lr = theano._asarray(0.01, dtype='float32')
 rvals = my_zeros(n_train)
 for i in xrange(n_train):
  rvals[i] = train(xval, yval, lr)[0]

def run_conv_nnet2_classif ( use_gpu , seed , isize , ksize , bsize , n_train = 10 , check_isfinite = True , verbose = 0 , version = ( - 1 ) ) : utt . seed_rng ( seed ) ( train , params , x_shape , y_shape , mode ) = build_conv_nnet2_classif ( use_gpu = use_gpu , isize = isize , ksize = ksize , n_batch = bsize , verbose = verbose , version = version , check_isfinite = check_isfinite ) xval = my_rand ( * x_shape ) yval = my_rand ( * y_shape ) lr = theano . _asarray ( 0.01 , dtype = 'float32' ) rvals = my_zeros ( n_train ) for i in xrange ( n_train ) : rvals [ i ] = train ( xval , yval , lr ) [ 0 ]
run the train function returned by build_conv_nnet2_classif on one device .