11-27-2009 09:49 AM
I have a 2D array, c[j,i], and I want to perform calculations on each element in that array, c[j,i]=c[j,i]+d*a[i], then update that same array with the new values. I have setup the structure using a for loop and I successfully return each new c[j,i] that I am supposed to, but I cannot seem to input those new values into the array. I have tried using the "Replace Array Subset" node but I cannot seem to connect the output array to the same c[j,i] array.
Any help is greatly appreciated!
Solved! Go to Solution.
11-27-2009 09:53 AM
11-27-2009 10:42 AM - edited 11-27-2009 10:46 AM
Looking at the for loop where N=3: I need that y value that is connected to the shift register to get updated to the c1[j,i] array (using the index from the loop iterations), I cannot connect the second shift register to the array though.
edit: fixed image
11-27-2009 10:48 AM
11-27-2009 10:55 AM
Hi cmersits,
you can attach pictures directly to the forum - no need for 3rd parties!
Well, it seems you missed the concept of dataflow, shift registers and polymorphism:
There are free online courses at NI's website available!
11-27-2009 11:26 AM
11-27-2009 11:32 AM
Hi cmersit,
why do you need that? You did not say so before...
Well, create a local for c[j,i], move it into the for loop and connect it with the output of ReplaceArraySubset. It will hurt memory needs and processing speed and doesn't serve any purpose here. Replace result[] with a local of c[j,i] for this very example. Otherwise use a shift register in the outer loop!
11-27-2009 11:59 AM
The reason I need to do that is because I am using sequential batch training to train a neural network. The c[j,i] values are being updated each iteration based upon the sample 'training' data, then once every iteration is complete the 'weights' are updated (initially starting with random weights) and the overall error function is computed. I basically keep doing that until the overall error function decreases (epoch after epoch), and I get desired weights that will give me the proper outputs when I give the network inputs.
I will try the local and let you know how that goes.
Thanks for all your help!
11-27-2009 12:12 PM