ICECommander has asked for the wisdom of the Perl Monks concerning the following question:
I then try to throw it in the module and train it:use strict; use warnings; use AI::NeuralNet::Kohonen; push @inputs, [41 scalar entries go here]; # the above statement is actually in a loop my $input_ref = \@inputs;
Then I get the following error:our $som = AI::NeuralNet::Kohonen->new( map_dim_x => $map_dim_x, # 39 map_dim_y => $map_dim_y, # 19 epochs => $epochs, # 100 input => $input_ref ); $som->train();
I don't think that the weight_dim not being set has anything to do with it. I have tried other possibilities like passing @$input_ref, but that doesn't solve it. What am I doing wrong?{weight_dim} not set at /home/gotszlin/perl/lib/perl5/site_perl/5.8.5/ +/AI/NeuralNet/Kohonen.pm line 209 AI::NeuralNet::Kohonen::new('AI::NeuralNet::Kohonen', 'map_dim_x', 39, + 'map_dim_y', 19, 'epochs', 10, 'input', 'ARRAY(0x926af84)', ...) cal +led at system_net.pl line 50 NSTAD_net::som_train(39, 19, 10, 'ARRAY(0x926af84)', 'my_first_som +.txt') called at system_main.pl line 35 Can't call method "train" on an undefined value at system_net.pl line +56.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't call method on undefined value
by jbert (Priest) on Jun 28, 2007 at 19:19 UTC | |
|
Re: Can't call method on undefined value
by Codon (Friar) on Jun 28, 2007 at 19:05 UTC | |
|
Re: Can't call method on undefined value
by jZed (Prior) on Jun 28, 2007 at 19:06 UTC | |
|
Re: Can't call method on undefined value
by ICECommander (Initiate) on Jun 28, 2007 at 19:18 UTC |