Embedded AI

For general Flowcode discussion that does not belong in the other sections.
mnfisher
Valued Contributor
Posts: 2174
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 177 times
Been thanked: 1016 times

Re: Embedded AI

Post by mnfisher »

The type of 'w' looks to be incorrect.

It would need to be a 2 dimensional array of floats for the code to compile.

Code: Select all

Float w[10][10]
for example.

I would guess it is just an array and you are attempting to pass a single element to calculate.

Code: Select all

Float w[10]   - w[i] 
is a float not an array. (An oddity in the forum code -

Code: Select all

w[i]
displayed as just 'w' if not on a code block) - if this is the case the parameter would need to be w.

Please attach your code demonstrating errors like this (full editor attachments or drag and drop to the full editor window) as we can only guess what is happening without seeing the full code.

Martin

Martin

Steve-Matrix
Matrix Staff
Posts: 2028
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 301 times
Been thanked: 469 times

Re: Embedded AI

Post by Steve-Matrix »

If w[] is a one-dimensional array, just pass "w" as the parameter.

17712885438
Posts: 42
Joined: Thu Nov 02, 2023 8:11 am
Been thanked: 3 times

Re: Embedded AI

Post by 17712885438 »

Why is there no output for this example z?
neuron1.fcfx
(16.05 KiB) Downloaded 178 times
(view online)

BenR
Matrix Staff
Posts: 2292
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 634 times
Been thanked: 840 times

Re: Embedded AI

Post by BenR »

Hello,

How's this? I've tweaked your file slightly and it seems to be working now.
neuron1.fcfx
(17.13 KiB) Downloaded 199 times
(view online)

17712885438
Posts: 42
Joined: Thu Nov 02, 2023 8:11 am
Been thanked: 3 times

Re: Embedded AI

Post by 17712885438 »

The problem has been solved. Thank you!

17712885438
Posts: 42
Joined: Thu Nov 02, 2023 8:11 am
Been thanked: 3 times

Re: Embedded AI

Post by 17712885438 »

Could we add a macro command for calculating the loss? This will further enhance the functionality of the neural network components. Thank you.

BenR
Matrix Staff
Posts: 2292
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 634 times
Been thanked: 840 times

Re: Embedded AI

Post by BenR »

Hello,

Yes that's been added for you now. The latest version of the component is available from the Help -> Library updates menu now.

17712885438
Posts: 42
Joined: Thu Nov 02, 2023 8:11 am
Been thanked: 3 times

Re: Embedded AI

Post by 17712885438 »

Neuron.fcpx
(4.21 KiB) Downloaded 11 times
.Could it add an option for the softmax activation function? thank you.

BenR
Matrix Staff
Posts: 2292
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 634 times
Been thanked: 840 times

Re: Embedded AI

Post by BenR »

I'll have a look, thanks for the suggestion.

As per your other AI related request we're discussing options tomorrow.

Post Reply