A Swift port of James McCaffrey's C# neural network example presented at Microsoft Build 2014 The original C# source is available at http://www.quaetrix.com/Build2014.html.
#About At Build 2014, James McCaffrey gave a presentation on Developing Neural Networks Using Visual Studio. It is one of the best explanations of neural networks I've come across. His presentation is available on YouTube at https://www.youtube.com/watch?v=9aHJ-FAzQaE.
His sample code inspired me to learn more by playing around with using a neural network for one of my projects. Swift is my language of choice these days, which is why I ported his code. I chose to approach this as a direct translation of his work, so some aspects of it are not as swifty as they could be.
#Using This code is written in Swift 3.0. From a terminal, run the demo by entering "swift BuildNeuralNetworkDemo.swift". The code can also run in a Xcode playground, but I don't recommend it. The overhead of running in that environment makes it take much longer to complete.