1 /* ///////////////////////////////////////////////////////////////////////
2 * File: perceptron_network_test.h
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_INTELLIGENCE_ANN_PERCEPTRON_NETWORK_TEST_H
13 #define EXTL_INTELLIGENCE_ANN_PERCEPTRON_NETWORK_TEST_H
15 /* ///////////////////////////////////////////////////////////////////////
18 EXTL_INTELLIGENCE_BEGIN_WHOLE_NAMESPACE
19 EXTL_TEST_NAME_BEGIN_NAMESPACE(perceptron_network_test
)
21 /* ///////////////////////////////////////////////////////////////////////
24 static int perceptron_network_test()
26 /* ///////////////////////////////////////////////////////////////////////
34 EXTL_TEST_TRACE(_T("perceptron_network_test: train and\n"));
35 typedef perceptron_network
<2, 1> and_perceptron_type
;
36 typedef and_perceptron_type::layers_type and_layers_type
;
37 and_perceptron_type
and_perceptron(10, 0.5);
38 EXTL_NS_TEST(and_tester
)<and_perceptron_type
> atr
;
39 atr
.test(and_perceptron
, 1000);
43 int perceptron_network_test_ret
= perceptron_network_test();
45 /* ///////////////////////////////////////////////////////////////////////
46 * ::unit_test namespace
48 EXTL_TEST_NAME_END_NAMESPACE(perceptron_network_test
)
49 EXTL_INTELLIGENCE_END_WHOLE_NAMESPACE
50 /* //////////////////////////////////////////////////////////////////// */
51 #endif /* EXTL_INTELLIGENCE_ANN_PERCEPTRON_NETWORK_TEST_H */
52 /* //////////////////////////////////////////////////////////////////// */