Skip to content

Instantly share code, notes, and snippets.

@zeryx
Created February 4, 2014 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeryx/8813815 to your computer and use it in GitHub Desktop.
Save zeryx/8813815 to your computer and use it in GitHub Desktop.
for(int i=0;i<num_hidden;i++)
{
for(int j=0;j<innum;j++)
{
hidden_val[i]+= inputs[j][x].data*current[person_num][wt_ctr++].weight;
}
hidden_val[i]+= 1*current[person_num][wt_ctr++].weight;
hidden_val[i] = Activation_sig(hidden_val[i]);
assert(wt_ctr!=wtqty);
}
for(int i=0;i<num_hidden;i++)
{
output[x] += hidden_val[i]*current[person_num][wt_ctr++].weight;
assert(wt_ctr!=wtqty);
}
output[x] += 1*current[person_num][wt_ctr++].weight;
cout<<"output value: "<<output[x]<<endl;
output[x] = Activation_sig(output[x]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment