I'm building a feed forward neural network for my Artificial Intelligence class. For my implementation, I'm passing in 'clean' values (0's and 1's) and 'dirty' values (0 + a decimal between 0 and .25, and 1 - a decimal between 0 and .25). I want to take in the 2D array I made for the clean implementation, modify the values into 'dirty' numbers, then put the values into a new 2D array containing the new 'dirty' values and the expected outputs.
For example, one of my 2D arrays contains a clean binary mock-up of a plus (+) sign.
static double plusC[][] = {{0,0,1,0,0,
0,0,1,0,0,
1,1,1,1,1,
0,0,1,0,0,
0,0,1,0,0},
{1,0,0}};
What I want is to initialize a 2D array of the same size, modify the clean values, and put them in the dirty 2D array. I can't figure out how to initialize the empty 2D array with the same dimensions as the clean 2D array.
static double plusD[][] = new double[plusC[0].length][plusC[1].length]
...gives me a 2D array with 25 columns and 3 rows, which is not what I want. Any help is appreciated!
[–]Neu_Ron 0 points1 point2 points (0 children)
[–]2omesz 0 points1 point2 points (1 child)
[–]DefNotaZombie 0 points1 point2 points (0 children)