Skip to content

setTransferFunction in scripting causes nerd to freeze #28

@htoutounji

Description

@htoutounji

I am writing a script for a transfer function on nerd where I change the bias term according to some learning rule. I still want to use the hyperbolic tangent transfer function. Loading the following script is causing nerd to freeze:

var inSynapses;

function reset() {
net.setTransferFunction(neuron, "tanh");
inSynapses = net.getInSynapses(neuron);
}

function calc(activation) {
activation =
theta = net.getBias(neuron);

sumW = 0.0;
for (var i=0; i < inSynapses.length; ++i) {
sumW += net.getWeight(inSynapses[i]);
}

theta -= eta*(theta + sumW);
net.setBias(neuron,theta);

//nerd.error(getTransferFunctionName(206));

return activation;

}

loading the same script but with the statement "net.setTransferFunction(neuron, "tanh");" commented works. Uncommenting it after loading also causes freeze. Is it a bug or am I using the statement wrongly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions