August 2019
Intermediate to advanced
242 pages
5h 45m
English
We can think of our layer structure having four parts. We are going to have three convolutional layers and one fully connected layer. Our first two layers are extremely similar - they follow the convolution-ReLU-MaxPool-dropout structure that we've described previously:
// Layer 0if c0, err = gorgonia.Conv2d(x, m.w0, tensor.Shape{5, 5}, []int{1, 1}, []int{1, 1}, []int{1, 1}); err != nil { return errors.Wrap(err, "Layer 0 Convolution failed")}if a0, err = gorgonia.Rectify(c0); err != nil { return errors.Wrap(err, "Layer 0 activation failed")}if p0, err = gorgonia.MaxPool2D(a0, tensor.Shape{2, 2}, []int{0, 0}, []int{2, 2}); err != nil { return errors.Wrap(err, "Layer 0 Maxpooling failed")}if l0, err = gorgonia.Dropout(p0, ...Read now
Unlock full access