Appendix F

Matrix Implementation of Digit Classification Network

This appendix is related to Chapter 4, “Fully Connected Networks Applied to Multiclass Classification.”

This appendix contains two alternative implementations of the digit classification network. In the first implementation, the idea is to organize the weights for all the neurons in a layer into a single matrix, where each row in the matrix represents a neuron. The weighted sums for an entire layer of neurons can then be computed by multiplying this matrix by the input vector. We then extend it to handle mini-batches as well. We organize all the input examples of a mini-batch into a single matrix. The weighted sums for an entire layer of neurons for all input examples in the mini-batch ...

Get Learning Deep Learning: Theory and Practice of Neural Networks, Computer Vision, NLP, and Transformers using TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.