Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Hopfield Neural Network in perl6

by liz (Monsignor)
on Jun 30, 2018 at 07:45 UTC ( [id://1217647]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
            method BUILD($inputneuron, $outputneuron, $y1 = 1000000.rand) 
    +{
                    $.weight = $y1;
            }
    
  2. or download this
    loop (my $i = 0; $i < @.inputsynapses.length; $i++) {
        if (@.inputsynapses[$i].weight * @.inputsynapses[$i].outputneuron.
    +input >= 0) {
    ...
            @.inputsynapses[$i].outputneuron.input = 0;
        }   
    }
    
  3. or download this
    .outputneuron.input = +(.weight * .outputneuron.input >= 0)
      for @.inputsynapses;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1217647]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found