本文整理汇总了C++中NeuralNetwork::construct_multilayer_perceptron方法的典型用法代码示例。如果您正苦于以下问题:C++ NeuralNetwork::construct_multilayer_perceptron方法的具体用法?C++ NeuralNetwork::construct_multilayer_perceptron怎么用?C++ NeuralNetwork::construct_multilayer_perceptron使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeuralNetwork
的用法示例。
在下文中一共展示了NeuralNetwork::construct_multilayer_perceptron方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_calculate_generalization_performance
void SumSquaredErrorTest::test_calculate_generalization_performance(void) {
message += "test_calculate_generalization_performance\n";
NeuralNetwork nn;
DataSet ds;
SumSquaredError sse(&nn, &ds);
double generalization_objective;
// Test
nn.set();
nn.construct_multilayer_perceptron();
ds.set();
generalization_objective = sse.calculate_generalization_performance();
assert_true(generalization_objective == 0.0, LOG);
}
示例2: test_calculate_selection_loss
void SumSquaredErrorTest::test_calculate_selection_loss(void)
{
message += "test_calculate_selection_loss\n";
NeuralNetwork nn;
DataSet ds;
SumSquaredError sse(&nn, &ds);
double selection_objective;
// Test
nn.set();
nn.construct_multilayer_perceptron();
ds.set();
selection_objective = sse.calculate_selection_error();
assert_true(selection_objective == 0.0, LOG);
}