view release on metacpan or search on metacpan
Revision History for ANN
0.008 2011-06-13 06:52:38 UTC
Add support for an Inline::C version of AI::ANN::Neuron::Execute.
This is the default.
Fix a few extra errors because of uninitialized values being sent to
the C code. If you're using the inline::c stuff, be careful that
you don't skip any necessary inputs.
0.007 2011-06-12 04:44:46 UTC
Add backprop, not tested.
Evolver now allows you to pass a coderef for mutation_amount. It
will be evaluated with no arguments. If you pass a number instead,
it will be coerced into a uniform random value up to +/- your value.
_Inline/build/AI/ANN/Neuron_6185/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap Neuron_6185.xs > Neuron_6185.xsc && mv Neuron_6185.xsc Neuron_6185.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/t -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC...
Neuron_6185.xs: In function â_execute_internalsâ:
Neuron_6185.xs:21: error: redefinition of âv1â
Neuron_6185.xs:9: note: previous definition of âv1â was here
Neuron_6185.xs:22: error: redefinition of âv2â
Neuron_6185.xs:10: note: previous definition of âv2â was here
make: *** [Neuron_6185.o] Error 1
examples/_Inline/build/benchmark_pl_03a5/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_03a5.xs > benchmark_pl_03a5.xsc && mv benchmark_pl_03a5.xsc benchmark_pl_03a5.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_03a5.xs: In function âgenerate_globalsâ:
benchmark_pl_03a5.xs:11: error: array subscript is not an integer
benchmark_pl_03a5.xs:12: error: array subscript is not an integer
benchmark_pl_03a5.xs:12: error: invalid type argument of âunary *â (have âintâ)
make: *** [benchmark_pl_03a5.o] Error 1
examples/_Inline/build/benchmark_pl_3d06/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_3d06.xs > benchmark_pl_3d06.xsc && mv benchmark_pl_3d06.xsc benchmark_pl_3d06.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_3d06.xs: In function âgenerate_globalsâ:
benchmark_pl_3d06.xs:12: error: invalid type argument of âunary *â (have âintâ)
make: *** [benchmark_pl_3d06.o] Error 1
examples/_Inline/build/benchmark_pl_6dc1/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_6dc1.xs > benchmark_pl_6dc1.xsc && mv benchmark_pl_6dc1.xsc benchmark_pl_6dc1.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_6dc1.xs: In function âgenerate_globalsâ:
benchmark_pl_6dc1.xs:12: error: invalid type argument of âunary *â (have âintâ)
benchmark_pl_6dc1.xs: In function âafunc_câ:
benchmark_pl_6dc1.xs:16: error: expected expression before âintâ
benchmark_pl_6dc1.xs: In function âdafunc_câ:
benchmark_pl_6dc1.xs:19: error: expected expression before âintâ
make: *** [benchmark_pl_6dc1.o] Error 1
examples/_Inline/build/benchmark_pl_ac1b/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_ac1b.xs > benchmark_pl_ac1b.xsc && mv benchmark_pl_ac1b.xsc benchmark_pl_ac1b.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_ac1b.xs: In function âgenerate_globalsâ:
benchmark_pl_ac1b.xs:12: error: invalid type argument of âunary *â (have âintâ)
make: *** [benchmark_pl_ac1b.o] Error 1
examples/_Inline/build/benchmark_pl_b832/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_b832.xs > benchmark_pl_b832.xsc && mv benchmark_pl_b832.xsc benchmark_pl_b832.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_b832.xs:5: fatal error: libm/math.h: No such file or directory
compilation terminated.
make: *** [benchmark_pl_b832.o] Error 1
examples/_Inline/build/benchmark_pl_b905/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_b905.xs > benchmark_pl_b905.xsc && mv benchmark_pl_b905.xsc benchmark_pl_b905.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_b905.xs: In function âgenerate_globalsâ:
benchmark_pl_b905.xs:12: error: invalid type argument of âunary *â (have âintâ)
benchmark_pl_b905.xs: In function âafunc_câ:
benchmark_pl_b905.xs:16: error: array subscript is not an integer
benchmark_pl_b905.xs: In function âdafunc_câ:
benchmark_pl_b905.xs:19: error: array subscript is not an integer
make: *** [benchmark_pl_b905.o] Error 1
examples/_Inline/build/benchmark_pl_c51b/out.make view on Meta::CPAN
/usr/bin/perl /usr/local/share/perl/5.10.1/ExtUtils/xsubpp -typemap /usr/share/perl/5.10/ExtUtils/typemap benchmark_pl_c51b.xs > benchmark_pl_c51b.xsc && mv benchmark_pl_c51b.xsc benchmark_pl_c51b.c
cc -c -I/home/st47/sit-bmelab-labview/EANN/ANN/examples -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\...
benchmark_pl_c51b.xs: In function âgenerate_globalsâ:
benchmark_pl_c51b.xs:12: error: invalid type argument of âunary *â (have âintâ)
benchmark_pl_c51b.xs: In function âafunc_câ:
benchmark_pl_c51b.xs:16: error: expected expression before âintâ
benchmark_pl_c51b.xs: In function âdafunc_câ:
benchmark_pl_c51b.xs:19: error: expected expression before âintâ
make: *** [benchmark_pl_c51b.o] Error 1
lib/AI/ANN.pm view on Meta::CPAN
$net->[$i]->{'done'} = 1;
$progress++;
}
}
} while ($progress); # If the network is feed-forward, we are now finished.
my @notdone = grep {not (defined $net->[$_]->{'done'} &&
$net->[$_]->{'done'} == 1)} 0..$lastneuron;
my @neuronstemp = ();
if ($#notdone > 0) { #This is the part where we deal with loops and bad things
my $maxerror = 0;
my $loopcounter = 1;
while (1) {
foreach my $i (@notdone) { # Only bother iterating over the
# ones we couldn't solve exactly
# We don't care if it's ready now, we're just going to interate
# until it stabilizes.
if (not defined $neurons[$i] && $i <= $lastneuron) {
# Fixes warnings about uninitialized values, but we make
# sure $i is valid first.
$neurons[$i] = 0;
}
my $potential = $net->[$i]->{'object'}->execute($inputs, \@neurons);
$self->{'rawpotentials'}->[$i] = $potential;
$potential = &{$self->{'afunc'}}($potential);
$potential = $self->{'maxvalue'} if $potential > $self->{'maxvalue'};
$potential = $self->{'minvalue'} if $potential < $self->{'minvalue'};
$neuronstemp[$i] = $net->[$i]->{'state'} = $potential;
# We want to know the absolute change
if (abs($neurons[$i]-$neuronstemp[$i])>$maxerror) {
$maxerror = abs($neurons[$i]-$neuronstemp[$i]);
}
}
foreach my $i (0..$lastneuron) {
# Update $neurons, since that is what gets passed to execute
$neurons[$i] = $neuronstemp[$i];
}
if (($maxerror < 0.0001 && $loopcounter >= 5) || $loopcounter > 250) {last}
$loopcounter++;
$maxerror=0;
}
}
# Ok, hopefully all the neurons have happy values by now.
# Get the output values for neurons corresponding to outputneurons
my @output = map {$neurons[$_]} @{$self->{'outputneurons'}};
return \@output;
}