Skip to content

Instantly share code, notes, and snippets.

@jknthn jknthn/nnGoal.swift Secret
Created Sep 25, 2017

Embed
What would you like to do?
let nn = DeepNeuralNetwork(iterations: 5000, learningRate: 0.003)
nn.add(layer: Layer.input(size: 4))
nn.add(layer: Layer.fullyConnected(size: 8, activation: .relu))
nn.add(layer: Layer.fullyConnected(size: 1, activation: .sigmoid))
nn.compile()
nn.fit(X: data.XTrain, y: data.yTrain)
nn.test(X: data.XTest, y: data.yTest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.