NeuralKit is a pure Swift implementation of deep learning algorithms for whatever one may find this useful for, using MatrixKit to perform the linear algebra associated with deep learning.
This library is not complete at all, it is in its infancy! I encourage anyone interested to use this library as they see fit, and if they see any issues (of which I'm sure there are a ton) please let me know!
Marcin Krzyzanowski said it best: "Because I can."
For a while I've wanted to just make a neural network library for fun and to learn how to do it, so when some friends of mine wanted to work on our own project that would require some serious machine learning, I figured now would be the perfect time to really develop and perfect this library for real big practical usage. But, a lot of Apple's ML API's available in Swift are quite hard to use, and using other libraries just aren't that practical when you don't have a nice graphics card or a supercomputer (of which I have neither). Not to mention, there are a lot of things you just can't do with Apple's current available ML API's!
I was inspired by CryptoSwift, as it provided a much more
user friendly way of running crypto routines in pure Swift that is in some ways more versatile than
So, the vision for this project is that regular people without graphics cards, supercomputers, or a lot of ML experience, can create ML models for their own projects, with those computations being easily able to be run in parralel with any other computer that can compile this package. For example, want to do some deep learning and have some friends also interested, but don't have beefy computers and ML experience? The idea of this package is that you'd be able to easily create an ML model and combine the computing power of many modest computers to have practical data science usage.
This is installed like any other Swift package, though it has the additional dependency MatrixKit, which should automatically be taken care of by the Swift package manager.
A common "Hello World" of machine learning is getting a neural network to recognize handwritten digits, often using the
MNIST database. There is sample code in
that uses gradient descent to train a neural network to perform this task. Since the current implementation of NeuralKit uses
a bespoke file type for data sets, I've included files for converting the MNIST database to NeuralKit Data Set (
and the NKDS version of the MNIST database is included in the most recent release of this package. Feel free to use that!
|Last commit: 36 weeks ago|
The first release of this library in some level of working form! This includes
NeuralNetworkdata structure, used for deep learning
DataSetobject, providing an interface for handling training and testing data sets for neural networks. This class is subclassable, so you can create your own ways of handling data sets.
Full Changelog: https://github.com/SylvanM/NeuralKit/commits/v1.0.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics