Latest 0.1.9
License GPL-3
Platforms ios 10.0

Implementation of the Neural Network structure in swift to make machine learning easier in iOS apps.


NeuralKit is available on CocoaPods. To download, add the following to your podfile:

pod 'NeuralKit'

Why did I make NeuralKit?

The current default Swift library for machine learning (CoreML) is not very intuitive and does not give the user much control over the actual training of the network. Also, I was bored and wanted to learn more about machine learning :)


How to use

Creating a network

// Set the dimension for the network
// This is an array that has the sizes of each layer.
// The following will describe a network with an input layer size of 2, hidden layer sizes of 3, 3, and 4, and an output layer size of 2.
let dimension = [2, 3, 3, 4, 2]

// You can initialize a network with the dimension array, and optionally with random weights and biases.
let network = Network(networkDimension: dimension, withRandomWeights: true)

Input and Output

// Set input
let input = [3.0, 42.1]
network.set(input: input)

// Compute output
let output = network.compute()
print("Output:", output)

Latest podspec

    "name": "NeuralKit",
    "version": "0.1.9",
    "summary": "Comprehensive implementation of machine learning in Swift",
    "description": "Acts as a replacement for the CoreML library for Swift. It allows developersnto have more control over the algorithms used for their machine learning",
    "homepage": "",
    "license": {
        "type": "GPL-3",
        "file": "LICENSE"
    "authors": {
        "Sylvan Martin": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.9"
    "platforms": {
        "ios": "10.0"
    "swift_version": "4.2",
    "source_files": "NeuralKit/**/*.{swift,h,m}"

Pin It on Pinterest

Share This