Skip to content

Instantly share code, notes, and snippets.

@Etothepowerof26
Etothepowerof26 / NeuralNetwork.lua
Last active December 13, 2018 16:37 — forked from cassiozen/NeuralNetwork.lua
Lua Neural Network
ACTIVATION_RESPONSE = 1
NeuralNetwork = {
transfer = function(x) return 1 / (1 + math.exp(-x / ACTIVATION_RESPONSE)) end --This is the Transfer function (in this case a sigmoid)
}
function NeuralNetwork.create(inputs, outputs, hiddenlayers, neurons, learningrate)
inputs = inputs or 1
outputs = outputs or 1