Download CuPit-2 | A Parallel Language for Neural Algorithms: Language
Transcript
34 6 TUTORIAL example connection elimination procedure[32] example connection merge procedure[25] END TYPE; g This macro is invoked in denition 40. In the node type denition the modify procedure and the consN element to store an accumulated number of connections (computed after connection elimination) is inserted, the rest remains unchanged: 38 example node type denition with merge and modify[38] f TYPE SigmoidNode IS NODE Real outData; Real teach; IN Weight in; OUT Weight out; Real bias := Real delta := Real olddelta := Real eta := Real error := Real cumErr := Int errN := Int consN; (* activation (input units: net input) *) (* teachinput (output units only) *) 0.0; (* bias of this unit *) 0.0; (* delta for bias *) 0.0; (* olddelta for bias *) initialEta; (* eta for bias *) 0.0; (* error of this unit *) 0.0; (* cumulated error (output units only) *) 0; (* number of error bits (output units only) *) (* number of input connections *) example forward pass node operation[7] example backward pass node operation[9] example node adapt procedure[11] example resetErrors procedure[22] example node connection elimination procedure[33] example node merge procedure[26] END TYPE; g This macro is invoked in denition 40. is used to hold the number of connections attached to the input interface of the node when connection elimination is carried out. In the network type denition the modify and the countConnections procedure are inserted: consN 39 example network type denition with modify[39] f TYPE Mlp IS NETWORK Layer inLayer, hidLayer, outLayer; Real totError; Int errorsN; Int consN; example create network[5] example processing one example[13] example network adapt procedure[12] example train epoch procedure in parallel context[27] example compute total error procedure[21] example network count connections procedure[35] example network modify procedure[34] END TYPE; g