‎06-12-2020 11:17 AM - edited ‎06-12-2020 11:27 AM
Hi,
I am working on radial bases neural network in Labview. I've generated bias and weights in Matlab. I have a problem with implementing euclidean distance function beetwen two matrixes - input vector and first layer weights. There is something wrong with indexing. Output value doesnt change when I am changing inputs. Maybe someone knows what should I change in selected part. Weights matrix is 131x7 and input matrix is 7x1. Output matrix should be 131x1.
Solved! Go to Solution.
‎06-12-2020 12:12 PM - edited ‎06-12-2020 12:29 PM
It is pointless to show an image with messy hidden wires and no way to tell what's in e.g. the array diagram constants. (e.g. How big is the array where we only see the "2". Maybe you want to replace that with a scalar constant instead?). I see a lot over overly complicated and unnecessary code that could be dramatically simplified. Many of your FOR loops are not needed. Maybe the "Nx1" 2D arrays should be 1D arrays instead.
Attach your actual VI, making sure that all controls have typical default data (and include the input files), then tell us the result you would expect.
‎06-12-2020 11:14 PM - edited ‎06-12-2020 11:16 PM
Things like constants its not a problem I can replace it or not it doesnt change anything. Without thoose for loops vector is smaller than it should be. I dont see any hidden wires and I wrote everything about size.
‎06-13-2020 12:49 AM
If you want help, you need to help us first. Nobody will try to recreate, debug, and test your code from a picture. Too much work and too ambiguous. Your wires go all over the place and there is no way to tell which input is connected to the top or bottom of the division because these wires are hidden behind it (as I already said).
If you really want help, attach the VI. Simple as that!
@Kamila_Jankowska wrote:
Without thoose for loops vector is smaller than it should be.
You have at least 10 indicators and none is label "vector" Don't let us guess!. If "it" is smaller without the loops, why don't you show the code without the loops. Does that mean with the loops shown the size is correct???
‎06-13-2020 01:13 AM
I need help with selected fragment. I dont want you to analyze all code and I said that. I have to calculete euclidean distans from every row of matrix 131x7 (w1) to intput vector 7x1 in this fragment.
‎06-13-2020 01:33 AM
Then attach a VI with the selected fragment!
Also make sure to define which of the dimension is # of rows and which is # of columns to avoid confusion.
‎06-13-2020 01:47 AM - edited ‎06-13-2020 01:48 AM
‎06-13-2020 01:51 AM
I cant disable indexing in here.
‎06-13-2020 02:00 AM
‎06-13-2020 02:01 AM - edited ‎06-13-2020 02:03 AM
@Kamila_Jankowska wrote:
I cant disable indexing in here.
Of course you can and you already did!!! Since the array from the top is either 1 row or one column, get the correct 1D array using "index array" before the loop and don't index it at the loop boundary.
Autoindex on the matrix to get one row of 7 elements per iterations. Currently you don't.
You really should go back to the basic tutorials!