February 2018
Intermediate to advanced
378 pages
10h 14m
English
In the following example, input images are of size 224 x 224 x 64 and output images are of size 222 x 222 x 96. The dimensionality of convolution weights is 3 x 3 x 64 x 96. That's 5.45 billion floating-point operations (gigaFloPS). In a whole MNIST recognition network, it's about 1-2 trillion operations per forward pass.
BNNS is a part of Accelerate, so you need to import Accelerate to access the neural networks building blocks. The first thing you do is describing the input stack:
var inputStack = BNNSImageStackDescriptor( width: 224, height: 224, channels: 64, row_stride: 224, image_stride: 224*224, data_type: BNNSDataTypeFloat32, data_scale: 1.0, data_bias: 0.0)
Most of the parameters are self-evident; row_stride is an increment ...
Read now
Unlock full access