def test_demo_train_combivep_using_cbv_data(self):
     #init
     self.individual_debug = True
     self.init_test('demo_train_combivep_using_cbv_data')
     training_file = os.path.join(combivep_settings.COMBIVEP_CENTRAL_TEST_CBV_DIR, 'training.cbv')
     #run test
     combivep_app.train_combivep_using_cbv_data(training_file, random_seed=20, figure_dir=self.working_dir)
     self.assertTrue(combivep_settings.COMBIVEP_CONFIGURATION_FILE, msg='Trainer does not functional properly')
     figure_file  = os.path.join(self.working_dir, '%02d.eps' % int(combivep_settings.DEFAULT_HIDDEN_NODES))
     self.assertTrue(os.path.exists(figure_file), msg='Trainer does not functional properly')
    def test_train_combivep_using_cbv_data(self):
        #init
#        self.individual_debug = True
        self.init_test('train_combivep_using_cbv_data')
        test_file    = os.path.join(self.data_dir, 'test_train_combivep.cbv')
        params_file  = os.path.join(self.working_dir, 'params.npz')
        #run test
        train_combivep_using_cbv_data(test_file,
                                      random_seed=20,
                                      n_hidden_nodes=7,
                                      iterations=50,
                                      figure_dir=self.working_dir,
                                      params_out_file=params_file,
                                      config_file=combivep_settings.COMBIVEP_CENTRAL_TEST_CONFIGURATION_FILE)
        self.assertTrue(os.path.exists(params_file), msg='Trainer does not functional properly')
        figure_file  = os.path.join(self.working_dir, '07.eps')
        self.assertTrue(os.path.exists(figure_file), msg='Trainer does not functional properly')
Beispiel #3
0
 def test_train_combivep_using_cbv_data(self):
     #init
     self.init_test('train_combivep_using_cbv_data')
     test_file = os.path.join(self.data_dir,
                              'test_train_combivep.cbv')
     params_file = os.path.join(self.working_dir,
                                'params.npz')
     #run test
     train_combivep_using_cbv_data(test_file,
                                   random_seed=1,
                                   n_hidden_nodes=7,
                                   iterations=50,
                                   figure_dir=self.working_dir,
                                   params_out_file=params_file,
                                   cfg_file=cbv_const.CBV_SAMPLE_CFG_FILE)
     self.assertTrue(os.path.exists(params_file),
                     msg='Trainer does not functional properly')
     figure_file = os.path.join(self.working_dir,
                                '07.eps')
     self.assertTrue(os.path.exists(figure_file),
                     msg='Trainer does not functional properly')