diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2019-08-07 17:17:12 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2019-08-07 17:17:12 -0700 |
commit | dd66ddf4a5a05b970714dee7f39496937bfadf1e (patch) | |
tree | f8862c3a24d237ca1896c3939cd01fed74bfbbc1 /src | |
parent | 89d6ca2b2f560273e7aa0f0dec4b49cce3c94177 (diff) | |
download | libneural-main.tar.gz libneural-main.tar.bz2 libneural-main.tar.xz libneural-main.zip |
Diffstat (limited to '')
-rw-r--r-- | src/tests/pic.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tests/pic.cpp b/src/tests/pic.cpp index 32a7787..5ff353f 100644 --- a/src/tests/pic.cpp +++ b/src/tests/pic.cpp | |||
@@ -19,6 +19,7 @@ int main( int argc, char *argv[] ) | |||
19 | Bu::Random::setGenerator<Bu::RandomCmwc>(); | 19 | Bu::Random::setGenerator<Bu::RandomCmwc>(); |
20 | Bu::Random::seed( time( NULL ) ); | 20 | Bu::Random::seed( time( NULL ) ); |
21 | 21 | ||
22 | /* | ||
22 | Neural::Column<float> *c = new Neural::Column<float>(); | 23 | Neural::Column<float> *c = new Neural::Column<float>(); |
23 | Neural::Row<float> *r1 = new Neural::Row<float>(); | 24 | Neural::Row<float> *r1 = new Neural::Row<float>(); |
24 | r1->addNode( new Neural::Neuron<float>() ); | 25 | r1->addNode( new Neural::Neuron<float>() ); |
@@ -41,7 +42,13 @@ int main( int argc, char *argv[] ) | |||
41 | r3->addNode( new Neural::Neuron<float>() ); | 42 | r3->addNode( new Neural::Neuron<float>() ); |
42 | r3->addNode( new Neural::Neuron<float>() ); | 43 | r3->addNode( new Neural::Neuron<float>() ); |
43 | c->addNode( r3 ); | 44 | c->addNode( r3 ); |
45 | */ | ||
44 | 46 | ||
47 | Neural::Network<float> *pNet = Neural::Network<float>::fromStr( | ||
48 | "column(row(5),row(12),row(3))" | ||
49 | ); | ||
50 | |||
51 | Neural::Node<float> *c = pNet->getRoot(); | ||
45 | c->finalize( 2 ); | 52 | c->finalize( 2 ); |
46 | sio << "Total weights: " << c->getNumWeights() << sio.nl; | 53 | sio << "Total weights: " << c->getNumWeights() << sio.nl; |
47 | sio << "Total biases: " << c->getNumBiases() << sio.nl; | 54 | sio << "Total biases: " << c->getNumBiases() << sio.nl; |
@@ -141,7 +148,7 @@ int main( int argc, char *argv[] ) | |||
141 | png_destroy_write_struct( &png_ptr, &info_ptr ); | 148 | png_destroy_write_struct( &png_ptr, &info_ptr ); |
142 | fclose( fp ); | 149 | fclose( fp ); |
143 | 150 | ||
144 | delete c; | 151 | delete pNet; |
145 | 152 | ||
146 | return 0; | 153 | return 0; |
147 | } | 154 | } |