stoneharry

Untitled

Nov 4th, 2013
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. void MultiLayerNetwork::SetTheWeights (const double initWt[]) {
  2.     // load all weights in network using values in initWt
  3.     // initWt has the weights for this layer, followed by those for next
  4.  
  5.     // rest are weights for next layer
  6.             // first numWeights weights are for this layer
  7.             // copy these weights from intWt[0..] into Weights
  8.     SigmoidalLayerNetwork::SetTheWeights(initWt);  
  9.             // Weights starting at initWt[numWeights] are weights for next layer
  10.             // so SetTheWeights in the next layer passing the address of the first of these
  11.     nextlayer -> SetTheWeights(&initWt[numWeights]);
  12. }
  13.  
  14. int MultiLayerNetwork::HowManyWeights (void) {
  15.     // return the number of weights in network
  16.  
  17.     return 0;     /// change this
  18. }
Advertisement
Add Comment
Please, Sign In to add comment