Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Dann outputActivation

Matias Vazquez-Levi edited this page Feb 1, 2021 · 5 revisions

Back to Dann

outputActivation( activation );

Sets the activation function of the output

  • activation

    Takes a string of the activation function's name. If this function is not called, the activation function will be set to 'sigmoid' by default. See available activation functions Here.

Example

const nn = new Dann(4,2);
nn.addHiddenLayer(8,'sigmoid');
nn.makeWeights();

console.log('Before changing the output activation');
nn.log({struct:true})

nn.outputActivation('tanH');

console.log('After changing the output activation');
nn.log({struct:true})