Practical overview
When it fits
Use BrainCore when an Apple-platform Swift app needs to define and evaluate a pretrained neural network on a Metal-capable device.
Who it is for
- Swift developers building neural-network features into iOS or macOS apps
- Developers experimenting with recurrent or branched network structures
Documented uses
- Assemble a network from supported layers and connect them in code.
- Run a forward pass using pretrained weights and biases.
- Use Metal-backed computation for neural-network inference in an Apple-platform app.
Requirements & limits
The repository is public and lists an MIT license. The README specifies Xcode 7.2 or later and a Metal-capable device; the iOS simulator is unsupported.
- BrainCore runs pretrained networks rather than providing the documented training workflow; weights and biases must be brought in.
- A Metal-capable device is required, so the documented setup does not work in the iOS simulator.
- Evaluation callbacks and sink consumption occur on a background thread.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Define and evaluate a pretrained network
Connect network layers and run a forward pass using imported trained weights.
Before you start
- Swift project targeting iOS 8.0 or later or macOS 10.11 or later
- Xcode 7.2 or later
- A device that supports Metal; the iOS simulator is not supported
- Pretrained network weights and biases
Steps
Create the required data, model and sink layer instances, supplying weights and biases to the applicable layers.
Connect the layers in a Net.build closure using BrainCore's operators.
Create a Metal device and initialize an Evaluator with the network and device.
Call evaluate() to execute a forward pass; supply fresh input through the data layer when needed.
Expected outcome
The evaluator runs a forward pass of the defined pretrained network.
Guide limitations
- The framework supports execution of pretrained networks; training is described as a separate step.
- The sink layer's consume() function and the completion closure run on a background thread; coordinate shared data access.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 November 2026
- Original website title
- alejandro-isaza/BrainCore · Official homepage title · retained in its source language

