def test_one_round_forward_backward_weight_update(self): """ to see if can correctly run one round of "forward", "backward" and "weight update" """ training_dataset = DataSet(os.path.join(combivep_settings.COMBIVEP_CENTRAL_TEST_DATASET_DIR, 'dummy_training_dataset')) mlp = Mlp(training_dataset.n_features, seed=20) mlp.forward_propagation(training_dataset) mlp.backward_propagation(training_dataset) weights1, weights2 = mlp.weight_update(training_dataset) self.assertEqual(round(weights1[0][0], 4), 0.0059, msg='one round of forward propagation, backward propagation and weight update, does not functional properly')
def test_one_round_forward_backward_weight_update(self): """ to see if can correctly run one round of "forward", "backward" and "weight update" """ training_data = DataSet(os.path.join(cbv_const.CBV_SAMPLE_DATASET_DIR, 'dummy_training_dataset')) mlp = Mlp(training_data.n_features, seed=20) mlp.forward_propagation(training_data) mlp.backward_propagation(training_data) weights1, weights2 = mlp.weight_update(training_data) self.assertEqual(round(weights1[0][0], 4), 0.0059, msg='one round of forward propagation, backward propagation and weight update, does not function properly')