12.07.2015 Views

Neural Networks - Algorithms, Applications,and ... - Csbdu.in

Neural Networks - Algorithms, Applications,and ... - Csbdu.in

Neural Networks - Algorithms, Applications,and ... - Csbdu.in

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.3 ANS Simulation 311.3.2 Design Guidel<strong>in</strong>es for SimulatorsAs we beg<strong>in</strong> simulat<strong>in</strong>g neural networks, one of the first observations we willusually make is that it is necessary to design the simulation software such thatthe network can be sized dynamically. Even when we use only one of thenetwork models described <strong>in</strong> this text, the ability to specify the number of PEsneeded "on the fly," <strong>and</strong> <strong>in</strong> what organization, is paramount. The justification forthis observation is based on the idea that it is not desirable to have to reprogram<strong>and</strong> recompile an ANS application simply because you want to change thenetwork size. S<strong>in</strong>ce dynamic memory-allocation tools exist <strong>in</strong> most of thecurrent generation of programm<strong>in</strong>g languages, we will use them to implementthe network data structures.The next observation you will probably make when design<strong>in</strong>g your ownsimulator is that, at run time, the computer's central process<strong>in</strong>g unit (CPU) willspend most of its time <strong>in</strong> the computation of the net,, the <strong>in</strong>put-activation termdescribed earlier. To underst<strong>and</strong> why this is so, consider how a uniprocessorcomputer will simulate a neural network. A program will have to be written toallow the CPU to time multiplex between units <strong>in</strong> the network; that is, each unit<strong>in</strong> the ANS model will share the CPU for some period. As the computer visitseach node, it will perform the <strong>in</strong>put computation <strong>and</strong> output translation functionbefore mov<strong>in</strong>g on to the next unit. As we have already seen, the computation thatproduces the net, value at each unit is normally a sum-of-products calculation—avery tirne-consum<strong>in</strong>g operation if there is a large number of <strong>in</strong>puts at each node.Compound<strong>in</strong>g the problem, the sum-of-products calculation is done us<strong>in</strong>gfloat<strong>in</strong>g-po<strong>in</strong>t numbers, s<strong>in</strong>ce the network simulation is essentially a digital representationof analog signals. Thus, the CPU will have to perform two float<strong>in</strong>gpo<strong>in</strong>toperations (a multiply <strong>and</strong> an add) for every <strong>in</strong>put to each unit <strong>in</strong> thenetwork. Given the large number of nodes <strong>in</strong> some networks, each with potentiallyhundreds or thous<strong>and</strong>s of <strong>in</strong>puts, it is easy to see that the computermust be capable of perform<strong>in</strong>g several million float<strong>in</strong>g-po<strong>in</strong>t operations per second(MFLOPS) to simulate an ANS of moderate size <strong>in</strong> a reasonable amountof time. Even assum<strong>in</strong>g the computer has the float<strong>in</strong>g-po<strong>in</strong>t hardware neededto improve the performance of the simulator, we, as programmers, must optimizethe computer's ability to perform this computation by design<strong>in</strong>g our datastructures appropriately.We now offer a f<strong>in</strong>al guidel<strong>in</strong>e for those readers who will attempt to implementmany different network models us<strong>in</strong>g the data structures <strong>and</strong> process<strong>in</strong>gconcepts presented here. To a large extent, our simulator design philosophy isbased on networks that have a uniform <strong>in</strong>terconnection strategy; that is, units<strong>in</strong> one layer have all been fully connected to units <strong>in</strong> another layer. However,many of the networks we present <strong>in</strong> this text will rely on different <strong>in</strong>terconnectionschemes. Units may be only sparsely <strong>in</strong>terconnected, or may have connectionsto units outside of the next sequential layer. We must take these notions <strong>in</strong>toaccount as we def<strong>in</strong>e our data structures, or we may well end up with a uniqueset of data structures for each network we implement.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!