New to coding and forum, hoping to get assistance in getting up & running with an artificial neural network code using arrays & for loops. General practice code I am writing just now to carry out a forward pass on a 4 pixel image, 1 per input of network, 4 hidden nodes & 2 outputs.
I have come up with the code below but getting random error numbers/code returned. Can't seem to see where I am going wrong & keep coming up short of the solution. Any help would be greatly appreciated, thanks.
"in" is a 1x4 array which means the first index can only be 0, but you index it with 1, which accesses outside the array, picking up arbitrary values. But it should probably just be a 1D array in the first place.
Unless you have a special reason to use float it's more normal to use double.
And count1, count2 are stupid names! i and j are better, IMAO. :-)
Also, remember to use [code][/code] tags in the future (as I've done below).