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

Infinity/NaN output #130

Open
dan-ryan opened this issue Mar 29, 2018 · 0 comments
Open

Infinity/NaN output #130

dan-ryan opened this issue Mar 29, 2018 · 0 comments

Comments

@dan-ryan
Copy link

dan-ryan commented Mar 29, 2018

I'm getting Infinity/NaN outputs while training. I'm using Nodejs 9.9.0 with strict mode on.

My settings:

    Methods.mutation.MOD_ACTIVATION.mutateOutput = false;
    Methods.mutation.MOD_ACTIVATION.allowed = [
        Methods.activation.LOGISTIC,
        Methods.activation.TANH,
        Methods.activation.STEP,
        Methods.activation.SOFTSIGN,
        Methods.activation.SINUSOID,
        Methods.activation.GAUSSIAN,
        Methods.activation.BIPOLAR,
        Methods.activation.BIPOLAR_SIGMOID,
        Methods.activation.HARD_TANH,
        Methods.activation.INVERSE,

        Methods.activation.SELU,
        Methods.activation.RELU,

        Methods.activation.BENT_IDENTITY,
        Methods.activation.IDENTITY,
        //Methods.activation.ABSOLUTE
    ];

    neat = new Neat(4, 1, null,
        {
            mutation: Methods.mutation.ALL,
            popsize: 100,
            mutationRate: 0.2,
            elitism: 10,
            //clear: true, 
            equal: true,
            network: new Architect.Random(4, 5, 1),
            provenance: 2,
            maxNodes: 7, 
            maxConns: 10,
            maxGates: 5,
        }
    );

Infinity Example:

The normalised data:
[0.9354838709677419, 0.5, 0.5933786078098472, 0.5880669161907702]

The genome:

{"nodes":[{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":0},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":1},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":2},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":3},{"bias":1.1508084667830487,"type":"output","squash":"SELU","mask":1,"index":4}],"connections":[{"weight":1,"from":4,"to":4,"gater":4},{"weight":-0.05001360658035439,"from":3,"to":4,"gater":null},{"weight":0.9984137443904727,"from":2,"to":4,"gater":null},{"weight":-0.7832753538521565,"from":1,"to":4,"gater":null},{"weight":-0.9040067054346645,"from":0,"to":4,"gater":4}],"input":4,"output":1,"dropout":0}

NaN Example:

The normalised data:
[0.3870967741935484, 0.75, 0.5040295048190726, 0.5575469079452833]

The genome:

{"nodes":[{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":0},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":1},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":2},{"bias":0,"type":"input","squash":"LOGISTIC","mask":1,"index":3},{"bias":-0.0717463180924848,"type":"hidden","squash":"BENT_IDENTITY","mask":1,"index":4},{"bias":-0.02994106373052867,"type":"output","squash":"LOGISTIC","mask":1,"index":5}],"connections":[{"weight":1,"from":4,"to":4,"gater":null},{"weight":1,"from":5,"to":5,"gater":null},{"weight":-0.048341462482942354,"from":4,"to":5,"gater":null},{"weight":-0.4890970041600281,"from":3,"to":5,"gater":5},{"weight":0.9984137443904727,"from":2,"to":5,"gater":5},{"weight":-0.4890970041600281,"from":3,"to":4,"gater":4},{"weight":0.024574079733371557,"from":1,"to":5,"gater":null},{"weight":0.9984137443904727,"from":2,"to":4,"gater":4},{"weight":-0.9040067054346645,"from":0,"to":5,"gater":5},{"weight":0.049181674792330154,"from":1,"to":4,"gater":null},{"weight":0.04742932010695605,"from":0,"to":4,"gater":null}],"input":4,"output":1,"dropout":0}
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

1 participant