Ask a Question related to PERL Modules, Design and Development.
-
GhanaWay #1
AI::NNFLex , sum net - why doen't read correct @input set ?
Hi ,
here below is a frame of my code where @tit is array of
[0]: 1;1;2
[1]: 1;2;3
[2]: 2;2;4
[3]: 3;3;6
[4]: 4;1;5
[5]: 2;3;5
[6]: 5;1;6
acquired from external file, and @vect is a variable array, where I might
decide how may hidden layed adopt; it have anyway a structure like
(#input,.. ,#hidden ,..,#output).
My problem is that routine seems to works and converge, but it wont adopt
the propper input and output path (instructing with right weit), because I
make a test trying to sum different set of numbers, the net result almost
the same output for each of them... Where am I wrong on the code ?
I've tryed also to insert the leatning path into the code (like
[[1,1],[2],[1,2],[3],[...] ) but I got the same result than before...
Thanks
Simon
..........
foreach (@tit){
chomp $_;
@path = split/;/,$_;
for($i =0 ; $i < @path ; $i++){
$input .= $path[$i].',' if $choose[$i] eq 'i';
$output.= $path[$i].',' if $choose[$i] eq 'o';
}
chop $input;
chop $output;
@input = split/,/,$input;
@output = split/,/,$output;
$ri[$j] = [@input];
$ro[$j] = [@output];
push (@data,$ri[$j],$ro[$j]);
$j++;
$input = $output ='';
}
print
"\n\n$n_strati_nascosti\n@n_strati\n$fatt_conv\n$e rrore\n$iteraz\n@ipar\n$ti
tolo\n";
$dataset = AI::NNFlex::Dataset->new(\@data);
$network = AI::NNFlex::Backprop->new(
learningrate=>$fatt_conv/100,momentum=>.1,bias=>.01,fahlmanconstant=>.05);
$i = 0;
foreach ( @{$data}){print "---$_\n";}
for($i = 0 ; $i < @vect ; $i++){
if($i < @vect-1){
$check = $network->add_layer(
nodes=>$vect[$i],activationfunction=>"sigmoid");
$e=$E;
}else{
$check = $network->add_layer(
nodes=>$vect[$i],activationfunction=>"linear");
$e=$E;
}
}
$network->init();
#$network->connect(fromlayer=>2,tolayer=>2);
my $counter=0;
my $err = 10;
while ($err >$errore/1){
$err = $dataset->learn($network);
print "Epoch $counter: Error = $err\n";
foreach ( @{$network->output}){print "Epoch $counter: Error = $err\tOut
TMP:$_\tll$output\n";}
last if($counter > $iteraz);
$counter++;
}
GhanaWay Guest
-
How to read input from a textfield in a datagrid !?!
Hello, I'm working with a datagrid control in ASP.NET. The datagrid shows a list of products. One column shows the productnumber, one column... -
How to read value from file into flash entryfield and later save user input ?
I would appreciate if someone could give me a flash sample where a flash movie reads a sample text value from a file on the origin server, then wait... -
Problem witch read input string_____
I have php4 on system FreeBSD.I did think that php work very well (function phpinfo() work), if I didn't probe above script: <?... -
#9802 [Com]: header() doen't work together with setcookie()
ID: 9802 Comment by: tomasz at biznespolska dot pl Reported By: fabio dot ottolini at uol dot com dot br Status: ... -
"Input string was not in a correct format"
I have two web pages, one is viewlarger.aspx, another one is shoppingcart.aspx. On the viewlarger.aspx, when clicking "add to cart" image button, ...



Reply With Quote

