Let's first build a simple neural network. This network will use the basic operations of addition and multiplication to take a 4 x 3 matrix of integers, initialize a weight coefficient represented by a 3 x 1 column vector, and gradually adjust those weights until they predict, for a given sequence of inputs (and after the application of a Sigmoid nonlinearity), an output that matches the validation dataset.
A basic neural network
The structure of a neural network
The purpose of this example is clearly not to build a cutting-edge computer vision system but, rather, to demonstrate how to use these fundamental operations (and how Gorgonia handles them) in the context of a parameterized function where the parameters are...