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

Lua-Fann ERROR: attempt to call field 'create_standard' (a nil value) #4

Open
Linsque opened this issue Aug 5, 2022 · 1 comment
Open

Comments

@Linsque
Copy link

Linsque commented Aug 5, 2022

Hey, I'm trying to run the example from the repository (https://github.com/msva/lua-fann/tree/master/test) but i'm having some issues.

Running module.lua i'm receiving the error attempt to call field 'create_standard' (a nil value).

I'm using Lua 5.1.5 and the most recent ZeroBrane. I downloaded the lua-fann module with LuaRocks 3.9.1 and, for install lua-fann, I installed fann library 2.2.0 from the developers website.

And even switch to another IDE wasn't a solution for me... seems that the module isn't loading right.

ixz25

StackOverflow: https://stackoverflow.com/questions/73169113/lua-fann-error-in-zerobrane-attempt-to-call-field-create-standard-a-nil-valu

@msva
Copy link
Owner

msva commented Nov 3, 2022

It seems, you have either installed lua-module (lua-fann) or libfan incorrectly. Or both.

I've just even tried with currenf FANN's git HEAD, and all works fine 🤷

$  lua module.lua
Max epochs   500000. Desired error: 0.0010000000.
Epochs            1. Current error: 0.3085455298. Bit fail 4.
Epochs           27. Current error: 0.0000248633. Bit fail 0.
MSE: 7.2449183790013e-05
Layer / Neuron 012345
L   1 / N    3 CCC...
L   1 / N    4 ddD...
L   1 / N    5 ......
L   2 / N    6 ...EDd
L   2 / N    7 ......
Input layer                          :   2 neurons, 1 bias
  Hidden layer                       :   2 neurons, 1 bias
Output layer                         :   1 neurons
Total neurons and biases             :   7
Total connections                    :   9
Connection rate                      :   1.000
Network type                         :   FANN_NETTYPE_LAYER
Training algorithm                   :   FANN_TRAIN_RPROP
Training error function              :   FANN_ERRORFUNC_TANH
Training stop function               :   FANN_STOPFUNC_BIT
Bit fail limit                       :   0.010
Learning rate                        :   0.700
Learning momentum                    :   0.000
Quickprop decay                      :  -0.000100
Quickprop mu                         :   1.750
RPROP increase factor                :   1.200
RPROP decrease factor                :   0.500
RPROP delta min                      :   0.000
RPROP delta max                      :  50.000
Cascade output change fraction       :   0.010000
Cascade candidate change fraction    :   0.010000
Cascade output stagnation epochs     :  12
Cascade candidate stagnation epochs  :  12
Cascade max output epochs            : 150
Cascade min output epochs            :  50
Cascade max candidate epochs         : 150
Cascade min candidate epochs         :  50
Cascade weight multiplier            :   0.400
Cascade candidate limit              :1000.000
Cascade activation functions[0]      :   FANN_SIGMOID
Cascade activation functions[1]      :   FANN_SIGMOID_SYMMETRIC
Cascade activation functions[2]      :   FANN_GAUSSIAN
Cascade activation functions[3]      :   FANN_GAUSSIAN_SYMMETRIC
Cascade activation functions[4]      :   FANN_ELLIOT
Cascade activation functions[5]      :   FANN_ELLIOT_SYMMETRIC
Cascade activation functions[6]      :   FANN_SIN_SYMMETRIC
Cascade activation functions[7]      :   FANN_COS_SYMMETRIC
Cascade activation functions[8]      :   FANN_SIN
Cascade activation functions[9]      :   FANN_COS
Cascade activation steepnesses[0]    :   0.250
Cascade activation steepnesses[1]    :   0.500
Cascade activation steepnesses[2]    :   0.750
Cascade activation steepnesses[3]    :   1.000
Cascade candidate groups             :   2
Cascade no. of candidates            :  80
Result: -0.96608966588974
Result: 0.99814438819885
Result: -0.9986754655838
Result: 0.99798047542572
Test data read: [[FANN training data]]
MSE on test data: 7.0389745815191e-05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants