From: Ger H. <ge...@ho...> - 2009-02-23 19:48:17
|
On Mon, Feb 23, 2009 at 8:01 PM, Bill Yerazunis <ws...@me...> wrote: > I don't suppoose you could also reveal the pre-fixed code > and line numbers, could you, with +/- line prefixes? > > - Bill Sure, here's the hacked diff file with GerH (anyway, it's just the same as grabbing a line from those snippets and / or Ctrl-F finding them in the source: it's safe as those bits only occur at one spot in the source file (no [semi-]duplicates in other sections). @@ -637,17 +1022,18 @@ // // Again, we sacrifice neuron 0 of the hidden layer to be the // bias weights. - - nn->output_layer[0] = *arefWout (nn, 0, 0); - nn->output_layer[0] = *arefWout (nn, 1, 0); + nn->output_layer[0] = nn->Wout[0]; // *arefWout(nn, 0, 0); + nn->output_layer[1] = nn->Wout[(1 * nn->hidden_layer_size) + 0]; // *arefWout(nn, 1, 0); [i_a] bug It's the second [0] anyway. plus: @@ -1523,20 +2270,26 @@ // Calculate the SUM "in place" (the error mag term) for (neuron = 0; neuron < nn->first_layer_size; neuron++) + { for (channel = 0; channel < nn->hidden_layer_size; channel++) + { nn->delta_first_layer[neuron] += - nn->delta_hidden_layer[neuron] - * (*arefWhid(nn, channel, neuron)); + nn->delta_hidden_layer[channel] // [i_a] bug + * nn->Whid[channel * nn->first_layer_size + neuron]; + // (*arefWhid(nn, channel, neuron)); + } + } -- Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: ge...@ho... mobile: +31-6-11 120 978 -------------------------------------------------- |