summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tests/pic.cpp9
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}