Skip to content

Instantly share code, notes, and snippets.

@jknthn
Created September 25, 2017 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jknthn/cf53f93b1e84981b7a387332ff2e916d to your computer and use it in GitHub Desktop.
Save jknthn/cf53f93b1e84981b7a387332ff2e916d to your computer and use it in GitHub Desktop.
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