Simple Swift implementation of Neural Network. Any size of network can be created.
Creates small neural network with four input nodes and two output nodes and two hidden layers with 7 and 5 nodes:
let nn = NeuralNetwork(layers: [4, 7, 5, 2], bias: 0.75, eta: 0.5)
Teaches network with input and expected output
nn.teach(input: data.input, expectedOutput: data.output)
Evaluates some input
nn.eval(input: [0.8, 0.75, 0.1, 0.01])
- make it work on multiple threads and cores