@no_debug_mode
def test_train_example():
 assert (config.mode != 'DEBUG_MODE')
 path = pylearn2.__path__[0]
 train_example_path = os.path.join(path, 'scripts', 'tutorials', 'grbm_smd')
 if (not os.path.isfile(os.path.join(train_example_path, 'cifar10_preprocessed_train.pkl'))):
  raise SkipTest
 cwd = os.getcwd()
 try:
  os.chdir(train_example_path)
  train_yaml_path = os.path.join(train_example_path, 'cifar_grbm_smd.yaml')
  train_object = load_train_file(train_yaml_path)
  train_object.algorithm.termination_criterion.prop_decrease = 0.5
  train_object.algorithm.termination_criterion.N = 1
  train_object.main_loop()
 finally:
  os.chdir(cwd)

@ no_debug_mode def test_train_example ( ) : assert ( config . mode != 'DEBUG_MODE' ) path = pylearn2 . __path__ [ 0 ] train_example_path = os . path . join ( path , 'scripts' , 'tutorials' , 'grbm_smd' ) if ( not os . path . isfile ( os . path . join ( train_example_path , 'cifar10_preprocessed_train.pkl' ) ) ) : raise SkipTest cwd = os . getcwd ( ) try : os . chdir ( train_example_path ) train_yaml_path = os . path . join ( train_example_path , 'cifar_grbm_smd.yaml' ) train_object = load_train_file ( train_yaml_path ) train_object . algorithm . termination_criterion . prop_decrease = 0.5 train_object . algorithm . termination_criterion . N = 1 train_object . main_loop ( ) finally : os . chdir ( cwd )
tests that the grbm_smd example script runs correctly .