Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share your artificial intelligence source code example with everyone #8

Open
joaopauloschuler opened this issue Oct 10, 2019 · 9 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@joaopauloschuler
Copy link
Owner

Have you got cool examples? Feel free to pull and share your example with everyone!!!

@joaopauloschuler joaopauloschuler added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 10, 2019
@joaopauloschuler joaopauloschuler changed the title Show your example! Add your example May 1, 2021
@maxkleiner
Copy link

Hi I
I just tested the supersimple.lpr and compared the results, after 3000 epochs each I got very different results, a few are in the expected range others made no sense for me:
XOR AND OR
3000 x 0 Output: 0.10 0.10 0.10
3000 x 1 Output: 0.80 0.10 0.80
3000 x 2 Output: 0.80 0.10 0.80
3000 x 3 Output: 0.10 0.80 0.80
others very different
3000 x 0 Output: 0.37 0.16 0.56
3000 x 1 Output: 0.77 0.10 0.82
3000 x 2 Output: 0.59 0.00 0.55
3000 x 3 Output: 0.11 0.72 0.57

@joaopauloschuler
Copy link
Owner Author

Hello @maxkleiner, your experiment is interesting and I'm glad that you did it.

If you assume that:
0.1 = False.
0.8 = True.
(0.1+0.8) = 0.45 = Threshold.
y < 0.45 = False.
y > 0.45 = True.

With above assumptions, you'll find that your "others very different" results are precise results in boolean terms.

This API implements Stochastic Gradient Descent. As the name implies, it's not deterministic. Most probably, if you increment the number of epochs, results will look more stable.

Please feel free to bring to my attention anything that you believe isn't correct or sufficient in this reply.

@maxkleiner
Copy link

Another Example is the //Application.Title:='CIFAR-10 SELU Classification Example';
It never gets better score than at the beginning, so the loss doesnt really change till epoch 50, what could be wrong(config at bottom)?:
epoch training accuracy training loss training error validation accuracy validation loss
1 0.0955 2.3005 1.7996 0.0977 2.3028
2 0.0924 2.3026 1.8 0.0977 2.3028
3 0.0919 2.3027 1.8 0.0977 2.3028
4 0.0981 2.3063 1.8007 0.098 2.3027

47 0.0938 2.3036 1.8002 0.0977
48 0.0997 2.3018 1.7998 0.0977
49 0.0903 2.303 1.8001 0.0977
50 0.0995 2.3036 1.8002 0.0977

NeuralFit:= TNeuralImageFit.Create;
NeuralFit.FileNameBase:= 'ImageClassifierSELU_Tutor89_5';
NeuralFit.InitialLearningRate:= 0.0004;
// SELU seems to work better with smaller learning rates.
NeuralFit.LearningRateDecay:= 0.03;
NeuralFit.StaircaseEpochs:= 10;
NeuralFit.Inertia:= 0.9;
NeuralFit.L2Decay:= 0.00001;
NeuralFit.verbose:= true;

@maxkleiner
Copy link

Hello @maxkleiner, your experiment is interesting and I'm glad that you did it.

If you assume that: 0.1 = False. 0.8 = True. (0.1+0.8) = 0.45 = Threshold. y < 0.45 = False. y > 0.45 = True.

With above assumptions, you'll find that your "others very different" results are precise results in boolean terms.

This API implements Stochastic Gradient Descent. As the name implies, it's not deterministic. Most probably, if you increment the number of epochs, results will look more stable.

Please feel free to bring to my attention anything that you believe isn't correct or sufficient in this reply.

Thanks for the answer, you know that Im experimenting with a script in maXbox, in comparison with FPC could be the answer, Il'l keep you posted, thanks for your great work!

@maxkleiner
Copy link

maxkleiner commented Nov 9, 2021 via email

@joaopauloschuler
Copy link
Owner Author

@maxkleiner, congrats for your 100th edition!

I'll test "Another Example is the //Application.Title:='CIFAR-10 SELU Classification Example';" in other environments than I usually test and let you know. I missed this bug report.

@joaopauloschuler
Copy link
Owner Author

From where should I start to test it with maXbox?

@maxkleiner
Copy link

maxkleiner commented Nov 16, 2021 via email

@maxkleiner
Copy link

maxkleiner commented Nov 19, 2021 via email

@joaopauloschuler joaopauloschuler changed the title Add your example Share your artificial intelligence source code example with everyone Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants