Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ACTIVATION COMPRESSION METHOD FOR DEEP LEARNING ACCELERATION
Document Type and Number:
WIPO Patent Application WO/2022/112739
Kind Code:
A1
Abstract:
A system and method for multiplying matrices, and method for training a convolutional neural network (CNN), are provided. The system includes a processor and a matrix multiply accelerator (MMA). The processor is configured to generate, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements; for each basic block matrix: prune, based on a sparsity value, the elements of the basic block matrix, generate a mask for the basic block matrix, each mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compress the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix. The MMA is configured to multiply, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix.

Inventors:
LIU ZHI-GANG (GB)
MATTINA MATTHEW (GB)
Application Number:
PCT/GB2021/052913
Publication Date:
June 02, 2022
Filing Date:
November 11, 2021
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ADVANCED RISC MACH LTD (GB)
International Classes:
G06F17/16; G06N3/04
Foreign References:
US20170344876A12017-11-30
Other References:
SONGMING YU ET AL: "High Area/Energy Efficiency RRAM CNN Accelerator with Kernel-Reordering Weight Mapping Scheme Based on Pattern Pruning", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 13 October 2020 (2020-10-13), XP081785087
YU FUXUN ET AL: "AntiDote: Attention-based Dynamic Optimization for Neural Network Runtime Efficiency", 2020 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE), EDAA, 9 March 2020 (2020-03-09), pages 951 - 956, XP033781552, DOI: 10.23919/DATE48585.2020.9116416
LIU LIU ET AL: "DUET: Boosting Deep Neural Network Efficiency on Dual-Module Architecture", 2020 53RD ANNUAL IEEE/ACM INTERNATIONAL SYMPOSIUM ON MICROARCHITECTURE (MICRO), IEEE, 17 October 2020 (2020-10-17), pages 738 - 750, XP033856436, DOI: 10.1109/MICRO50266.2020.00066
Attorney, Agent or Firm:
TLIP LTD et al. (GB)
Download PDF:
Claims:
WHAT IS CLAIMED IS: 1. A system, comprising: a processor, coupled to a memory, configured to: generate, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements, for each basic block matrix: prune, based on a sparsity value, the elements of the basic block matrix, generate a mask for the basic block matrix, each mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compress the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix; and a matrix multiply accelerator (MMA), coupled to the processor and the memory, configured to: multiply, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix. 2. The system according to claim 1, where: the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix.

3. The system according to claim 2, where: the input tensor includes a number of input matrices, each input matrix has a same number of elements, and the number of input matrices is equal to a number of channels; the number of basic block matrices is equal to the number of input matrix elements, and each basic block matrix has a first dimension that is equal to 1 and a second dimension that is equal to a hyperparameter b; and each compressed basic block matrix has a first dimension that is equal to 1 and a second dimension that is less than the hyperparameter b. 4. The system according to claim 3, where the processor is further configured to: flatten a number of weight tensors to generate the weight matrix, where each weight tensor has a first dimension, a second dimension, and a third dimension that is equal to the number of channels, and where each flattened weight tensor forms a row of the weight matrix. 5. The system according to claim 1, where: the processor is further configured to: convert the input tensor into a converted input data matrix based on a convolution operation, re-sequence each column of the converted input data matrix into a sequence of compressed basic block matrices, and re-sequence each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; and the MMA is further configured to: multiply, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate the output matrix. 6. The system according to claim 5, where the MMA includes: a first register configured to store the masks and the compressed basic block matrices; a second register configured to store the weight groups; a third register configured to store the output matrix; and an array of processing elements (PEs), coupled to the first, second and third registers, each PE configured to multiply, based on the masks, one sequence of compressed basic block matrices and one sequence of weight groups to generate one element of the output matrix. 7. The system according to claim 6, where each PE includes: a first multiplexer configured to receive a weight group within the sequence of weight groups, and selectively output a first weight based on a first data selection signal; a second multiplexer configured to receive the weight group within the sequence of weight groups, and selectively output a second weight based on a second data selection signal; a data selection circuit, coupled to the first multiplexer and the second multiplexer, configured to receive the mask corresponding to a compressed basic block matrix within the sequence of compressed basic block matrices, generate the first data selection signal based on the mask, and generate the second data selection signal based on the mask; a first multiplier circuit, coupled to the first multiplexer, configured to receive a first element from the compressed basic block matrix and the first weight selectively output by the first multiplexer, multiply the first element and the first weight to generate a first intermediate product, and output the first intermediate product; a second multiplier circuit, coupled to the second multiplexer, configured to receive a second element from the compressed basic block matrix and the second weight selectively output by the second multiplexer, multiply the second element and the second weight to generate a second intermediate product, and output the second intermediate product; and an accumulator circuit, coupled to the first and second multiplier circuits, configured to receive the first and second intermediate products, and accumulate the first and second intermediate products into a value for one element of the output matrix. 8. The system according to claim 7, where each weight group includes at least four weights, each mask includes at least four bits, and each compressed basic block matrix includes at least two elements. 9. The system according to claim 1, further comprising a dynamic activation pruning (DAP) selection circuit, coupled to the processor, configured to generate the mask for each basic block matrix, the DAP selection circuit including: a plurality of input registers, each input register including an enable bit and configured to store one basic block matrix element; a chain of magnitude compactors, coupled to the input registers, each magnitude compactor configured to receive two basic block matrix elements, determine which basic block matrix element has a greater magnitude, and then pass the basic block matrix element with the greater magnitude to a next magnitude compactor in the chain of magnitude compactors; and an output register including a plurality of output bits, each output bit corresponding to one of the input registers, where a final magnitude compactor in the chain of magnitude compactors is configured to set the respective output bit within the output register, and where the input register enable bit indicates whether the input register transmits or does not transmit the stored basic block matrix element to the chain of magnitude compactors. 10. A computer-based method for multiplying matrices, comprising: generating, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements; for each basic block matrix: pruning, based on a sparsity value, the elements of the basic block matrix, generating a mask for the basic block matrix, the mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compressing the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix; and multiplying, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix.

11. The computer-based method according to claim 10, where: the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix. 12. The computer-based method according to claim 11, where: the input tensor includes a number of input matrices, each input matrix has a same number of elements, and the number of input matrices is equal to a number of channels; the number of basic block matrices is equal to the number of input matrix elements, and each basic block matrix has a first dimension that is equal to 1 and a second dimension that is equal to a hyperparameter b; and each compressed basic block matrix has a first dimension that is equal to 1 and a second dimension that is less than the hyperparameter b. 13. The computer-based method according to claim 12, further comprising: flattening a number of weight tensors to generate the weight matrix, where each weight tensor has a first dimension, a second dimension, and a third dimension that is equal to the number of channels, and where each flattened weight tensor forms a row of the weight matrix. 14. The computer-based method according to claim 10, further comprising: converting the input tensor into a converted input data matrix based on a convolution operation; re-sequencing each column of the converted input data matrix into a sequence of compressed basic block matrices; re-sequencing each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; and multiplying, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate the output matrix. 15. The computer-based method according to claim 14, where said multiplying is performed by an array of processing elements (PEs), each PE is configured to multiply, based on the masks, one sequence of compressed basic block matrices and one sequence of weight groups to generate one element of the output matrix. 16. The computer-based method according to claim 15, where each PE includes: a first multiplexer configured to receive a weight group within the sequence of weight groups, and selectively output a first weight based on a first data selection signal; a second multiplexer configured to receive the weight group within the sequence of weight groups, and selectively output a second weight based on a second data selection signal; a data selection circuit, coupled to the first multiplexer and the second multiplexer, configured to receive the mask corresponding to a compressed basic block matrix within the sequence of compressed basic block matrices, generate the first data selection signal based on the mask, and generate the second data selection signal based on the mask; a first multiplier circuit, coupled to the first multiplexer, configured to receive a first element from the compressed basic block matrix and the first weight selectively output by the first multiplexer, multiply the first element and the first weight to generate a first intermediate product, and output the first intermediate product; a second multiplier circuit, coupled to the second multiplexer, configured to receive a second element from the compressed basic block matrix and the second weight selectively output by the second multiplexer, multiply the second element and the second weight to generate a second intermediate product, and output the second intermediate product; and an accumulator circuit, coupled to the first and second multiplier circuits, configured to receive the first and second intermediate products, and accumulate the first and second intermediate products into a value for one element of the output matrix. 17. The computer-based method according to claim 16, where each weight group includes at least four weights, each mask includes at least four bits, and each compressed basic block matrix includes at least two elements. 18. A computer-based method for training a convolutional neural network (CNN), comprising: during a forward phase: providing a filter to a convolutional layer, the filter including a number of weight sets; providing input feature maps to a dynamic activation pruning (DAP) process; at the DAP process: generating, based on the input feature maps, a number of basic block matrices, each basic block matrix including a number of elements, pruning, based on a sparsity value, the elements of each basic block matrix, generating a mask for each basic block matrix, the mask including a number of bits, each bit corresponding to a different element of the basic block matrix, compressing each basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix, and providing the masks and the compressed basic block matrices to the convolutional layer; at the convolutional layer: multiplying, based on the masks, the compressed basic block matrices and the weight sets to generate output feature maps; during a backward phase: backpropagating gradients; and updating the weight sets. 19. The computer-based method according to claim 18, where the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix. 20. The computer-based method according to claim 19, further comprising: at the convolutional layer: flattening the weight sets to generate a weight matrix, each flattened weight set forming a row of the weight matrix; converting the input feature maps into a converted input data matrix based on a convolution operation; re-sequencing each column of the converted input data matrix into a sequence of compressed basic block matrices; re-sequencing each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; multiplying, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate an output data matrix; and generating the output feature maps based on the output data matrix.

Description:
ACTIVATION COMPRESSION METHOD FOR DEEP LEARNING ACCELERATION CROSS-REFERENCE TO RELATED APPLICATIONS [0001] This application claims the benefit of U.S. Provisional Patent Application Serial No.63/117,728 (filed on November 24, 2020), the disclosure of which is incorporated herein by reference in its entirety. BACKGROUND [0002] The present disclosure relates to computer systems. More particularly, the present disclosure relates to a matrix multiplication system and method. [0003] Artificial neural networks (ANNs), such as deep neural networks (DNNs), convolutional neural networks (CNNs), etc., are a popular solution to a wide array of challenging classification, recognition and regression problems. However, many ANN models require a large number of calculations involving a large number of weights and activations, which presents a significant challenge with respect to access, storage and performance, particularly for mobile and other power or storage- constrained devices. An ANN hardware accelerator accelerates these calculations, such as, for example, convolution operations performed by CNNs. [0004] Typically, native convolution operations are not performed by a CNN due to the complicated dataflow and expensive datapaths that are usually required. Instead, native convolution operations are converted into generic matrix multiplication (GEMM) operations, and then the GEMM operations are executed more efficiently by a central processing unit (CPU), specialized processor, hardware accelerator processing engine, etc., using optimized software libraries or specialized hardware. More particularly, an “IM2COL” software function may be used to convert the filter (weight) matrix and the input feature map (IFM) matrix for each convolution operation into an expanded format that is compatible with a GEMM operation. The IM2COL versions of each filter (weight) matrix and each IFM matrix are generated and stored in memory, and then loaded from memory and processed by the GEMM operation. [0005] Generally, matrices may be classified as either sparse or dense. Most elements of a sparse matrix have a value of zero, while most elements of a dense matrix have a non-zero value. For the simple matrix multiplication operation C = A • B, when matrix A or matrix B is sparse, most of the matrix calculations will include a value of zero for at least one of the operands. When both matrix A and matrix B are sparse, an even greater number of matrix calculations will include a value of zero for at least one of the operands. Since multiplication by an operand that has a value of zero will always result in a product that has a value of zero, applying standard matrix multiplication techniques to sparse matrices is very inefficient due to the large number of operands that have a value of zero. BRIEF DESCRIPTION OF THE DRAWINGS [0006] FIG.1 depicts an ANN, in accordance with embodiments of the present disclosure. [0007] FIG.2 depicts a CNN, in accordance with embodiments of the present disclosure. [0008] FIG.3A depicts convolutional layer calculation for a CNN, FIG.3B depicts a converted convolutional layer calculation for a CNN, and FIG.3C depicts a converted input data matrix, in accordance with an embodiment of the present disclosure. [0009] FIG.4 depicts a data flow diagram for a multiply-and-accumulate (MAC) array. [0010] FIG.5A depicts input feature maps, FIG.5B depicts basic blocks, and FIG.5C depicts basic block matrices, in accordance with an embodiment of the present disclosure. [0011] FIG.6A depicts a data flow diagram for a portion of a training process for CNN 15, and FIGS.6B and 6C depict block diagrams of dynamic activation pruning (DAP) selection circuits, according to embodiments of the present disclosure. [0012] FIGS.7A depicts basic block matrices after DAP selection, and FIG. 7B depicts compressed basic block matrices, in accordance with an embodiment of the present disclosure [0013] FIGS.8A, 8B, 8C and 8D depict weight matrix re-sequencing and converted input data matrix re-sequencing and compression, in accordance with an embodiment of the present disclosure. [0014] FIG.9 depicts a data flow diagram for DAP MAC array, in accordance with an embodiment of the present disclosure. [0015] FIG.10 depicts a block diagram of system, in accordance with an embodiment of the present disclosure. [0016] FIG.11 depicts a block diagram of a matrix multiply accelerator (MMA), in accordance with an embodiment of the present disclosure. [0017] FIG.12 depicts a block diagram of a processing engine (PE) for an MMA, in accordance with an embodiment of the present disclosure. [0018] FIG.13 depicts a flow diagram representing functionality associated with multiplying matrices, in accordance with embodiments of the present disclosure. DETAILED DESCRIPTION [0019] Embodiments of the present disclosure will now be described with reference to the drawing figures, in which like reference numerals refer to like parts throughout. [0020] Embodiments of the present disclosure advantageously provide a system and method for multiplying matrices that significantly reduce “multiply by zero” conditions. Embodiments of the present disclosure are applicable to the multiplication of a dense matrix with a “sparse” matrix, and many embodiments accommodate any degree of sparsity ratio. [0021] In one embodiment, a system includes a processor coupled to a memory, and a matrix multiply accelerator (MMA) coupled to the processor and the memory. The processor is configured to generate, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements; for each basic block matrix: prune, based on a sparsity value, the elements of the basic block matrix, generate a mask for the basic block matrix, each mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compress the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix. The MMA is configured to multiply, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix. [0022] An ANN models the relationships between input data or signals and output data or signals using a network of interconnected nodes that is trained through a learning process. The nodes are arranged into various layers, including, for example, an input layer, one or more hidden layers, and an output layer. The input layer receives input data, such as, for example, image data, and the output layer generates output data, such as, for example, a probability that the image data contains a known object. Each hidden layer provides at least a partial transformation of the input data to the output data. A DNN has multiple hidden layers in order to model complex, nonlinear relationships between input data and output data. [0023] In a fully-connected, feedforward ANN, each node is connected to all of the nodes in the preceding layer, as well as to all of the nodes in the subsequent layer. For example, each input layer node is connected to each hidden layer node, each hidden layer node is connected to each input layer node and each output layer node, and each output layer node is connected to each hidden layer node. Additional hidden layers are similarly interconnected. Each connection has a weight value, and each node has an activation function, such as, for example, a linear function, a step function, a sigmoid function, a tanh function, a rectified linear unit (ReLU) function, etc., that determines the output of the node based on the weighted sum of the inputs to the node. The input data propagates from the input layer nodes, through respective connection weights to the hidden layer nodes, and then through respective connection weights to the output layer nodes. [0024] More particularly, at each input node, input data is provided to the activation function for that node, and the output of the activation function is then provided as an input data value to each hidden layer node. At each hidden layer node, the input data value received from each input layer node is multiplied by a respective connection weight, and the resulting products are summed or accumulated into an activation value that is provided to the activation function for that node. The output of the activation function is then provided as an input data value to each output layer node. At each output layer node, the output data value received from each hidden layer node is multiplied by a respective connection weight, and the resulting products are summed or accumulated into an activation value that is provided to the activation function for that node. The output of the activation function is then provided as output data. Additional hidden layers may be similarly configured to process data. [0025] FIG.1 depicts ANN 10, in accordance with an embodiment of the present disclosure. [0026] ANN 10 includes input layer 20, one or more hidden layers 30, 40, 50, etc., and output layer 60. Input layer 20 includes one or more input nodes 21, 22, 23, etc. Hidden layer 30 includes one or more hidden nodes 31, 32, 33, 34, 35, etc. Hidden layer 40 includes one or more hidden nodes 41, 42, 43, 44, 45, etc. Hidden layer 50 includes one or more hidden nodes 51, 52, 53, 54, 55, etc. Output layer 60 includes one or more output nodes 61, 62, etc. Generally, ANN 10 includes N hidden layers, input layer 20 includes “i” nodes, hidden layer 30 includes “j” nodes, hidden layer 40 includes “k” nodes, hidden layer 50 includes “m” nodes, and output layer 60 includes “o” nodes. [0027] In one embodiment, N equals 3, i equals 3, j, k and m equal 5 and o equals 2 (depicted in FIG.1). Input node 21 is coupled to hidden nodes 31 to 35, input node 22 is coupled to hidden nodes 31 to 35, and input node 23 is coupled to hidden nodes 31 to 35. Hidden node 31 is coupled to hidden nodes 41 to 45, hidden node 32 is coupled to hidden nodes 41 to 45, hidden node 33 is coupled to hidden nodes 41 to 45, hidden node 34 is coupled to hidden nodes 41 to 45, and hidden node 35 is coupled to hidden nodes 41 to 45. Hidden node 41 is coupled to hidden nodes 51 to 55, hidden node 42 is coupled to hidden nodes 51 to 55, hidden node 43 is coupled to hidden nodes 51 to 55, hidden node 44 is coupled to hidden nodes 51 to 55, and hidden node 45 is coupled to hidden nodes 51 to 55. Hidden node 51 is coupled to output nodes 61 and 62, hidden node 52 is coupled to output nodes 61 and 62, hidden node 53 is coupled to output nodes 61 and 62, hidden node 54 is coupled to output nodes 61 and 62, and hidden node 55 is coupled to output nodes 61 and 62. [0028] Many other variations of input, hidden and output layers are clearly possible, including hidden layers that are locally-connected, rather than fully- connected, to one another. [0029] Training an ANN includes optimizing the connection weights between nodes by minimizing the prediction error of the output data until the ANN achieves a particular level of accuracy. One method is backpropagation, or backward propagation of errors, which iteratively and recursively determines a gradient descent with respect to the connection weights, and then adjusts the connection weights to improve the performance of the network. [0030] A multi-layer perceptron (MLP) is a fully-connected ANN that has an input layer, an output layer and one or more hidden layers. MLPs may be used for natural language processing applications, such as machine translation, speech recognition, etc. Other ANNs include recurrent neural networks (RNNs), long short- term memories (LSTMs), sequence-to-sequence models that include an encoder RNN and a decoder RNN, shallow neural networks, etc. [0031] A CNN is a variation of an MLP that may be used for classification or recognition applications, such as image recognition, speech recognition, etc. A CNN has an input layer, an output layer and multiple hidden layers including convolutional layers, pooling layers, normalization layers, fully-connected layers, etc. Each convolutional layer applies a sliding dot product or cross-correlation to an input volume, applies an activation function to the results, and then provides the activation or output volume to the next layer. Convolutional layers typically use the ReLU function as the activation function. In certain embodiments, the activation function is provided in a separate activation layer, such as, for example, a ReLU layer. A pooling layer reduces the dimensions of the output volume received from the preceding convolutional layer, and may calculate an average or a maximum over small clusters of data, such as, for example, 2x2 matrices. In certain embodiments, a convolutional layer and a pooling layer may form a single layer of a CNN. The fully-connected layers follow the convolutional and pooling layers, and include a flatten layer and a classification layer, followed by a normalization layer that includes a normalization function, such as the SoftMax function. The output layer follows the last fully-connected layer; in certain embodiments, the output layer may include the normalization function. [0032] FIG.2 depicts CNN 15, in accordance with an embodiment of the present disclosure. CNN 15 includes input layer 20, one or more hidden layers, such as convolutional layer 30-1, pooling layer 30-2, hidden (flatten) layer 40, hidden (classification) layer 50, etc., and output layer 60. Many other variations of input, hidden and output layers are contemplated. [0033] Input layer 20 includes one or more input nodes 21, etc., that present the input data, such as a color image, as an input volume to the first convolutional layer, e.g., convolutional layer 30-1. The input volume is a three-dimensional matrix that has a width, a height and a depth. For example, input data that represent a color image are presented as an input volume that is 512 pixels x 512 pixels x 3 channels (red, green, blue); other input volume dimensions may also be used, such as 32x32x3, 64x64x3, 128x128x3, etc., 32x32x1, 64x64x1, 128x128x1, 512x512x1, etc. [0034] Convolutional layer 30-1 is locally-connected to input layer 20, and includes a plurality of nodes that are connected to local regions in the input volume (not depicted for clarity). For a CNN that uses a standard convolution, each node computes a dot product between the node’s weights and the respective local region of the input volume. An activation function is then applied to the results of each convolution calculation to produce an output volume that is provided as an input volume to the subsequent layer. The activation function may be applied by each convolutional layer node or by the nodes of a subsequent locally-connected ReLU layer. [0035] Pooling layer 30-2 is locally-connected to convolutional layer 30-1, and includes a plurality of nodes that are connected to local regions in the input volume (not depicted for clarity). Pooling layer 30-2 also produces an output volume that is provided as the input volume to the subsequent layer, such as, for example, another convolutional layer 30-1, a flatten layer 40, etc. In certain embodiments, convolutional layer 30-1 and pooling layer 30-2 form a single hidden layer 30. Similarly, in certain embodiments, convolutional layer 30-1, a ReLU layer and pooling layer 30-2 form a single hidden layer 30. Generally, the output volumes of the convolutional and pooling layers may be described as feature maps, and one or more single hidden layers 30 form a feature learning portion of CNN 15. [0036] Hidden layer 40 is a “flatten” layer that is locally-connected to pooling layer 30-2, and includes one or more hidden (flatten) nodes 41, 42, 43, 44, 45, etc. Hidden (flatten) layer 40 “flattens” the output volume produced by the preceding pooling layer 30-2 into a column vector, which is provided to the subsequent, fully- connected hidden layer 50. [0037] Hidden layer 50 is a classification layer that is fully-connected to hidden (flatten) layer 40, and includes one or more hidden (classification) nodes 51, 52, 53, 54, 55, etc. [0038] Output layer 60 includes one or more output nodes 61, 62, etc., and is fully-connected to hidden (classification) layer 50. Fully-connected output layer 60 receives the classification results output by hidden (classification) layer 50, and each node outputs a predicted class score. A normalization function, such as a Softmax function, may be applied to the predicted class scores by output layer 60, or, alternatively, by an additional layer interposed between hidden (classification) layer 50 and output layer 60. [0039] Similar to ANNs, training a CNN includes optimizing the connection weights between nodes by minimizing the prediction error of the output data until the CNN achieves a particular level of accuracy. As noted above, backpropagation may be used to iteratively and recursively determines a gradient descent with respect to the connection weights, and then adjusts the connection weights to improve the performance of the network. Matrix multiplication operations, and, more particularly, multiply-and-accumulate (MAC) operations, are used extensively by CNNs, as well as other ANNs. [0040] FIG.3A depicts convolutional layer calculation 200 for a CNN, in accordance with an embodiment of the present disclosure. [0041] Input feature maps 204 include four channels and one input data matrix for each channel, i.e., input data matrices 204 1 , 204 2 , 204 3 and 204 4 . Filter 202 includes four filter or weight sets 202 1 , 202 2 , 202 3 and 202 4 , and each filter or weight set includes four weight matrices, one weight matrix for each channel. Output feature maps 206 include four channels and one output data matrix for each filter or weight set, i.e., output data matrices 206 1 , 206 2 , 206 3 and 206 4 . Convolutional layer calculation 200 convolves filter 202 with input feature maps 204 to produce output feature maps 206. [0042] Generally, input data matrices 204 1 , 204 2 , 204 3 and 204 4 form an input tensor, each weight set 202 1 , 202 2 , 202 3 and 202 4 forms a weight tensor, and output data matrices 206 1 , 206 2 , 206 3 and 206 4 form an output tensor. In this embodiment, each tensor has a height, a width and a depth. The depth of the input tensor is equal to the number of channels, the depth of each weight tensor is equal to the number of channels, and the depth of the output tensor is equal to the number of weight tensors (i.e., weight sets). While particular dimensions for the tensors and matrices have been selected for clarity of illustration and explanation, embodiments of the present disclosure are not so limited. [0043] In one embodiment, input data matrix 204 1 is a 5x5 matrix associated with the first channel and includes activations a 1 1, a 1 2, a 1 3, a 1 4, a 1 5, a 1 6, a 1 7, a 1 8, a 1 9, a 1 10, a 1 11, a 1 12, a 1 13, a 1 14, a 1 15, a 1 16, a 1 17, a 1 18, a 1 19, a 1 20, a 1 21, a 1 22, a 1 23, a 1 24 and a 1 25. Input data matrix 204 2 is a 5x5 matrix associated with the second channel and includes activations a 2 1, a 2 2, a 2 3, a 2 4, a 2 5, a 2 6, a 2 7, a 2 8, a 2 9, a 2 10, a 2 11, a 2 12, a 2 13, a 2 14, a 2 15, a 2 16, a 2 17, a 2 18, a 2 19, a 2 20, a 2 21, a 2 22, a 2 23, a 2 24 and a 2 25. Input data matrix 204 3 is a 5x5 matrix associated with the third channel and includes activations a 3 1, a 3 2, a 3 3, a 3 4, a 3 5, a 3 6, a 3 7, a 3 8, a 3 9, a 3 10, a 3 11, a 3 12, a 3 13, a 3 14, a 3 15, a 3 16, a 3 17, a 3 18, a 3 19, a 3 20, a 3 21, a 3 22, a 3 23, a 3 24 and a 3 25. Input data matrix 204 4 is a 5x5 matrix associated with the fourth channel and includes activations a 4 1, a 4 2, a 4 3, a 4 4, a 4 5, a 4 6, a 4 7, a 4 8, a 4 9, a 4 10, a 4 11, a 4 12, a 4 13, a 4 14, a 4 15, a 4 16, a 4 17, a 4 18, a 4 19, a 4 20, a 4 21, a 4 22, a 4 23, a 4 24 and a 4 25. [0044] In this embodiment, weight set 202 1 includes four weight matrices. The first weight matrix is a 2x2 matrix associated with the first channel, and includes weights w 1 1, w 1 2, w 1 3 and w 1 4. The second weight matrix is a 2x2 matrix associated with the second channel, and includes weights w 1 5, w 1 6, w 1 7 and w 1 8. The third weight matrix is a 2x2 matrix associated with the third channel, and includes weights w 1 9, w 1 10, w 1 11 and w 1 12. The fourth weight matrix is a 2x2 matrix associated with the fourth channel, and includes weights w 1 13, w 1 14, w 1 15 and w 1 16. [0045] Weight set 202 2 includes four weight matrices. The first weight matrix is a 2x2 matrix associated with the first channel, and includes weights w 2 1, w 2 2, w 2 3 and w 2 4. The second weight matrix is a 2x2 matrix associated with the second channel, and includes weights w 2 5, w 2 6, w 2 7 and w 2 8. The third weight matrix is a 2x2 matrix associated with the third channel, and includes weights w 2 9, w 2 10, w 2 11 and w 2 12. The fourth weight matrix is a 2x2 matrix associated with the fourth channel, and includes weights w 2 13, w 2 14, w 2 15 and w 2 16. [0046] Weight set 202 3 includes four weight matrices. The first weight matrix is a 2x2 matrix associated with the first channel, and includes weights w 3 1, w 3 2, w 3 3 and w 3 4. The second weight matrix is a 2x2 matrix associated with the second channel, and includes weights w 3 5, w 3 6, w 3 7 and w 3 8. The third weight matrix is a 2x2 matrix associated with the third channel, and includes weights w 3 9, w 3 10, w 3 11 and w 3 12. The fourth weight matrix is a 2x2 matrix associated with the fourth channel, and includes weights w 3 13, w 3 14, w 3 15 and w 3 16. [0047] Weight set 202 4 includes four weight matrices. The first weight matrix is a 2x2 matrix associated with the first channel, and includes weights w 4 1, w 4 2, w 4 3 and w 4 4. The second weight matrix is a 2x2 matrix associated with the second channel, and includes weights w 4 5, w 4 6, w 4 7 and w 4 8. The third weight matrix is a 2x2 matrix associated with the third channel, and includes weights w 4 9, w 4 10, w 4 11 and w 4 12. The fourth weight matrix is a 2x2 matrix associated with the fourth channel, and includes weights w 4 13, w 4 14, w 4 15 and w 4 16. [0048] In this embodiment, output data matrix 206 1 is a 4x4 matrix associated with weight set 202 1 and includes activations o 1 1, o 1 2, o 1 3, o 1 4, o 1 5, o 1 6, o 1 7, o 1 8, o 1 9, o 1 10, o 1 11, o 1 12, o 1 13, o 1 14, o 1 15 and o 1 16. Output data matrix 206 2 is a 4x4 matrix associated with weight set 202 2 and includes activations o 2 1, o 2 2, o 2 3, o 2 4, o 2 5, o 2 6, o 2 7, o 2 8, o 2 9, o 2 10, o 2 11, o 2 12, o 2 13, o 2 14, o 2 15 and o 2 16. Output data matrix 206 3 is a 4x4 matrix associated with weight set 202 3 and includes activations o 3 1, o 3 2, o 3 3, o 3 4, o 3 5, o 3 6, o 3 7, o 3 8, o 3 9, o 3 10, o 3 11, o 3 12, o 3 13, o 3 14, o 3 15 and o 3 16. Output data matrix 206 4 is a 4x4 matrix associated with weight set 202 4 and includes activations o 4 1, o 4 2, o 4 3, o 4 4, o 4 5, o 4 6, o 4 7, o 4 8, o 4 9, o 4 10, o 4 11, o 4 12, o 4 13, o 4 14, o 4 15 and o 4 16. [0049] For ease of explanation, each input data matrix 204 1 , 204 2 , 204 3 and 204 4 may be divided into four quadrants. The first quadrant spans the top (first) row and the second row, the second quadrant spans the second row and the third row, the third quadrant spans the third row and the fourth row, and the fourth quadrant spans the fourth row and the fifth (bottom) row. The first quadrant for input data matrix 204 1 (a 1 q1), the first quadrant for input data matrix 204 2 (a 2 q1), the first quadrant for input data matrix 204 3 (a 3 q1), and the first quadrant for input data matrix 204 4 (a 4 q1) are depicted; the remaining three quadrants for each input data matrix are not depicted for clarity. [0050] First quadrant a 1 q1 includes elements a 1 1, a 1 2, a 1 3, a 1 4, a 1 5, a 1 6, a 1 7, a 1 8, a 1 9 and a 1 10, from which four blocks of elements are formed, i.e., a first block (a 1 1, a 1 2, a 1 6 and a 1 7), a second block (a 1 2, a 1 3, a 1 7 and a 1 8), a third block (a 1 3, a 1 4, a 1 8 and a 1 9), and a fourth block (a 1 4, a 1 5, a 1 9 and a 1 10). First quadrant a 2 q1 includes elements a 2 1, a 2 2, a 2 3, a 2 4, a 2 5, a 2 6, a 2 7, a 2 8, a 2 9 and a 2 10, from which four blocks of elements are formed, i.e., a first block (a 2 1, a 2 2, a 2 6 and a 2 7), a second block (a 2 2, a 2 3, a 2 7 and a 2 8), a third block (a 2 3, a 2 4, a 2 8 and a 2 9), and a fourth block (a 2 4, a 2 5, a 2 9 and a 2 10). First quadrant a 3 q1 includes elements a 3 1, a 3 2, a 3 3, a 3 4, a 3 5, a 3 6, a 3 7, a 3 8, a 3 9 and a 3 10, from which four blocks of elements are formed, i.e., a first block (a 3 1, a 3 2, a 3 6 and a 3 7), a second block (a 3 2, a 3 3, a 3 7 and a 3 8), a third block (a 3 3, a 3 4, a 3 8 and a 3 9), and a fourth block (a 3 4, a 3 5, a 3 9 and a 3 10). First quadrant a 4 q1 includes elements a 4 1, a 4 2, a 4 3, a 4 4, a 4 5, a 4 6, a 4 7, a 4 8, a 4 9 and a 4 10, from which four blocks of elements are formed, i.e., a first block (a 4 1, a 4 2, a 4 6 and a 4 7), a second block (a 4 2, a 4 3, a 4 7 and a 4 8), a third block (a 4 3, a 4 4, a 4 8 and a 4 9), and a fourth block (a 4 4, a 4 5, a 4 9 and a 4 10). [0051] Second quadrant a 1 q2 includes elements a 1 6, a 1 7, a 1 8, a 1 9, a 1 10, a 1 11, a 1 12, a 1 13, a 1 14 and a 1 15, from which four blocks of elements are formed, i.e., a first block (a 1 6, a 1 7, a 1 11 and a 1 12), a second block (a 1 7, a 1 8, a 1 12 and a 1 13), a third block (a 1 8, a 1 9, a 1 13 and a 1 14), and a fourth block (a 1 9, a 1 10, a 1 14 and a 1 15). Second quadrant a 2 q2 includes elements a 2 6, a 2 7, a 2 8, a 2 9, a 2 10, a 2 11, a 2 12, a 2 13, a 2 14 and a 2 15, from which four blocks of elements are formed, i.e., a first block (a 2 6, a 2 7, a 2 11 and a 2 12), a second block (a 2 7, a 2 8, a 2 12 and a 2 13), a third block (a 2 8, a 2 9, a 2 13 and a 2 14), and a fourth block (a 2 9, a 2 10, a 2 14 and a 2 15). Second quadrant a 3 q2 includes elements a 3 6, a 3 7, a 3 8, a 3 9, a 3 10, a 3 11, a 3 12, a 3 13, a 3 14 and a 3 15, from which four blocks of elements are formed, i.e., a first block (a 3 6, a 3 7, a 3 11 and a 3 12), a second block (a 3 7, a 3 8, a 3 12 and a 3 13), a third block (a 3 8, a 3 9, a 3 13 and a 3 14), and a fourth block (a 3 9, a 3 10, a 3 14 and a 3 15). Second quadrant a 4 q2 includes elements a 4 6, a 4 7, a 4 8, a 4 9, a 4 10, a 4 11, a 4 12, a 4 13, a 4 14 and a 4 15, from which four blocks of elements are formed, i.e., a first block (a 4 6, a 4 7, a 4 11 and a 4 12), a second block (a 4 7, a 4 8, a 4 12 and a 4 13), a third block (a 4 8, a 4 9, a 4 13 and a 4 14), and a fourth block (a 4 9, a 4 10, a 4 14 and a 4 15). [0052] Third quadrant a 1 q3 includes elements a 1 11, a 1 12, a 1 13, a 1 14, a 1 15, a 1 16, a 1 17, a 1 18, a 1 19 and a 1 20, from which four blocks of elements are formed, i.e., a first block (a 1 11, a 1 12, a 1 16 and a 1 17), a second block (a 1 12, a 1 13, a 1 17 and a 1 18), a third block (a 1 13, a 1 14, a 1 18 and a 1 19), and a fourth block (a 1 14, a 1 15, a 1 19 and a 1 20). Third quadrant a 2 q3 includes elements a 2 11, a 2 12, a 2 13, a 2 14, a 2 15, a 2 16, a 2 17, a 2 18, a 2 19 and a 2 20, from which four blocks of elements are formed, i.e., a first block (a 2 11, a 2 12, a 2 16 and a 2 17), a second block (a 2 12, a 2 13, a 2 17 and a 2 18), a third block (a 2 13, a 2 14, a 2 18 and a 2 19), and a fourth block (a 2 14, a 2 15, a 2 19 and a 2 20). Third quadrant a 3 q3 includes elements a 3 11, a 3 12, a 3 13, a 3 14, a 3 15, a 3 16, a 3 17, a 3 18, a 3 19 and a 3 20, from which four blocks of elements are formed, i.e., a first block (a 3 11, a 3 12, a 3 16 and a 3 17), a second block (a 3 12, a 3 13, a 3 17 and a 3 18), a third block (a 3 13, a 3 14, a 3 18 and a 3 19), and a fourth block (a 3 14, a 3 15, a 3 19 and a 3 20). Third quadrant a 4 q3 includes elements a 4 11, a 4 12, a 4 13, a 4 14, a 4 15, a 4 16, a 4 17, a 4 18, a 4 19 and a 4 20, from which four blocks of elements are formed, i.e., a first block (a 4 11, a 4 12, a 4 16 and a 4 17), a second block (a 4 12, a 4 13, a 4 17 and a 4 18), a third block (a 4 13, a 4 14, a 4 18 and a 4 19), and a fourth block (a 4 14, a 4 15, a 4 19 and a 4 20). [0053] Fourth quadrant a 1 q4 includes elements a 1 16, a 1 17, a 1 18, a 1 19, a 1 20, a 1 21, a 1 22, a 1 23, a 1 24 and a 1 25, from which four blocks of elements are formed, i.e., a first block (a 1 16, a 1 17, a 1 21 and a 1 22), a second block (a 1 17, a 1 18, a 1 22 and a 1 23), a third block (a 1 18, a 1 19, a 1 23 and a 1 24), and a fourth block (a 1 19, a 1 20, a 1 24 and a 1 25). Fourth quadrant a 2 q4 includes elements a 2 16, a 2 17, a 2 18, a 2 19, a 2 20, a 2 21, a 2 22, a 2 23, a 2 24 and a 2 25, from which four blocks of elements are formed, i.e., a first block (a 2 16, a 2 17, a 2 21 and a 2 22), a second block (a 2 17, a 2 18, a 2 22 and a 2 23), a third block (a 2 18, a 2 19, a 2 23 and a 2 24), and a fourth block (a 2 19, a 2 20, a 2 24 and a 2 25). Fourth quadrant a 3 q4 includes elements a 3 16, a 3 17, a 3 18, a 3 19, a 3 20, a 3 21, a 3 22, a 3 23, a 3 24 and a 3 25, from which four blocks of elements are formed, i.e., a first block (a 3 16, a 3 17, a 3 21 and a 3 22), a second block (a 3 17, a 3 18, a 3 22 and a 3 23), a third block (a 3 18, a 3 19, a 3 23 and a 3 24), and a fourth block (a 3 19, a 3 20, a 3 24 and a 3 25). Fourth quadrant a 4 q4 includes elements a 4 16, a 4 17, a 4 18, a 4 19, a 4 20, a 4 21, a 4 22, a 4 23, a 4 24 and a 4 25, from which four blocks of elements are formed, i.e., a first block (a 4 16, a 4 17, a 4 21 and a 4 22), a second block (a 4 17, a 4 18, a 4 22 and a 4 23), a third block (a 4 18, a 4 19, a 4 23 and a 4 24), and a fourth block (a 4 19, a 4 20, a 4 24 and a 4 25). [0054] Output feature maps 206 may also be divided into four quadrants; in this case, each quadrant spans all four output data matrices 206 1 , 206 2 , 206 3 and 206 4 . The first quadrant spans the top (first) row of each output data matrix, the second quadrant spans the second row of each output data matrix, the third quadrant spans the third row of each output data matrix, and the fourth quadrant spans the fourth (bottom) row of each output data matrix. The first quadrant for output feature maps 206 (oq1), is depicted; the remaining three quadrants are not depicted for clarity. [0055] First quadrant oq1 includes o 1 1, o 1 2, o 1 3, o 1 4, o 2 1, o 2 2, o 2 3, o 2 4, o 3 1, o 3 2, o 3 3, o 3 4, o 4 1, o 4 2, o 4 3 and o 4 4. Second quadrant oq2 includes o 1 5, o 1 6, o 1 7, o 1 8, o 2 5, o 2 6, o 2 7, o 2 8, o 3 5, o 3 6, o 3 7, o 3 8, o 4 5, o 4 6, o 4 7 and o 4 8. Third quadrant oq3 includes o 1 9, o 1 10, o 1 11, o 1 12, o 2 9, o 2 10, o 2 11, o 2 12, o 3 9, o 3 10, o 3 11, o 3 12, o 4 9, o 4 10, o 4 11 and o 4 12. Fourth quadrant oq4 includes o 1 13, o 1 14, o 1 15, o 1 16, o 2 13, o 2 14, o 2 15, o 2 16, o 3 13, o 3 14, o 3 15, o 3 16, o 4 13, o 4 14, o 4 15 and o 4 16. [0056] Generally, each output element within output data matrices 206 1 , 206 2 , 206 3 and 206 4 is the sum of the dot products of one of the weight sets 202 1 , 202 2 , 202 3 and 202 4 and a block of activation elements within a particular quadrant of input data matrices 204 1 , 204 2 , 204 3 and 204 4 . [0057] The calculation of the output elements in quadrant oq1 follows. [0058] Output element o 1 1 of output data matrix 206 1 is the sum of the dot products of weight set 202 1 and the first block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. The first block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 includes a 1 1, a 1 2, a 1 6 and a 1 7; a 2 1, a 2 2, a 2 6 and a 2 7; a 3 1, a 3 2, a 3 6 and a 3 7; and a 4 1, a 4 2, a 4 6 and a 4 7, respectively. [0059] More particularly, the following dot products are summed to generate output element o 1 1: the dot product of the first weight matrix of weight set 202 1 and the first block of quadrant a 1 q1 (i.e., w 1 1 • a 1 1 + w 1 2 • a 1 2 + w 1 3 • a 1 6 + w 1 4 • a 1 7), the dot product of the second weight matrix of weight set 202 1 and the first block of quadrant a 2 q1 (i.e., w 1 5 • a 2 1 + w 1 6 • a 2 2 + w 1 7 • a 2 6 + w 1 8 • a 2 7), the dot product of the third weight matrix of weight set 202 1 and the first block of quadrant a 3 q1 (i.e., w 1 9 • a 3 1 + w 1 10 • a 3 2 + w 1 11 • a 3 6 + w 1 12 • a 3 7), and the dot product of the fourth weight matrix of weight set 202 1 and the first block of quadrant a 4 q1 (i.e., w 1 13 • a 4 1 + w 1 14 • a 4 2 + w 1 15 • a 4 6 + w 1 16 • a 4 7). [0060] Similarly, output element o 2 1 of output data matrix 206 2 is the sum of the dot products of weight set 202 2 and the first block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 3 1 of output data matrix 206 3 is the sum of the dot products of weight set 202 3 and the first block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And, output element o 4 1 of output data matrix 206 4 is the sum of the dot products of weight set 202 4 and the first block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. [0061] Output element o 1 2 of output data matrix 206 1 is the sum of the dot products of weight set 202 1 and the second block of activation elements within the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. The second block of activation elements within the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 includes a 1 2, a 1 3, a 1 7 and a 1 8; a 2 2, a 2 3, a 2 7 and a 2 8; a 3 2, a 3 3, a 3 7 and a 3 8; and a 4 2, a 4 3, a 4 7 and a 4 8, respectively. [0062] More particularly, the following dot products are summed to generate output element o 1 2: the dot product of the first weight matrix of weight set 202 1 and the second block of quadrant a 1 q1 (i.e., w 1 1 • a 1 2 + w 1 2 • a 1 3 + w 1 3 • a 1 7 + w 1 4 • a 1 8), the dot product of the second weight matrix of weight set 202 1 and the second block of quadrant a 2 q1 (i.e., w 1 5 • a 2 2 + w 1 6 • a 2 3 + w 1 7 • a 2 7 + w 1 8 • a 2 8), the dot product of the third weight matrix of weight set 202 1 and the second block of quadrant a 3 q1 (i.e., w 1 9 • a 3 2 + w 1 10 • a 3 3 + w 1 11 • a 3 7 + w 1 12 • a 3 8), and the dot product of the fourth weight matrix of weight set 202 1 and the second block of quadrant a 4 q1 (i.e., w 1 13 • a 4 2 + w 1 14 • a 4 3 + w 1 15 • a 4 7 + w 1 16 • a 4 8). [0063] Similarly, output element o 2 2 of output data matrix 206 2 is the sum of the dot products of weight set 202 2 and the second block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 3 2 of output data matrix 206 3 is the sum of the dot products of weight set 202 3 and the second block of activation elements within first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And, output element o 4 2 of output data matrix 206 4 is the sum of the dot products of weight set 202 4 and the second block of activation elements within the quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. [0064] And so on for output elements o 1 3 and o 1 4, o 2 3 and o 2 4, o 3 3 and o 3 4, and o 4 3 and o 4 4 of the first rows of output data matrices 206 1 , 206 2 , 206 3 and 206 4 . [0065] With respect to quadrant oq2, output element o 1 5 of output data matrix 206 1 is the sum of the dot products of weight set 202 1 and the first block of activation elements within second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 2 5 of output data matrix 206 2 is the sum of the dot products of weight set 202 2 and the first block of activation elements within second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 3 5 of output data matrix 206 3 is the sum of the dot products of weight set 202 3 and the first block of activation elements within second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And, output element o 4 5 of output data matrix 206 4 is the sum of the dot products of weight set 202 4 and the first block of activation elements within second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And so on for output elements o 1 6, o 1 7 and o 1 8, o 2 6, o 2 7 and o 2 8, o 3 6, o 3 7 and o 3 8, and o 4 6, o 4 7 and o 4 8 of the second rows of output data matrices 206 1 , 206 2 , 206 3 and 206 4 . [0066] With respect to quadrant oq3, output element o 1 9 of output data matrix 206 1 is the sum of the dot products of weight set 202 1 and the first block of activation elements within third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 2 9 of output data matrix 206 2 is the sum of the dot products of weight set 202 2 and the first block of activation elements within third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 3 9 of output data matrix 206 3 is the sum of the dot products of weight set 202 3 and the first block of activation elements within third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And, output element o 4 9 of output data matrix 206 4 is the sum of the dot products of weight set 202 4 and the first block of activation elements within third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And so on for output elements o 1 10, o 1 11 and o 1 12, o 2 10, o 2 11 and o 2 12, o 3 10, o 3 11 and o 3 12, and o 4 10, o 4 11 and o 4 12 of the third rows of output data matrices 206 1 , 206 2 , 206 3 and 206 4 . [0067] With respect to quadrant oq4, output element o 1 13 of output data matrix 206 1 is the sum of the dot products of weight set 202 1 and the first block of activation elements within fourth quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 2 13 of output data matrix 206 2 is the sum of the dot products of weight set 202 2 and the first block of activation elements within fourth quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. Output element o 3 13 of output data matrix 206 3 is the sum of the dot products of weight set 202 3 and the first block of activation elements within fourth quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And, output element o 4 13 of output data matrix 206 4 is the sum of the dot products of weight set 202 4 and the first block of activation elements within third quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4 of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , respectively. And so on for output elements o 1 14, o 1 15 and o 1 16, o 2 14, o 2 15 and o 2 16, o 3 14, o 3 15 and o 3 16, and o 4 14, o 4 15 and o 4 16 of the fourth rows of output data matrices 206 1 , 206 2 , 206 3 and 206 4 . [0068] FIG.3B depicts converted convolutional layer calculation 210 for a CNN, while FIG.3C depicts converted input data matrix 214, in accordance with an embodiment of the present disclosure. [0069] In one embodiment, the convolutional layer calculations for CNNs executing on central processor units (CPUs) may be converted into generic matrix multiplication (GEMM) operations, which may leverage GEMM-optimized software libraries. Convolution layer calculation 200 is converted into a GEMM operation by converting filters 202 into converted weight matrix 212, converting input feature maps 204 into converted input data matrix 214, and then multiplying converted weight matrix 212 and converted input data matrix 214 to generate converted output data matrix 216. Because simple matrix multiplication is performed rather than a convolution operation, each output element within converted output data matrix 216 is the dot product of one row of converted weight matrix 212 and one column of converted input data matrix 214. Converted output data matrix 216 is then reformed into output feature maps 206. [0070] Converted weight matrix 212 is a 4x16 matrix, and includes converted weight sets 212 1 , 212 2 , 212 3 and 212 4 . Weight set 202 1 is flattened to form converted weight set 212 1 , i.e., the first row, and includes weights w 1 1, w 1 2, w 1 3, w 1 4, w 1 5, w 1 6, w 1 7, w 1 8, w 1 9, w 1 10, w 1 11, w 1 12, w 1 13, w 1 14, w 1 15 and w 1 16. Weight set 202 2 is flattened to form converted weight set 212 2 , i.e., the second row, and includes weights w 2 1, w 2 2, w 2 3, w 2 4, w 2 5, w 2 6, w 2 7, w 2 8, w 2 9, w 2 10, w 2 11, w 2 12, w 2 13, w 2 14, w 2 15 and w 2 16. Weight set 202 3 is flattened to form converted weight set 212 3 , i.e., the third row, and includes weights w 3 1, w 3 2, w 3 3, w 3 4, w 3 5, w 3 6, w 3 7, w 3 8, w 3 9, w 3 10, w 3 11, w 3 12, w 3 13, w 3 14, w 3 15 and w 3 16. And, weight set 202 4 is flattened to form converted weight set 212 4 , i.e., the fourth row, and includes weights w 4 1, w 4 2, w 4 3, w 4 4, w 4 5, w 4 6, w 4 7, w 4 8, w 4 9, w 4 10, w 4 11, w 4 12, w 4 13, w 4 14, w 4 15 and w 4 16. [0071] Converted input data matrix 214 is a 16x16 matrix, and includes the blocks of each quadrant of input data matrices 204 1 , 204 2 , 204 3 and 204 4 , i.e., quadrants a 1 q1, a 1 q2, a 1 q3, a 1 q4, a 2 q1, a 2 q2, a 2 q3, a 2 q4, a 3 q1, a 3 q2, a 3 q3, a 3 q4, a 4 q1, a 4 q2, a 4 q3 and a 4 q4, respectively. Generally, each block is flattened to form a portion of a single column of converted input data matrix 214. [0072] More particularly, the first column of converted input matrix 214 includes the first blocks from quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1, i.e., activations a 1 1, a 1 2, a 1 6, a 1 7, a 2 1, a 2 2, a 2 6, a 2 7, a 3 1, a 3 2, a 3 6, a 3 7, a 4 1, a 4 2, a 4 6, and a 4 7. The second column of converted input matrix 214 includes the second blocks from quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1, i.e., activations a 1 2, a 1 3, a 1 7, a 1 8, a 2 2, a 2 3, a 2 7, a 2 8, a 3 2, a 3 3, a 3 7, a 3 8, a 4 2, a 4 3, a 4 7, and a 4 8. The third column of converted input matrix 214 includes the third blocks from quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1, i.e., activations a 1 3, a 1 4, a 1 8, a 1 9, a 2 3, a 2 4, a 2 8, a 2 9, a 3 3, a 3 4, a 3 8, a 3 9, a 4 3, a 4 4, a 4 8, and a 4 9. And, the fourth column of converted input matrix 214 includes the fourth blocks from quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1, i.e., activations a 1 4, a 1 5, a 1 9, a 1 10, a 2 4, a 2 5, a 2 9, a 2 10, a 3 4, a 3 5, a 3 9, a 3 10, a 4 4, a 4 5, a 4 9, and a 4 10. [0073] The remaining columns of converted input data matrix 214 are formed in a similar manner. The fourth to the eighth columns are formed from the blocks of quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2, the ninth to the twelfth columns are formed from the blocks of quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3, and the thirteenth to the sixteenth columns are formed from the blocks of quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4. [0074] Converted output data matrix 216 is a 4x16 matrix, and includes flattened versions of output data matrices 206 1 , 206 2 , 206 3 and 206 4 , i.e., converted output data matrices 216 1 , 216 2 , 216 3 and 216 4 . Converted output data matrix 216 may also be arranged into four quadrants oq1, oq2, oq3 and oq4, which include the same output elements as the four quadrants oq1, oq2, oq3 and oq4 of output feature maps 206. [0075] The calculation of the output elements in the first row of quadrant oq1 of converted output data matrix 216 follows. [0076] Output element o 1 1 is the dot product of the first row of converted weight matrix 212, i.e., converted weight set 212 1 , and the first column of converted input data matrix 214. More particularly, output element o 1 1 is equal to w 1 1 • a 1 1 + w 1 2 • a 1 2 + w 1 3 • a 1 6 + w 1 4 • a 1 7 + w 1 5 • a 2 1 + w 1 6 • a 2 2 + w 1 7 • a 2 6 + w 1 8 • a 2 7 + w 1 9 • a 3 1 + w 1 10 • a 3 2 + w 1 11 • a 3 6 + w 1 12 • a 3 7 + w 1 13 • a 4 1 + w 1 14 • a 4 2 + w 1 15 • a 4 6 + w 1 16 • a 4 7. As shown above, output element o 1 1 of converted output data matrix 216 is equal to output element o 1 1 of output feature maps 206. [0077] Output element o 1 2 is the dot product of the first row of converted weight matrix 212, i.e., converted weight set 212 1 , and the second column of converted input data matrix 214. More particularly, output element o 1 2 is equal to w 1 1 • a 1 2 + w 1 2 • a 1 3 + w 1 3 • a 1 7 + w 1 4 • a 1 8 + w 1 5 • a 2 2 + w 1 6 • a 2 3 + w 1 7 • a 2 7 + w 1 8 • a 2 8 + w 1 9 • a 3 2 + w 1 10 • a 3 3 + w 1 11 • a 3 7 + w 1 12 • a 3 8 + w 1 13 • a 4 2 + w 1 14 • a 4 3 + w 1 15 • a 4 7 + w 1 16 • a 4 8. As shown above, output element o 1 2 of converted output data matrix 216 is equal to output element o 1 2 of output feature maps 206. [0078] Output element o 1 3 is the dot product of the first row of converted weight matrix 212, i.e., converted weight set 212 1 , and the third column of converted input data matrix 214. More particularly, output element o 1 3 is equal to w 1 1 • a 1 3 + w 1 2 • a 1 4 + w 1 3 • a 1 8 + w 1 4 • a 1 9 + w 1 5 • a 2 3 + w 1 6 • a 2 4 + w 1 7 • a 2 8 + w 1 8 • a 2 9 + w 1 9 • a 3 3 + w 1 10 • a 3 4 + w 1 11 • a 3 8 + w 1 12 • a 3 9 + w 1 13 • a 4 3 + w 1 14 • a 4 4 + w 1 15 • a 4 8 + w 1 16 • a 4 9. As shown above, output element o 1 3 of converted output data matrix 216 is equal to output element o 1 3 of output feature maps 206. [0079] Output element o 1 4 is the dot product of the first row of converted weight matrix 212, i.e., converted weight set 212 1 , and the fourth column of converted input data matrix 214. More particularly, output element o 1 4 is equal to w 1 1 • a 1 4 + w 1 2 • a 1 5 + w 1 3 • a 1 9 + w 1 4 • a 1 10 + w 1 5 • a 2 4 + w 1 6 • a 2 5 + w 1 7 • a 2 9 + w 1 8 • a 2 10 + w 1 9 • a 3 4 + w 1 10 • a 3 5 + w 1 11 • a 3 9 + w 1 12 • a 3 10 + w 1 13 • a 4 4 + w 1 14 • a 4 5 + w 1 15 • a 4 9 + w 1 16 • a 4 10. As shown above, output element o 1 4 of converted output data matrix 216 is equal to output element o 1 4 of output feature maps 206. [0080] For the second row of quadrant oq1, output element o 2 1 is the dot product of the second row of converted weight matrix 212, i.e., converted weight set 212 2 , and the first column of converted input data matrix 214, output element o 2 2 is the dot product of the second row of converted weight matrix 212, i.e., converted weight set 212 2 , and the second column of converted input data matrix 214, output element o 2 3 is the dot product of the second row of converted weight matrix 212, i.e., converted weight set 212 2 , and the third column of converted input data matrix 214, and output element o 2 4 is the dot product of the second row of converted weight matrix 212, i.e., converted weight set 212 2 , and the fourth column of converted input data matrix 214. [0081] For the third row of quadrant oq1, output element o 3 1 is the dot product of the third row of converted weight matrix 212, i.e., converted weight set 212 3 , and the first column of converted input data matrix 214, output element o 3 2 is the dot product of the third row of converted weight matrix 212, i.e., converted weight set 212 3 , and the second column of converted input data matrix 214, output element o 3 3 is the dot product of the third row of converted weight matrix 212, i.e., converted weight set 212 3 , and the third column of converted input data matrix 214, and output element o 3 4 is the dot product of the third row of converted weight matrix 212, i.e., converted weight set 212 3 , and the fourth column of converted input data matrix 214. [0082] For the fourth row of quadrant o q 1, output element o 4 1 is the dot product of the fourth row of converted weight matrix 212, i.e., converted weight set 212 4 , and the first column of converted input data matrix 214, output element o 4 2 is the dot product of the fourth row of converted weight matrix 212, i.e., converted weight set 212 4 , and the second column of converted input data matrix 214, output element o 4 3 is the dot product of the fourth row of converted weight matrix 212, i.e., converted weight set 212 4 , and the third column of converted input data matrix 214, and output element o 4 4 is the dot product of the fourth row of converted weight matrix 212, i.e., converted weight set 212 4 , and the fourth column of converted input data matrix 214. [0083] The elements of the quadrants o q 2, o q 3 and o q 4 are calculated in a similar manner. [0084] FIG.4 depicts a data flow diagram 220 for MAC array 218. [0085] As noted above, GEMM operations may be implemented in a dedicated ANN hardware accelerator using an array of MAC units. In this embodiment, MAC array 218 is a systolic, output stationary array that implements converted convolution operation 210 using a 4x4 array of MAC units m 1 , …, m 16 . The orientation of transposed converted weight matrix 222, transposed converted input data matrix 224, and transposed converted output data matrix 226 relative to MAC array 218 simplifies illustration; other orientations are also contemplated. [0086] As discussed above, each MAC unit calculates a dot product, between a row of converted weight matrix 212 and a column of converted input data matrix 214, to generate an element of converted output data matrix 216. Generally, a MAC unit includes, inter alia, a multiplier, an adder and a storage register. Each MAC unit is reset by clearing or zeroing its storage register prior to, or at the start of, a new dot product calculation. [0087] Generally, the rows from converted weight matrix 212 are read from local memory, enter MAC array 218 at the first row of MAC units m 1 , m 2 , m 3 and m 4 , and propagate one MAC unit down at the beginning of each processing cycle. Similarly, the columns from converted input data matrix 214 are read from local memory, enter MAC array 218 at the first column of MAC units m 1 , m 5 , m 9 and m 13 , and propagate one MAC unit to the right at the beginning of each processing cycle. [0088] The dot product calculations performed by MAC unit m 1 for the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 are discussed in detail below, while the dot product calculations performed by the remaining MAC units of MAC array 218 are summarized below. [0089] MAC unit m 1 calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the first column of converted input data matrix 214 to generate element o 1 1 of converted output data matrix 216. During the processing cycle 1, MAC unit m 1 receives a 1 and w 1 1 from local memory, multiplies a 1 and w 1 1 to generate an intermediate product, adds the intermediate product to the value stored in the storage register (i.e., 0), and stores the accumulated result back in the storage register. During processing cycle 2, MAC unit m 1 transmits a 1 to MAC unit m 2 and w 1 1 to MAC unit m 5 , receives a 2 and w 1 2 from local memory, multiplies a 2 and w 1 2 to generate an intermediate product, adds the intermediate product to the value stored in the storage register, and stores the accumulated result back in the storage register. [0090] During processing cycle 3, MAC unit m 1 transmits a 2 to MAC unit m 2 and w 1 2 to MAC unit m 5 , receives a 6 and w 1 3 from local memory, multiplies a 6 and w 1 3 to generate an intermediate product, adds the intermediate product to the value stored in the storage register, and stores the accumulated result back in the storage register. During processing cycle 4, MAC unit m 1 transmits a 6 to MAC unit m 2 and w 1 3 to MAC unit m 5 , receives a 7 and w 1 4 from the local memory, multiplies a 7 and w 1 4 to generate an intermediate product, adds the intermediate product to the value stored in the storage register, and stores the accumulated result back in the storage register. [0091] Processing cycles 5 through 16 multiply and accumulate the remaining 12 elements of the first row of converted weight matrix 212 and the first column of converted input data matrix 214. At the end of the processing cycle 16, MAC unit m 1 outputs element o 1 1. [0092] The remainder of the first row of MAC array 218 includes MAC units m 2 , m 3 and m 4 . [0093] After an initial delay of one processing cycle, MAC unit m 2 receives weights from the first delay register ff 1 and input data from MAC unit m 1 , transmits weights to MAC unit m 6 and input data to MAC unit m 3 , and calculates the dot product of the second row of converted weight matrix 212 (i.e., converted weight set 212 2 ) and the first column of converted input data matrix 214 to generate element o 2 1 of converted output data matrix 216. The initial delay of one processing cycle allows the delay pipeline (i.e., delay register ff 1 ) to be filled with weights transferred from memory, and the input data to become available from MAC unit m 1 . At the end of the processing cycle 17, MAC unit m 2 outputs element o 2 1. [0094] After an initial delay of two processing cycles, MAC unit m 3 receives weights from the second delay register ff 2 and input data from MAC unit m 2 , transmits weights to MAC unit m 7 and input data to MAC unit m 4 , and calculates the dot product of the third row of converted weight matrix 212 (i.e., converted weight set 212 3 ) and the first column of converted input data matrix 214 to generate element o 3 1 of converted output data matrix 216. The initial delay of two processing cycles allows the delay pipeline (i.e., delay registers ff 1 and ff 2 ) to be filled with weights transferred from memory, and the input data to become available from MAC unit m 2 . At the end of processing cycle 18, MAC unit m 3 outputs element o 3 1. [0095] After an initial delay of three processing cycles, MAC unit m 4 receives weights from the third delay register ff 3 and input data from MAC unit m 3 , transmits weights to MAC unit m 8 , and calculates the dot product of the fourth row of converted weight matrix 212 (i.e., converted weight set 212 4 ) and the first column of converted input data matrix 214 to generate element o 4 1 of converted output data matrix 216. The initial delay of three processing cycles allows the delay pipeline (i.e., delay registers ff 1 , ff 2 and ff 3 ) to be filled with weights transferred from memory, and the input data to become available from MAC unit m 3 . At the end of processing cycle 19, MAC unit m 4 outputs element o 4 1. [0096] The second row of MAC array 218 includes MAC units m 5 , m 6 , m 7 and m 8 . [0097] After an initial delay of one processing cycle, MAC unit m 5 receives weights from MAC unit m 1 and input data from a first delay register ff 1 , transmits weights to MAC unit m 9 and input data to MAC unit m 6 , and calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the second column of converted input data matrix 214 to generate element o 1 2 of converted output data matrix 216. The initial delay of one processing cycle allows the delay pipeline (i.e., delay register ff 1 ) to be filled with input data transferred from memory, and the weights to become available from MAC unit m 1 . At the end of processing cycle 17, MAC unit m 5 outputs element o 1 2. [0098] After an initial delay of two processing cycles, MAC unit m 6 receives weights from MAC unit m 2 and input data from MAC unit m 5 , transmits weights to MAC unit m 1 0 and input data to MAC unit m 7 , and calculates the dot product of the second row of converted weight matrix 212 (i.e., converted weight set 212 2 ) and the second column of converted input data matrix 214 to generate element o 2 2 of converted output data matrix 216. The initial delay of two processing cycles allows the weights to become available from MAC unit m 2 , and the input data to become available from MAC unit m 5 . At the end of processing cycle 18, MAC unit m 6 outputs element o 2 2. [0099] After an initial delay of three processing cycles, MAC unit m 7 receives weights from MAC unit m 3 and input data from MAC unit m 6 , transmits weights to MAC unit m 11 and input data to MAC unit m 8 , and calculates the dot product of the third row of converted weight matrix 212 (i.e., converted weight set 212 3 ) and the second column of converted input data matrix 214 to generate element o 3 2 of converted output data matrix 216. The initial delay of three processing cycles allows the weights to become available from MAC unit m 3 , and the input data to become available from MAC unit m 6 . At the end of processing cycle 19, MAC unit m 7 outputs element o 3 2. [0100] After an initial delay of four processing cycles, MAC unit m 8 receives weights from MAC unit m 4 and input data from MAC unit m 7 , transmits weights to MAC unit m 12 , and calculates the dot product of the fourth row of converted weight matrix 212 (i.e., converted weight set 212 4 ) and the second column of converted input data matrix 214 to generate element o 4 2 of converted output data matrix 216. The initial delay of four processing cycles allows the weights to become available from MAC unit m 4 , and the input data to become available from MAC unit m 7 . At the end of processing cycle 20, MAC unit m 8 outputs element o 4 2. [0101] The third row of MAC array 218 includes MAC units m 9 , m 10 , m 11 and m 12 . [0102] After an initial delay of two processing cycles, MAC unit m 9 receives weights from MAC unit m 5 and input data from a second delay register ff 2 , transmits weights to MAC unit m 13 and input data to MAC unit m 10 , and calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the third column of converted input data matrix 214 to generate element o 1 3 of converted output data matrix 216. The initial delay of two processing cycles allows the delay pipeline (i.e., delay registers ff 1 and ff 2 ) to be filled with input data transferred from memory, and the weights to become available from MAC unit m 5 . At the end of processing cycle 18, MAC unit m 9 outputs element o 1 3. [0103] After an initial delay of three processing cycles, MAC unit m 10 receives weights from MAC unit m 6 and input data from MAC unit m 9 , transmits weights to MAC unit m 14 and input data to MAC unit m 11 , and calculates the dot product of the second row of converted weight matrix 212 (i.e., converted weight set 212 2 ) and the third column of converted input data matrix 214 to generate element o 2 3 of converted output data matrix 216. The initial delay of three processing cycles allows the weights to become available from MAC unit m 6 , and the input data to become available from MAC unit m 9 . At the end of processing cycle 19, MAC unit m 10 outputs element o 2 3. [0104] After an initial delay of four processing cycles, MAC unit m 11 receives weights from MAC unit m 7 and input data from MAC unit m 10 , transmits weights to MAC unit m 15 and input data to MAC unit m 12 , and calculates the dot product of the third row of converted weight matrix 212 (i.e., converted weight set 212 3 ) and the third column of converted input data matrix 214 to generate element o 3 3 of converted output data matrix 216. The initial delay of four processing cycles allows the weights to become available from MAC unit m 7 , and the input data to become available from MAC unit m 10 . At the end of processing cycle 20, MAC unit m 11 outputs element o 3 3. [0105] After an initial delay of five processing cycles, MAC unit m 12 receives weights from MAC unit m 8 and input data from MAC unit m 11 , transmits weights to MAC unit m 16 , and calculates the dot product of the fourth row of converted weight matrix 212 (i.e., converted weight set 212 4 ) and the third column of converted input data matrix 214 to generate element o 4 3 of converted output data matrix 216. The initial delay of five processing cycles allows the weights to become available from MAC unit m 8 , and the input data to become available from MAC unit m 11 . At the end of processing cycle 21, MAC unit m 12 outputs element o 4 3. [0106] The fourth row of MAC array 218 includes MAC units m 13 , m 14 , m 15 and m 16 . [0107] After an initial delay of three processing cycles, MAC unit m 13 receives weights from MAC unit m 9 and input data from a third delay register ff 3 , transmits input data to MAC unit m 14 , and calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the fourth column of converted input data matrix 214 to generate element o 1 4 of converted output data matrix 216. The initial delay of three processing cycles allows the delay pipeline (i.e., delay registers ff 1 , ff 2 and ff 3 ) to be filled with input data transferred from memory, and the weights to become available from MAC unit m 9 . At the end of processing cycle 19, MAC unit m 13 outputs element o 1 4. [0108] After an initial delay of four processing cycles, MAC unit m 14 receives weights from MAC unit m 10 and input data from MAC unit m 13 , transmits input data to MAC unit m 15 , and calculates the dot product of the second row of converted weight matrix 212 (i.e., converted weight set 212 2 ) and the fourth column of converted input data matrix 214 to generate element o 2 4 of converted output data matrix 216. The initial delay of four processing cycles allows the weights to become available from MAC unit m 10 , and the input data to become available from MAC unit m 13 . At the end of processing cycle 20, MAC unit m 14 outputs element o 2 4. [0109] After an initial delay of five processing cycles, MAC unit m 15 receives weights from MAC unit m 11 and input data from MAC unit m 14 , transmits input data to MAC unit m 16 , and calculates the dot product of the third row of converted weight matrix 212 (i.e., converted weight set 212 3 ) and the fourth column of converted input data matrix 214 to generate element o 3 4 of converted output data matrix 216. The initial delay of five processing cycles allows the weights to become available from MAC unit m 11 , and the input data to become available from MAC unit m 14 . At the end of processing cycle 21, MAC unit m 15 outputs element o 3 4. [0110] After an initial delay of six processing cycles, MAC unit m 16 receives weights from MAC unit m 12 and input data from MAC unit m 15 , and calculates the dot product of the fourth row of converted weight matrix 212 (i.e., converted weight set 212 4 ) and the fourth column of converted input data matrix 214 to generate element o 4 4 of converted output data matrix 216. The initial delay of six processing cycles allows the weights to become available from MAC unit m 12 , and the input data to become available from MAC unit m 15 . At the end of processing cycle 22, MAC unit m 16 outputs element o 4 4. [0111] After the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 have been processed, the next sequence of operations processes the blocks of the second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2. After the blocks of the second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 have been processed, the next sequence of operations processes the blocks of the third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3. And, after the blocks of the third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 have been processed, the final sequence of operations processes the blocks of the fourth quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4. Converted weight matrix 212 is accessed for each sequence of operations. [0112] Unfortunately, for CNNs executing on CPUs or other coprocessors, GEMM operations consume a significant number of processor cycles due to the large number of multiplications that are required. For example, one known image recognition CNN requires 3 giga operations per second (GOPS) per input data frame. Compounding this problem, many of the matrices upon which the GEMM operations are performed are sparse, which produces a very inefficient use of processing resources. Conversely, if GEMM operations could significantly reduce “multiply by zero” conditions, processing and power requirements could be significantly reduced. [0113] Certain approaches that attempt to reduce “multiply by zero” conditions complicate the GEMM operations and introduce significant processing overhead on the CPU. Additionally, other approaches fail when applied to activations due to the dynamic variation of the position of the zero values in the input feature maps during the inference. Because of this difficulty, ANN accelerators maintain the input feature maps in a dense or uncompressed form, even though the input feature maps typically contain a significant amount of activations that have a value of zero (e.g., greater than 60%). [0114] Embodiments of the present disclosure advantageously compress the input feature maps during inference by dynamically removing or pruning smaller value activations (including zero values), lower the memory footprint of the activation memory by factor greater than 2x, reduce the power consumption related to activation memory accesses (e.g., DRAM, SRAM, cache, etc.), and increase the effective processing throughput by factor greater than 2x for a MAC array. [0115] FIG.5A depicts input feature maps 204 from FIG.3A, in accordance with an embodiment of the present disclosure. As discussed above, input feature maps 204 include one 5x5 input data matrix for each channel, i.e., input data matrices 204 1 , 204 2 , 204 3 and 204 4 . [0116] FIG.5B depicts basic blocks 304, in accordance with an embodiment of the present disclosure. [0117] Generally, input feature maps 204 may be decomposed into 25 basic blocks 304 along the depth or channel dimension. Each basic block is a 1x1xb tensor, and includes b activation values. The depth, b, is a hyperparameter having a value of 4, 8, 16, etc. In this embodiment, b equals 4, i.e., the number of channels. [0118] Basic block 3041 includes activations a 1 1, a 2 1, a 3 1 and a 4 1, basic block 3042 includes activations a 1 2, a 2 2, a 3 2 and a 4 2, basic block 304 3 includes activations a 1 3, a 2 3, a 3 3 and a 4 3, basic block 304 4 includes activations a 1 4, a 2 4, a 3 4 and a 4 4, and basic block 3045 includes activations a 1 5, a 2 5, a 3 5 and a 4 5. [0119] Basic blocks 304 6 , 304 7 , 304 8 , 304 9 , 304 10 , 304 11 , 304 12 , 304 13 , 304 14 , 304 15 , 304 16 , 304 17 , 304 18 , 304 19 and 304 20 , indicated by the ellipses, are not depicted for clarity. Basic block 3046 includes activations a 1 6, a 2 6, a 3 6 and a 4 6, basic block 304 7 includes activations a 1 7, a 2 7, a 3 7 and a 4 7, basic block 3048 includes activations a 1 8, a 2 8, a 3 8 and a 4 8, basic block 304 9 includes activations a 1 9, a 2 9, a 3 9 and a 4 9, basic block 304 10 includes activations a 1 10, a 2 10, a 3 10 and a 4 10, basic block 304 11 includes activations a 1 11, a 2 11, a 3 11 and a 4 11, basic block 304 12 includes activations a 1 12, a 2 12, a 3 12 and a 4 12, basic block 304 13 includes activations a 1 13, a 2 13, a 3 13 and a 4 13, basic block 30414 includes activations a 1 14, a 2 14, a 3 14 and a 4 14, basic block 30415 includes activations a 1 15, a 2 15, a 3 15 and a 4 15, basic block 304 16 includes activations a 1 16, a 2 16, a 3 16 and a 4 16, basic block 304 17 includes activations a 1 17, a 2 17, a 3 17 and a 4 17, basic block 304 18 includes activations a 1 18, a 2 18, a 3 18 and a 4 18, basic block 30419 includes activations a 1 19, a 2 19, a 3 19 and a 4 19, and basic block 304 20 includes activations a 1 20, a 2 20, a 3 20 and a 4 20. [0120] Basic block 304 21 includes activations a 1 21, a 2 21, a 3 21 and a 4 21, basic block 304 22 includes activations a 1 22, a 2 22, a 3 22 and a 4 22, basic block 30423 includes activations a 1 23, a 2 23, a 3 23 and a 4 23, basic block 304 24 includes activations a 1 24, a 2 24, a 3 24 and a 4 24, and basic block 304 25 includes activations a 1 25, a 2 25, a 3 25 and a 4 25. [0121] FIG.5C depicts basic block matrices 314, in accordance with an embodiment of the present disclosure. [0122] Basic blocks 304 may be reformed as 25 respective basic block matrices 314, i.e., basic block matrices 314 1 , 314 2 , 314 3 , 314 4 , 314 5 , 314 6 , 314 7 , 314 8 , 314 9 , 314 10 , 314 11 , 314 12 , 314 13 , 314 14 , 314 15 , 314 16 , 314 17 , 314 18 , 314 19 , 314 20 , 314 21 , 314 22 , 314 23 , 314 24 , and 314 25 . Each basic block matrix 314 has 4 rows and a single column (4x1), and the same activations elements as the respective basic block 304. For example, basic block 3041 and basic block matrix 314 1 both include activations a 1 1, a 2 1, a 3 1 and a 4 1. [0123] Because input feature maps 204 have been reformed into basic block matrices 314, dynamic activation pruning (DAP) may be easily effected across the channel dimension rather than the height and width dimensions, which advantageously avoids adverse effects on the local data within any particular input data matrix. A sparsity value, p, is initially selected, such as, for example, 25%, 50%, 75%., etc. In this embodiment, p is 0.5 (or 50%), and half of the values in basic block matrices 314 will have a value of 0 after pruning. Advantageously, the positions of the zeros within each basic block matrix 314 will be random due to the nature of DAP. [0124] FIG.6A depicts a data flow diagram 300 for a portion of a training process for CNN 15, according to an embodiment of the present disclosure. [0125] In order to compress the input feature maps during inference, CNN 15 is first trained using a DAP process in the forward path of the convolutional layer calculations. For example, data flow diagram 300 depicts a portion of the training process for CNN 15 that includes converted convolutional layer calculation 210. During the forward phase, filter 202 is provided to converted convolutional layer calculation 210. Input feature maps are first provided to DAP process 302, which creates, prunes and compresses basic block matrices 314, and then provides compressed basic block matrices 324 to converted convolutional layer calculation 210, as described below. Converted convolutional layer calculation 210 then generates output feature maps 206, which are provided to the next layer of CNN 15. During the backward phase, the gradients are backpropagated and weight sets 202 1 , 202 2 , 202 3 and 202 4 within filter 202 are updated. [0126] In one embodiment, DAP process 302 creates basic block matrices 314 based on the input feature maps, selects a number (“k”) of the largest activation values for each basic block matrix 314 based on the magnitude of the activation values and the sparsity value, prunes the remaining activation values in each basic block matrix 314 by setting the values to 0, and generates each compressed basic block matrix 324 by discarding the zero-valued activations from the basic block matrix 314. In other embodiments, each compressed basic block matrix 324 may be formed directly from the identified activation values within the corresponding basic block matrix 314. A mask is generated for each basic block matrix 314 to identify the selected activation values, as described below. [0127] During training, DAP process 302 may be implemented by the processor that is hosting the training process for CNN 15, such as, for example, a graphics processing unit (GPU), neural processing unit (NPU), central processing unit (CPU), etc. During inference, DAP process 302 must be efficiently executed, which includes identifying or selecting the largest “k” activation values for each basic block matrix 314. In many embodiments, a DAP selection circuit may be implemented in hardware, such as, for example, for low power mobile device applications, while in other embodiments, DAP selection may be implemented in software. [0128] FIG.6B depicts a block diagram of DAP selection circuit 306, in accordance with an embodiment of the present disclosure. [0129] DAP selection circuit 306 may select activation values for basic block matrices that have eight activation elements. Other configurations of basic block matrices are also contemplated. DAP selection circuit 306 includes input registers 330, i.e., x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 and x 8 , magnitude compactors 341, 342, 343, 344, 345, 346 and 347, and 8-bit output register 350 that includes output bits b 1 , b 2 , b 3 , b 4 , b 5 , b 6 , b 7 and b 8 . Each input register 330 stores one activation value, and includes an enable bit 332 to allow the stored activation value to be included or excluded from the selection process. Each output bit is associated with a respective input register 330, i.e., output bit b 1 is associated with input register x 1 , and so on. [0130] Magnitude compactor 341 has two inputs coupled to input register x 1 and x 2 , and an output. Magnitude compactor 342 has two inputs coupled to input register x 3 and x 4 , and an output. Magnitude compactor 343 has two inputs coupled to input register x 5 and x 6 , and an output. Magnitude compactor 344 has two inputs coupled to input register x 7 and x 8 , and an output. Magnitude compactor 345 has two inputs coupled to the outputs of magnitude compactors 341 and 342, and an output. Magnitude compactor 346 has two inputs coupled to the outputs of magnitude compactors 343 and 344, and an output. Magnitude compactor 347 has two inputs coupled to the outputs of magnitude compactors 345 and 346. [0131] Each magnitude compactor 341, 342, 343, 344, 345 and 346 receives two activation values, determines which activation value has the greater magnitude, and then passes the activation value with the greater magnitude to the next magnitude compactor in the chain. Magnitude compactor 347 receives the final two activation values, determines which activation value has the greater magnitude, and sets the respective output bit within output register 350. [0132] If the basic block matrices include 8 activations values and the sparsity value is 0.5 (50%), DAP selection circuit 306 may be executed four times to select the four largest activation values. Alternatively, 4 DAP selection circuits 306 may be executed simultaneously to select the four largest activation values. [0133] FIG.6C depicts a block diagram of DAP selection circuit 308, in accordance with an embodiment of the present disclosure. [0134] DAP may select activation values for basic block matrices that have four activation elements, e.g., basic block matrices 314. DAP selection circuit 308 includes input registers 330, i.e., x 1 , x 2 , x 3 and x 4 , magnitude compactors 341, 342 and 347, and 4-bit output register 350 that includes output bits b 1 , b 2 , b 3 and b 4 . Each input register 330 stores one activation value, and includes an enable bit 332 to allow the stored activation value to be included or excluded from the selection process. Each output bit is associated with a respective input register 330, i.e., output bit b 1 is associated with input register x 1 , and so on. [0135] Magnitude compactor 341 has two inputs coupled to input register x 1 and x 2 , and an output. Magnitude compactor 342 has two inputs coupled to input register x 3 and x 4 , and an output. Magnitude compactor 347 has two inputs coupled to the outputs of magnitude compactors 341 and 342. Each magnitude compactor 341 and 342 receives two activation values, determines which activation value has the greater magnitude, and then passes the activation value with the greater magnitude to magnitude compactor 347. Magnitude compactor 347 receives the final two activation values, determines which activation value has the greater magnitude, and sets the respective output bit within output register 350. [0136] In the embodiment discussed above, basic block matrices 314 each have 4 activation values, b equals 4, k equals 4, and, in one example, p equals 0.5 (50%). In order to determine the 2 largest activation values within a particular basic block matrix 314, DAP selection circuit 308 is executed twice, and output register 350 stores the 4-bit mask for that particular basic block matrix 314. Two of the bits will be set to 1, indicating that the respective activation values have been selected, and two of the bits will be set to 0, indicating that the respective activation values may be discarded during the compression process. [0137] For example, basic block matrix 314 1 includes four elements, i.e., activations a 1 1, a 2 1, a 3 1 and a 4 1, and, in one example, a 1 1 › a 3 1 › a 2 1 › a 4 1. During the first execution of DAP selection circuit 308, activation a 1 1 is stored in input register x 1 and the enable bit is set to 1, activation a 2 1 is stored in input register x 2 and the enable bit is set to 1, activation a 3 1 is stored in input register x 2 and the enable bit is set to 1, and activation a 4 1 is stored in input register x 4 and the enable bit is set to 1. Magnitude compactor 341 determines that a 1 1 › a 2 1, and outputs a 1 1 to magnitude compactor 347. Magnitude compactor 342 determines that a 3 1 › a 4 1, and outputs a 3 1 to magnitude compactor 347. Magnitude compactor 347 determines that a 1 1 › a 3 1, and sets bit b 1 in output register 250 to 1, and bits b 2 , b 3 and b 4 in output register 250 to 0. [0138] During the second execution of DAP selection circuit 308, the enable bit for input register x 1 is set to 0 to prevent activation a 1 1 from being provided to magnitude compactor 341. Magnitude compactor 341 determines that a 2 1 › 0 (i.e., the value that replaced a 1 1), and outputs a 2 1 to magnitude compactor 347. Magnitude compactor 342 determines that a 3 1 › a 4 1, and outputs a 3 1 to magnitude compactor 347. Magnitude compactor 347 determines that a 3 1 › a 2 1, and sets bit b 3 in output register 250 to 1. Output register 250 now stores the mask for basic block matrix 314 1 , which is “1010”. [0139] In another embodiment, an index set may be generated for each basic block matrix 314 rather than a mask. The index set includes two index values that indicate which activation values have the greatest magnitude. For example, the index set for basic block matrix 314 1 would be { 0,2 }, which indicates that the first and the third elements of basic block matrix 314 1 have the greatest magnitude. The index values may start at 0 or 1. [0140] FIG.7A depicts basic block matrices 314 after DAP selection, in accordance with an embodiment of the present disclosure. [0141] After DAP selection, each basic block matrix 314 includes two activation values and two 0 values, as well as the associated mask (or index set). [0142] Basic block matrix 314 1 includes activations a 1 1 and a 3 1 and mask ”1010”. Basic block matrix 314 2 includes activations a 2 2 and a 4 2 and mask ”0101”. Basic block matrix 314 3 includes activations a 1 3 and a 4 3 and mask ”1001”. Basic block matrix 314 4 includes activations a 1 4 and a 2 4 and mask ”1100”. Basic block matrix 314 5 includes activations a 2 5 and a 3 5 and mask ”0110”. Basic block matrix 314 6 includes activations a 2 6 and a 4 6 and mask ”0101”. Basic block matrix 314 7 includes activations a 1 7 and a 4 7 and mask ”1001”. Basic block matrix 314 8 includes activations a 1 8 and a 2 8 and mask ”1100”. Basic block matrix 314 9 includes activations a 2 9 and a 3 9 and mask ”0110”. Basic block matrix 314 10 includes activations a 1 10 and a 3 10 and mask ”1010”. [0143] Basic block matrix 314 11 includes activations a 1 11 and a 4 11 and mask ”1001”. Basic block matrix 314 12 includes activations a 1 12 and a 2 12 and mask ”1100”. Basic block matrix 314 13 includes activations a 2 13 and a 3 13 and mask ”0110”. Basic block matrix 314 14 includes activations a 1 14 and a 3 14 and mask ”1010”. Basic block matrix 314 15 includes activations a 2 15 and a 4 15 and mask ”0101”. Basic block matrix 314 16 includes activations a 1 16 and a 2 16 and mask ”1100”. Basic block matrix 314 17 includes activations a 2 17 and a 3 17 and mask ”0110”. Basic block matrix 314 18 includes activations a 1 18 and a 3 18 and mask ”1010”. Basic block matrix 314 19 includes activations a 2 19 and a 4 19 and mask ”0101”. Basic block matrix 314 20 includes activations a 1 20 and a 4 20 and mask ”1001”. [0144] Basic block matrix 314 21 includes activations a 2 21 and a 3 1 and mask ”0110”. Basic block matrix 314 22 includes activations a 1 22 and a 3 22 and mask ”1010”. Basic block matrix 314 23 includes activations a 2 23 and a 4 23 and mask ”0101”. Basic block matrix 314 24 includes activations a 1 24 and a 4 24 and mask ”1001”. Basic block matrix 314 25 includes activations a 1 25 and a 2 25 and mask ”1100”. [0145] FIG.7B depicts compressed basic block matrices 324, in accordance with an embodiment of the present disclosure. [0146] After DAP selection, compressed basic block matrices 324 are generated, based on the mask or index, by removing the 0 values from basic block matrices 314 which resizes each basic block matrix 314 from 4x1 to 2x1. For example, if the sparsity is 50%, each basic block matrix 314 is compressed into half of its original size plus a small amount of meta data for the mask or index. The compression rate for 8-bit activations is 64 / (32+8) = 8 / 5 = 1.60. [0147] Compressed basic block matrix 324 1 includes activations a 1 1 and a 3 1 and mask ”1010”. Compressed basic block matrix 324 2 includes activations a 2 2 and a 4 2 and mask ”0101”. Compressed basic block matrix 324 3 includes activations a 1 3 and a 4 3 and mask ”1001”. Compressed basic block matrix 324 4 includes activations a 1 4 and a 2 4 and mask ”1100”. Compressed basic block matrix 324 5 includes activations a 2 5 and a 3 5 and mask ”0110”. Compressed basic block matrix 324 6 includes activations a 2 6 and a 4 6 and mask ”0101”. Compressed basic block matrix 324 7 includes activations a 1 7 and a 4 7 and mask ”1001”. Compressed basic block matrix 324 8 includes activations a 1 8 and a 2 8 and mask ”1100”. Compressed basic block matrix 324 9 includes activations a 2 9 and a 3 9 and mask ”0110”. Compressed basic block matrix 324 10 includes activations a 1 10 and a 3 10 and mask ”1010”. [0148] Compressed basic block matrix 324 11 includes activations a 1 11 and a 4 11 and mask ”1001”. Compressed basic block matrix 324 12 includes activations a 1 12 and a 2 12 and mask ”1100”. Compressed basic block matrix 324 13 includes activations a 2 13 and a 3 13 and mask ”0110”. Compressed basic block matrix 324 14 includes activations a 1 14 and a 324 and mask ”1010”. Compressed basic block matrix 324 15 includes activations a 2 15 and a 4 15 and mask ”0101”. Compressed basic block matrix 324 16 includes activations a 1 16 and a 2 16 and mask ”1100”. Compressed basic block matrix 324 17 includes activations a 2 17 and a 3 17 and mask ”0110”. Compressed basic block matrix 3241 8 includes activations a 1 18 and a 3 18 and mask ”1010”. Compressed basic block matrix 3241 9 includes activations a 2 19 and a 4 19 and mask ”0101”. Compressed basic block matrix 324 20 includes activations a 1 20 and a 4 20 and mask ”1001”. [0149] Compressed basic block matrix 324 21 includes activations a 2 21 and a 3 1 and mask ”0110”. Compressed basic block matrix 324 22 includes activations a 1 22 and a 3 22 and mask ”1010”. Compressed basic block matrix 324 23 includes activations a 2 23 and a 4 23 and mask ”0101”. Compressed basic block matrix 324 24 includes activations a 1 24 and a 4 24 and mask ”1001”. Compressed basic block matrix 324 25 includes activations a 1 25 and a 2 25 and mask ”1100”. [0150] FIGS.8A, 8B, 8C and 8D depict weight matrix re-sequencing and converted input data matrix re-sequencing and compression, in accordance with an embodiment of the present disclosure. [0151] FIG.8A depicts weight matrix re-sequencing and converted input data matrix re-sequencing and compression for output element o 1 1 of converted output data matrix 216. Output element o 1 1 is equal to the dot product of the first row of converted weight matrix 212, i.e., converted weight set 212 1 , and the first column of converted input data matrix 214, as follows: o 1 1 = w 1 1 • a 1 1 + w 1 2 • a 1 2 + w 1 3 • a 1 6 + w 1 4 • a 1 7 + w 1 5 • a 2 1 + w 1 6 • a 2 2 + w 1 7 • a 2 6 + w 1 8 • a 2 7 + w 1 9 • a 3 1 + w 1 10 • a 3 2 + w 1 11 • a 3 6 + w 1 12 • a 3 7 + w 1 13 • a 4 1 + w 1 14 • a 4 2 + w 1 15 • a 4 6 + w 1 16 • a 4 7 [0152] The dot product of the first row of converted weight matrix 212 and the first column of converted input data matrix 214 may be re-sequenced as follows: o 1 1 = (w 1 1 • a 1 1 + w 1 5 • a 2 1 + w 1 9 • a 3 1 + w 1 13 • a 4 1) + (w 1 2 • a 2 2 + w 1 6 • a 2 2 + w 1 10 • a 3 2 + w 1 14 • a 4 2) + (w 1 3 • a 1 6 + w 1 7 • a 2 6 + w 1 11 • a 3 6 + w 1 15 • a 4 6) + (w 1 4 • a 1 7 + w 1 8 • a 2 7 + w 1 12 • a 3 7 + w 1 16 • a 4 7) [0153] It is clear that the first column of converted input data matrix 214 includes four, interspersed basic block matrices 314, i.e., basic block matrix 314 1 (activations a 1 1, a 2 1, a 3 1 and a 4 1), basic block matrix 314 2 (activations a 1 2, a 2 2, a 3 2 and a 4 2), basic block matrix 314 6 (activations a 1 6, a 2 6, a 3 6 and a 4 6) and basic block matrix 314 7 (activations a 1 7, a 2 7, a 3 7 and a 4 7). [0154] Advantageously, the first column of converted input data matrix 214 may be re-sequenced into basic block matrices 314 1 , 314 2 , 314 6 and 314 7 , and then basic block matrices 314 1 , 314 2 , 314 6 and 314 7 may be compressed and replaced by compressed basic block matrices 324 1 , 324 2 , 324 6 and 324 7 . Converted weight set 212 1 may also be re-sequenced to generate four weight groups 322; each weight group 322 corresponds to one of basic block matrices 314 1 , 314 2 , 314 6 and 314 7 . The first weight group includes w 1 1, w 1 5, w 1 9 and w 1 13, the second weight group includes w 1 2, w 1 6, w 1 10 and w 1 14, the third weight group includes w 1 3, w 1 7, w 1 11 and w 1 15, and the fourth weight group includes w 1 4, w 1 8, w 1 12 and w 1 16. [0155] FIG.8B depicts weight matrix re-sequencing and converted input data matrix re-sequencing and compression for output element o 2 2 of converted output data matrix 216. Output element o 2 2 is equal to the dot product of the second row of converted weight matrix 212, i.e., converted weight set 212 2 , and the second column of converted input data matrix 214, as follows: o 2 2 = w 2 1 • a 1 2 + w 2 2 • a 1 3 + w 2 3 • a 1 7 + w 2 4 • a 1 8 + w 2 5 • a 2 2 + w 2 6 • a 2 3 + w 2 7 • a 2 7 + w 2 8 • a 2 8 + w 2 9 • a 3 2 + w 2 10 • a 3 3 + w 2 11 • a 3 7 + w 2 12 • a 3 8 + w 2 13 • a 4 2 + w 2 14 • a 4 3 + w 2 15 • a 4 7 + w 2 16 • a 4 8 [0156] The dot product of the second row of converted weight matrix 212 and the second column of converted input data matrix 214 may be re-sequenced as follows: o 2 2 = (w 2 1 • a 1 2 + w 2 5 • a 2 2 + w 2 9 • a 3 2 + w 2 13 • a 4 2) + (w 2 2 • a 2 3 + w 2 6 • a 2 3 + w 2 10 • a 3 3 + w 2 14 • a 4 3) + (w 2 3 • a 1 7 + w 2 7 • a 2 7 + w 2 11 • a 3 7 + w 2 15 • a 4 7) + (w 2 4 • a 1 8 + w 2 8 • a 2 8 + w 2 12 • a 3 8 + w 2 16 • a 4 8) [0157] It is clear that the second column of converted input data matrix 214 includes four, interspersed basic block matrices 314, i.e., basic block matrix 314 2 (activations a 1 2, a 2 2, a 3 2 and a 4 2), basic block matrix 314 3 (activations a 1 3, a 2 3, a 3 3 and a 4 3), basic block matrix 314 7 (activations a 1 7, a 2 7, a 3 7 and a 4 7) and basic block matrix 314 8 (activations a 1 8, a 2 8, a 3 8 and a 4 8). [0158] Advantageously, the second column of converted input data matrix 214 may be re-sequenced into basic block matrices 314 2 , 314 3 , 314 7 and 314 8 , and then basic block matrices 314 2 , 314 3 , 314 7 and 314 8 may be compressed and replaced by compressed basic block matrices 324 2 , 324 3 , 324 7 and 324 8 . Converted weight set 212 2 may also be re-sequenced to generate four weight groups 322; each weight group 322 corresponds to one of basic block matrices 314 2 , 314 3 , 314 7 and 314 8 . The first weight group includes w 2 1, w 2 5, w 2 9 and w 2 13, the second weight group includes w 2 2, w 2 6, w 2 10 and w 2 14, the third weight group includes w 2 3, w 2 7, w 2 11 and w 2 15, and the fourth weight group includes w 2 4, w 2 8, w 2 12 and w 2 16. [0159] FIG.8C depicts weight matrix re-sequencing and converted input data matrix re-sequencing and compression for output element o 3 3 of converted output data matrix 216. Output element o 3 3 is equal to the dot product of the third row of converted weight matrix 212, i.e., converted weight set 212 3 , and the third column of converted input data matrix 214, as follows: o 3 3 = w 3 1 • a 1 3 + w 3 2 • a 1 4 + w 3 3 • a 1 8 + w 3 4 • a 1 9 + w 3 5 • a 2 3 + w 3 6 • a 2 4 + w 3 7 • a 2 8 + w 3 8 • a 2 9 + w 3 9 • a 3 3 + w 3 10 • a 3 4 + w 3 11 • a 3 8 + w 3 12 • a 3 9 + w 3 13 • a 4 3 + w 3 14 • a 4 4 + w 3 15 • a 4 8 + w 3 16 • a 4 9 [0160] The dot product of the third row of converted weight matrix 212 and the third column of converted input data matrix 214 may be re-sequenced as follows: o 3 3 = (w 3 1 • a 1 3 + w 3 5 • a 2 3 + w 3 9 • a 3 3 + w 3 13 • a 4 3) + (w 3 2 • a 2 4 + w 3 6 • a 2 4 + w 3 10 • a 3 4 + w 3 14 • a 4 4) + (w 3 3 • a 1 8 + w 3 7 • a 2 8 + w 3 11 • a 3 8 + w 3 15 • a 4 8) + (w 3 4 • a 1 9 + w 3 8 • a 2 9 + w 3 12 • a 3 9 + w 3 16 • a 4 9) [0161] It is clear that the third column of converted input data matrix 214 includes four, interspersed basic block matrices 314, i.e., basic block matrix 314 3 (activations a 1 3, a 2 3, a 3 3 and a 4 3), basic block matrix 314 4 (activations a 1 4, a 2 4, a 3 4 and a 4 4), basic block matrix 314 8 (activations a 1 8, a 2 8, a 3 8 and a 4 8) and basic block matrix 314 9 (activations a 1 9, a 2 9, a 3 9 and a 4 9). [0162] Advantageously, the third column of converted input data matrix 214 may be re-sequenced into basic block matrices 314 3 , 314 4 , 314 8 and 314 9 , and then basic block matrices 314 3 , 314 4 , 314 8 and 314 9 may be compressed and replaced by compressed basic block matrices 324 3 , 324 4 , 324 8 and 324 9 . Converted weight set 212 3 may also be re-sequenced to generate four weight groups 322; each weight group 322 corresponds to one of basic block matrices 314 3 , 314 4 , 314 8 and 314 9 . The first weight group includes w 3 1, w 3 5, w 3 9 and w 3 13, the second weight group includes w 3 2, w 3 6, w 3 10 and w 3 14, the third weight group includes w 3 3, w 3 7, w 3 11 and w 3 15, and the fourth weight group includes w 3 4, w 3 8, w 3 12 and w 3 16. [0163] FIG.8D depicts weight matrix re-sequencing and converted input data matrix re-sequencing and compression for output element o 4 4 of converted output data matrix 216. Output element o 4 4 is equal to the dot product of the fourth row of converted weight matrix 212, i.e., converted weight set 212 4 , and the fourth column of converted input data matrix 214, as follows: o 4 4 = w 4 1 • a 1 4 + w 4 2 • a 1 5 + w 4 3 • a 1 9 + w 4 4 • a 1 10 + w 4 5 • a 2 4 + w 4 6 • a 2 5 + w 4 7 • a 2 9 + w 4 8 • a 2 10 + w 4 9 • a 3 4 + w 4 10 • a 3 5 + w 4 11 • a 3 9 + w 4 12 • a 3 10 + w 4 13 • a 4 4 + w 4 14 • a 4 5 + w 4 15 • a 4 9 + w 4 16 • a 4 10 [0164] The dot product of the fourth row of converted weight matrix 212 and the fourth column of converted input data matrix 214 may be re-sequenced as follows: o 4 4 = (w 4 1 • a 1 4 + w 4 5 • a 2 4 + w 4 9 • a 3 4 + w 4 13 • a 4 4) + (w 4 2 • a 2 5 + w 4 6 • a 2 5 + w 4 10 • a 3 5 + w 4 14 • a 4 5) + (w 4 3 • a 1 9 + w 4 7 • a 2 9 + w 4 11 • a 3 9 + w 4 15 • a 4 9) + (w 4 4 • a 1 10 + w 4 8 • a 2 10 + w 4 12 • a 3 10 + w 4 16 • a 4 10) [0165] It is clear that the fourth column of converted input data matrix 214 includes four, interspersed basic block matrices 314, i.e., basic block matrix 314 4 (activations a 1 4, a 2 4, a 3 4 and a 4 4), basic block matrix 314 5 (activations a 1 5, a 2 5, a 3 5 and a 4 5), basic block matrix 314 9 (activations a 1 9, a 2 9, a 3 9 and a 4 9) and basic block matrix 314 1 0 (activations a 1 10, a 2 10, a 3 10 and a 4 10). [0166] Advantageously, the fourth column of converted input data matrix 214 may be re-sequenced into basic block matrices 314 4 , 314 5 , 314 9 and 314 10 , and then basic block matrices 314 4 , 314 5 , 314 9 and 314 10 may be compressed and replaced by compressed basic block matrices 324 4 , 324 5 , 324 9 and 324 10 . Converted weight set 212 4 may also be re-sequenced to generate four weight groups 322; each weight group 322 corresponds to one of basic block matrices 314 4 , 314 5 , 314 9 and 314 10 . The first weight group includes w 4 1, w 4 5, w 4 9 and w 4 13, the second weight group includes w 4 2, w 4 6, w 4 10 and w 4 14, the third weight group includes w 4 3, w 4 7, w 4 11 and w 4 15, and the fourth weight group includes w 4 4, w 4 8, w 4 12 and w 4 16. [0167] This re-sequencing and compression may be performed in software or hardware. [0168] FIG.9 depicts a data flow diagram 360 for DAP MAC array 318, in accordance with an embodiment of the present disclosure. [0169] Each DAP MAC (DM) unit calculates a dot product, between a row of converted weight matrix 212 and a column of converted input data matrix 214, to generate an element of converted output data matrix 216. Generally, the rows from converted weight matrix 212 are read from local memory, re-sequenced, and provided to DAP MAC array 318 as a number of weight groups 322. Similarly, the columns from converted input data matrix 214 are read from local memory, re-sequenced and compressed, and provided to DAP MAC array 318 as a number of compressed basic block matrices 324. Each DAP MAC unit includes, inter alia, a data selection circuit, two or more multiplexers, two or more multipliers, an adder and a storage register, and is reset by clearing or zeroing its storage register prior to, or at the start of, a new dot product calculation. [0170] In this embodiment, each row of converted weight matrix 212 is re-sequenced and then divided into a number of weight groups, as discussed above. Each weight group from each row is simultaneously provided to all of the DAP MAC units in one column during a different processing cycle. [0171] More particularly, the re-sequenced weight groups of the first row of converted weight matrix 212 (i.e., converted weight matrix 212 1 ) are provided to the first column of DAP MAC units in DAP MAC array 318 (i.e., DM 1 , DM 5 , DM 9 and DM 13 ). The re-sequenced weight groups of the second row of converted weight matrix 212 (i.e., converted weight matrix 212 2 ) are provided to the second column of DAP MAC units in DAP MAC array 318 (i.e., DM 2 , DM 6 , DM 10 and DM 14 ). The re- sequenced weight groups of the third row of converted weight matrix 212 (i.e., converted weight matrix 212 3 ) are provided to the third column of DAP MAC units in DAP MAC array 318 (i.e., DM 3 , DM 7 , DM 11 and DM 15 ). The re-sequenced weight groups of the fourth row of converted weight matrix 212 (i.e., converted weight matrix 212 4 ) are provided to the fourth column of DAP MAC units in DAP MAC array 318 (i.e., DM 4 , DM 8 , DM 12 and DM 16 ). [0172] Similarly, each column of converted input data matrix 214 is re-sequenced and compressed into a number of compressed basic block matrices 324, as discussed above. Each compressed basic block matrix 324 from each column is simultaneously provided to all of the DAP MAC units in one row during a different processing cycle. [0173] More particularly, the compressed basic block matrices 324 of the first column of converted input data matrix 214 are provided to the first row of DAP MAC units in DAP MAC array 318 (i.e., DM 1 , DM 2 , DM 3 and DM 4 ). The compressed basic block matrices 324 of the 5 th , 9 th and 13 th columns are also provided to the first row of DAP MAC units during later processing cycles. The compressed basic block matrices 324 of the second column of converted input data matrix 214 are provided to the second row of DAP MAC units in DAP MAC array 318 (i.e., DM 5 , DM 6 , DM 7 and DM 8 ). The compressed basic block matrices 324 of the 6 th , 10 th and 14 th columns are also provided to the second row of DAP MAC units during later processing cycles. The compressed basic block matrices 324 of the third column of converted input data matrix 214 are provided to the third row of DAP MAC units in DAP MAC array 318 (i.e., DM 9 , DM 10 , DM 11 and DM 12 ). The compressed basic block matrices 324 of the 7 th , 11 th and 15 th columns are also provided to the third row of DAP MAC units during later processing cycles. The compressed basic block matrices 324 of the fourth column of converted input data matrix 214 are provided to the fourth row of DAP MAC units in DAP MAC array 318 (i.e., DM 13 , DM 14 , DM 15 and DM 16 ). The compressed basic block matrices 324 of the 8 th , 12 th and 16 th columns are also provided to the fourth row of DAP MAC units during later processing cycles. [0174] In another embodiment, the weights groups and compressed basic block matrices 324 may be provided to DAP MAC array 318 using delay registers or flip flops similar to those described for MAC array 218. While the principle of operation is the same, the number of delay registers for the rows of DAP MAC array 318 is doubled, i.e., two delay registers for the second row, four delay registers for the third row and six delay register for the fourth row, due to the presentation of two activation elements per compressed basic block matrix during each processing cycle. Similarly, the number of delay registers for the columns of DAP MAC array 318 is quadrupled, i.e., four delay registers for the second column, eight delay registers for the third column and 12 delay registers for the fourth column, due to the presentation of four weights per weight group during each processing cycle. Larger weight group sizes and compressed basic block matrix dimensions are also contemplated, which would require additional delay registers. [0175] The first row of DAP MAC array 318 includes DAP MAC units DM 1 , DM 2 , DM 3 and DM 4 . The dot product calculations performed by DM 1 for the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 are discussed in detail below, while the dot product calculations performed by DM 2 , DM 3 and DM 4 are summarized below. DM 1 calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the first column of converted input data matrix 214 to generate element o 1 1 of converted output data matrix 216. [0176] During the processing cycle 1, DM 1 receives w 1 1, w 1 5, w 1 9, w 1 13, a 1 1, a 3 1 and mask “1010” from local memory, selects w 1 1 and w 1 9 based on mask “1010”, multiplies w 1 1 and a 1 1 to generate a first intermediate product, multiples w 1 9 and a 3 1 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register (i.e., 0), and stores the accumulated result back in the storage register. [0177] During the processing cycle 2, DM 1 receives w 1 2, w 1 6, w 1 10, w 1 14, a 2 2, a 4 2 and mask “0101” from local memory, selects w 1 6 and w 1 14 based on mask “0101”, multiplies w 1 6 and a 2 2 to generate a first intermediate product, multiples w 1 14 and a 4 2 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0178] During the processing cycle 3, DM 1 receives w 1 3, w 1 7, w 1 11, w 1 15, a 2 6, a 4 6 and mask “0101” from local memory, selects w 1 7 and w 1 15 based on mask “0101”, multiplies w 1 7 and a 2 6 to generate a first intermediate product, multiples w 1 15 and a 4 6 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0179] During the processing cycle 4, DM 1 receives w 1 4, w 1 8, w 1 12, w 1 16, a 1 7, a 4 7 and mask “1001” from local memory, selects w 1 4 and w 1 16 based on mask “1001”, multiplies w 1 4 and a 2 7 to generate a first intermediate product, multiples w 1 16 and a 4 7 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. At the end of the processing cycle 4, DM 1 outputs element o 1 1. [0180] The remainder of the first row of DAP MAC array 318 includes DM 2 , DM 3 and DM 4 . These DAP MAC units operate in the same manner as DM 1 but receive weight groups from the second, third and fourth rows of converted weight matrix 212, respectively. [0181] The second row of DAP MAC array 318 includes DAP MAC units DM 5 , DM 6 , DM 7 and DM8. The dot product calculations performed by DM 5 for the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 are discussed in detail below, while the dot product calculations performed by DM 6 , DM 7 and DM8 are summarized below. DM 5 calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the second column of converted input data matrix 214 to generate element o 1 2 of converted output data matrix 216. [0182] During the processing cycle 1, DM 5 receives w 1 1, w 1 5, w 1 9, w 1 13, a 2 2, a 4 2 and mask “0101” from local memory, selects w 1 5 and w 1 13 based on mask “0101”, multiplies w 1 5 and a 2 2 to generate a first intermediate product, multiples w 1 13 and a 4 2 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register (i.e., 0), and stores the accumulated result back in the storage register. [0183] During the processing cycle 2, DM 5 receives w 1 2, w 1 6, w 1 10, w 1 14, a 1 3, a 4 3 and mask “1001” from local memory, selects w 1 2 and w 1 14 based on mask “1001”, multiplies w 1 2 and a 1 3 to generate a first intermediate product, multiples w 1 14 and a 4 3 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0184] During the processing cycle 3, DM 5 receives w 1 3, w 1 7, w 1 11, w 1 15, a 1 7, a 4 7 and mask “1001” from local memory, selects w 1 3 and w 1 15 based on mask “1001”, multiplies w 1 7 and a 1 7 to generate a first intermediate product, multiples w 1 15 and a 4 7 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0185] During the processing cycle 4, DM 5 receives w 1 4, w 1 8, w 1 12, w 1 16, a 1 8, a 2 8 and mask “1100” from local memory, selects w 1 4 and w 1 8 based on mask “1100”, multiplies w 1 4 and a 1 8 to generate a first intermediate product, multiples w 1 8 and a 2 8 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. At the end of the processing cycle 4, DM 5 outputs element o 1 2. [0186] The remainder of the second row of DAP MAC array 318 includes DM 6 , DM 7 and DM8. These DAP MAC units operate in the same manner as DM 5 but receive weight groups from the second, third and fourth rows of converted weight matrix 212, respectively. [0187] The third row of DAP MAC array 318 includes DAP MAC units DM 9 , DM 10 , DM 11 and DM 12 . The dot product calculations performed by DM 9 for the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 are discussed in detail below, while the dot product calculations performed by DM 10 , DM 11 and DM 12 are summarized below. DM 9 calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the third column of converted input data matrix 214 to generate element o 1 3 of converted output data matrix 216. [0188] During the processing cycle 1, DM 9 receives w 1 1, w 1 5, w 1 9, w 1 13, a 1 3, a 4 3 and mask “1001” from local memory, selects w 1 1 and w 1 13 based on mask “1001”, multiplies w 1 1 and a 1 3 to generate a first intermediate product, multiples w 1 13 and a 4 3 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register (i.e., 0), and stores the accumulated result back in the storage register. [0189] During the processing cycle 2, DM 9 receives w 1 2, w 1 6, w 1 10, w 1 14, a 1 4, a 2 4 and mask “1100” from local memory, selects w 1 2 and w 1 6 based on mask “1100”, multiplies w 1 2 and a 1 4 to generate a first intermediate product, multiples w 1 6 and a 2 4 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0190] During the processing cycle 3, DM 9 receives w 1 3, w 1 7, w 1 11, w 1 15, a 1 8, a 2 8 and mask “1100” from local memory, selects w 1 3 and w 1 7 based on mask “1100”, multiplies w 1 3 and a 1 8 to generate a first intermediate product, multiples w 1 7 and a 2 8 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0191] During the processing cycle 4, DM 9 receives w 1 4, w 1 8, w 1 12, w 1 16, a 2 9, a 3 9 and mask “0110” from local memory, selects w 1 8 and w 1 12 based on mask “0110”, multiplies w 1 8 and a 2 9 to generate a first intermediate product, multiples w 1 12 and a 3 9 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. At the end of the processing cycle 4, DM 9 outputs element o 1 3. [0192] The remainder of the third row of DAP MAC array 318 includes DM 10 , DM 11 and DM 12 . These DAP MAC units operate in the same manner as DM 9 but receive weight groups from the second, third and fourth rows of converted weight matrix 212, respectively. [0193] The fourth row of DAP MAC array 318 includes DAP MAC units DM 13 , DM 14 , DM 15 and DM 16 . The dot product calculations performed by DM 13 for the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 are discussed in detail below, while the dot product calculations performed by DM 14 , DM 15 and DM 16 are summarized below. DM 13 calculates the dot product of the first row of converted weight matrix 212 (i.e., converted weight set 212 1 ) and the fourth column of converted input data matrix 214 to generate element o 1 4 of converted output data matrix 216. [0194] During the processing cycle 1, DM 13 receives w 1 1, w 1 5, w 1 9, w 1 13, a 1 4, a 2 4 and mask “1100” from local memory, selects w 1 1 and w 1 5 based on mask “1100”, multiplies w 1 1 and a 1 4 to generate a first intermediate product, multiples w 1 5 and a 2 4 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register (i.e., 0), and stores the accumulated result back in the storage register. [0195] During the processing cycle 2, DM 13 receives w 1 2, w 1 6, w 1 10, w 1 14, a 2 5, a 3 5 and mask “0110” from local memory, selects w 1 6 and w 1 10 based on mask “0110”, multiplies w 1 6 and a 2 5 to generate a first intermediate product, multiples w 1 10 and a 3 5 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0196] During the processing cycle 3, DM 13 receives w 1 3, w 1 7, w 1 11, w 1 15, a 2 9, a 3 9 and mask “0110” from local memory, selects w 1 7 and w 1 11 based on mask “0110”, multiplies w 1 7 and a 2 9 to generate a first intermediate product, multiples w 1 11 and a 3 9 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. [0197] During the processing cycle 4, DM 13 receives w 1 4, w 1 8, w 1 12, w 1 16, a 1 10, a 3 10 and mask “1010” from local memory, selects w 1 4 and w 1 12 based on mask “1010”, multiplies w 1 4 and a 1 10 to generate a first intermediate product, multiples w 1 12 and a 3 10 to generate a second intermediate product, adds the first and second intermediate products to the value stored in the storage register, and stores the accumulated result back in the storage register. At the end of the processing cycle 4, DM 13 outputs element o 1 4. [0198] The remainder of the fourth row of DAP MAC array 318 includes DM 10 , DM 11 and DM 12 . These DAP MAC units operate in the same manner as DM 9 but receive weight groups from the second, third and fourth rows of converted weight matrix 212, respectively. [0199] After the blocks of the first quadrants a 1 q1, a 2 q1, a 3 q1 and a 4 q1 of converted input data matrix 214 have been processed, the next sequence of operations processes the blocks of the second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2. After the blocks of the second quadrants a 1 q2, a 2 q2, a 3 q2 and a 4 q2 have been processed, the next sequence of operations processes the blocks of the third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3. And, after the blocks of the third quadrants a 1 q3, a 2 q3, a 3 q3 and a 4 q3 have been processed, the final sequence of operations processes the blocks of the fourth quadrants a 1 q4, a 2 q4, a 3 q4 and a 4 q4. Converted weight matrix 212 is accessed for each sequence of operations. [0200] Advantageously, compressed basic block matrices 324 may retain their compressed form in the datapath. In another embodiment, converted weight matrix 212 may be compressed in a similar manner, and each compressed weight set may include a mask to identify weights with non-zero values. [0201] FIG.10 depicts a block diagram of system 100, in accordance with an embodiment of the present disclosure. [0202] Computer 102 includes bus 110 coupled to one or more processors 120, memory 130, I/O interfaces 140, display interface 150, one or more communication interfaces 160 and one or more MMAs 400. Generally, I/O interfaces 140 are coupled to I/O devices 142 using a wired or wireless connection, display interface 150 is coupled to display 152, and communication interface 160 is connected to network 162 using a wired or wireless connection. [0203] Bus 110 is a communication system that transfers data between processor 120, memory 130, I/O interfaces 140, display interface 150, communication interface 160, MMA 400, as well as other components not depicted in FIG.1. Power connector 112 is coupled to bus 110 and a power supply (not shown). [0204] Processor 120 includes one or more general-purpose or application- specific microprocessors that executes instructions to perform control, computation, input/output, etc. functions for computer 102. Processor 120 may include a single integrated circuit, such as a micro-processing device, or multiple integrated circuit devices and/or circuit boards working in cooperation to accomplish the functions of processor 120. In addition, processor 120 may execute computer programs or modules, such as operating system 132, software modules 134, etc., stored within memory 130. For example, software modules 134 may include an ML application, an ANN application, a CNN application, etc. [0205] Generally, storage element or memory 130 stores instructions for execution by processor 120 and data. Memory 130 may include a variety of non- transitory computer-readable medium that may be accessed by processor 120. In various embodiments, memory 130 may include volatile and nonvolatile medium, non-removable medium and/or removable medium. For example, memory 130 may include any combination of random access memory (RAM), dynamic RAM (DRAM), static RAM (SRAM), read only memory (ROM), flash memory, cache memory, and/or any other type of non-transitory computer-readable medium. [0206] Memory 130 contains various components for retrieving, presenting, modifying, and storing data. For example, memory 130 stores software modules that provide functionality when executed by processor 120. The software modules include operating system 132 that provides operating system functionality for computer 102. Software modules 134 provide various functionality, such as image classification using convolutional neural networks, etc. Data 136 may include data associated with operating system 132, software modules 134, etc. [0207] I/O interfaces 140 are configured to transmit and/or receive data from I/O devices 142. I/O interfaces 140 enable connectivity between processor 120 and I/O devices 142 by encoding data to be sent from processor 120 to I/O devices 142, and decoding data received from I/O devices 142 for processor 120. Generally, data may be sent over wired and/or wireless connections. For example, I/O interfaces 140 may include one or more wired communications interfaces, such as USB, Ethernet, etc., and/or one or more wireless communications interfaces, coupled to one or more antennas, such as WiFi, Bluetooth, cellular, etc. [0208] Generally, I/O devices 142 provide input to computer 102 and/or output from computer 102. As discussed above, I/O devices 142 are operably connected to computer 102 using a wired and/or wireless connection. I/O devices 142 may include a local processor coupled to a communication interface that is configured to communicate with computer 102 using the wired and/or wireless connection. For example, I/O devices 142 may include a keyboard, mouse, touch pad, joystick, etc. [0209] Display interface 150 is configured to transmit image data from computer 102 to monitor or display 152. [0210] Communication interface 160 is configured to transmit data to and from network 162 using one or more wired and/or wireless connections. Network 162 may include one or more local area networks, wide area networks, the Internet, etc., which may execute various network protocols, such as, for example, wired and/or wireless Ethernet, Bluetooth, etc. Network 162 may also include various combinations of wired and/or wireless physical layers, such as, for example, copper wire or coaxial cable networks, fiber optic networks, Bluetooth wireless networks, WiFi wireless networks, CDMA, FDMA and TDMA cellular wireless networks, etc. [0211] MMA 400 is configured to multiply matrices and generate output matrices to support various applications implemented by software modules 134. [0212] FIG.11 depict a block diagram of MMA 400, in accordance with embodiments of the present disclosure. [0213] MMA 400 includes PE array 402, I/O interface 410, register 420, register 430 and register 440. [0214] In this embodiment, PE array 402 includes 16 PEs 450 arranged in a 4x4 array; other numbers of PEs 450 and arrangements are also contemplated, such as, for example, four PEs 450 arranged in a 2x2 array, nine PEs 450 arranged in a 3x3 array, 25 PEs 450 arranged in a 5x5 array, 36 PEs 450 arranged in a 6x6 array, 49 PEs 450 arranged in a 7x7 array, 64 PEs 450 arranged in a 8x8 array, etc. Non-symmetric arrangements, such as a 2x3 array, a 3x4 array, a 4x5 array, a 4x6 array, etc., may be advantageous for certain applications. Each PE 450 is coupled to register 420, register 430 and register 440, and calculates a dot product for one element of converted output data matrix 216. [0215] For example, the PE 450 located in the first row and the first column (i.e., upper left corner) of PE array 402 calculates the dot products of the 1 st row of converted weight matrix 212 and the 1 st , 5 th , 9 th and 13 th columns of converted input data matrix 214 to generate the o 1 1, o 1 5, o 1 9 and o 1 13 elements of converted output data matrix 216, as discussed above with respect to DAP MAC unit DM 1 . [0216] I/O interface 410 is coupled to bus 110, register 420, register 430 and register 440. I/O interface 410 includes a microcontroller that sends data to, and receives data and commands from, processor 120, memory 130, etc. The microcontroller implements a set of instructions that controls the data flow and the operation of PEs 450. [0217] In some embodiments, a dedicated controller, microcontroller, field programmable gate array (FPGA), etc., may control the data flow and the operation of MMA 400. For example, the controller may implement load/store (L/S) instructions, memory mapped I/O (MMIO), direct memory access (DMA), etc., to load the compressed matrices and corresponding masks into register 420 and the weights into register 430, start the matrix multiply operation, read back the output matrix from register 440, etc. More particularly, one or more software modules 134, executing on processor 120, may calculate the masks and compress the matrices, send these data and the appropriate commands to MMA 400 to upload registers 420 and 430, start the matrix multiply operation, read back the results from register 440, etc. [0218] Register 420 includes vector register 422 and scalar register 424. Vector register 422 stores the elements of the compressed matrices in the multiplication operation, such as compressed basic block matrices 324. Scalar register 424 stores the masks associated with the compressed matrices in the multiplication operation. In this embodiment, scalar register 424 is 32 bits wide, and vector register 422 is 8 elements wide, each element being the same size as the data contained within compressed basic block matrices 324, such as, for example, 8 bit integer data, 16 bit integer data, 32 bit integer data, 16 bit floating point data, 16 bit Bfloat data, 32 bit floating point data, etc. [0219] Generally, vector register 422 simultaneously provides “m” elements to each row of PEs 450 in PE array 402. In this embodiment, vector register 422 simultaneously provides two elements to each row of PEs 450 in PE array 402. In certain embodiments, vector register 422 may be divided into four individual vector registers, while in other embodiments, vector register 422 may be a single register. [0220] Register 430 includes vector register 432. Vector register 432 stores the elements of the other matrix in the multiplication operation, such as converted weight matrix 212. In this embodiment, vector register 432 is 16 elements wide, each element being the same size as the data contained within converted weight matrix 212, such as, for example, 8 bit integer data, 16 bit integer data, 32 bit integer data, 16 bit floating point data, 16 bit Bfloat data, 32 bit floating point data, etc. [0221] Generally, vector register 432 simultaneously provides “n” elements to each column of PEs 450 in PE array 402. In this embodiment, vector register 432 simultaneously provides four elements to each column of PEs 450 in PE array 402. IN certain embodiments, vector register 432 may be divided into four individual vector registers, one for each row of converted weight matrix 212, while in other embodiments, vector register 432 may be a single register. [0222] Register 440 includes vector register 442, which stores the elements of the output matrix in the multiplication operation, such as converted output data matrix 216. In this embodiment, vector register 442 is 16 elements wide, each element being the same size as the data contained within converted output data matrix 216, such as, for example, 8 bit integer data, 16 bit integer data, 32 bit integer data, 16 bit floating point data, 16 bit Bfloat data, 32 bit floating point data, etc. Vector registers 422, 432 and 442 all have the same size, such as, for example, 8 bit integer data, etc. [0223] FIG.12 depicts a block diagram of PE 450 for MMA 400, in accordance with an embodiment of the present disclosure. PE 450 represents one embodiment of a DAP MAC unit; other embodiments are also contemplated. [0224] PE 450 includes data selection circuit 451, data selectors or multiplexers 452 1 , 452 2 , …, 452 m , multiplier circuits 454 1 , 454 2 , …, 454 m , and accumulator circuit 456 that includes adder circuit 457 and accumulator register 458. For the embodiment depicted in FIGS.9, 10 and 11, “m” equals 2; other configurations are also contemplated. For clarity of discussion, PE 450 will be described with respect to this embodiment. [0225] Data selection circuit 451 is coupled to scalar register 424 via a set of parallel data lines, and receives a mask or index, associated with a compressed basic block matrix 324, from scalar register 424. Data selection circuit 451 is configured to decode the mask by applying a bitmask, performing a bit shift operation, etc., and generate and send appropriate selection signals to multiplexers 452 1 and 452 2 . [0226] Multiplexers 452 1 and 452 2 are coupled to vector register 432 via “n” sets of parallel data lines. The number of parallel data line sets, “n,” is equal to the number of weights in each weight group 322. In this embodiment, there are 4 weights in each weight group 322 and 4 sets of parallel data lines, so “n” equals 4. Each parallel data line set transfers one weight element from vector register 432 to each multiplexer 452 1 and 452 2 . The number of parallel data lines in each set is equal to the size of the element in vector register 432, such as 8 for 8 bit integer data, 16 for 16-bit integer data, etc., as discussed above. [0227] Multiplexers 452 1 and 452 2 are coupled to data selection circuit 451 via individual selection signal lines. Each selection signal line transmits a selection signal that commands the particular multiplexer 452 i to select a respective set of parallel data lines to output to an associated multiplier circuit 454 i . In other words, each multiplexer 452 i selects an element from vector register 432, and provides that element to the associated multiplier circuit 454 i . In this embodiment, multiplexer 452 1 is coupled to multiplier circuit 454 1 via a set of parallel data lines, and multiplexer 452 2 is coupled to multiplier circuit 454 1 via a set of parallel data lines. [0228] Multiplier circuits 454 1 and 454 2 are coupled to vector register 422 via respective sets of parallel data lines. Each parallel data line set transfers one element of a compressed basic block matrix from vector register 422 to multiplier circuit 454 1 or 454 2 . The number of parallel data lines in each set is equal to the size of the element in vector register 422, such as 8 for 8 bit integer data, 16 for 16-bit integer data, etc., as discussed above. Multiplier circuits 454 1 and 454 2 are also coupled to accumulator circuit 256 via respective sets of parallel data lines. [0229] Multiplier circuit 454 1 multiplies the data value, ma, provided by vector register 422, and the data value, mw, provided by associated multiplexer 452 1 and outputs the resulting data value or intermediate product, ip 1 , to accumulator circuit 456. The data values ma and mw and ip 1 have the same size, such as, for example, 8 bit integer, etc. Similarly, multiplier circuit 454 2 multiplies the data value, ma, provided by vector register 422, and the data value, mw, provided by associated multiplexer 452 2 and outputs the resulting data value or intermediate product, ip 2 , to accumulator circuit 456. [0230] Accumulator circuit 456 includes adder circuit 457 and accumulator register 458. Generally, adder circuit 457 adds the intermediate products ip 1 and ip 2 from multiplier circuits 454 1 and 454 2 , and outputs the resulting data value to accumulator register 458. During each processing cycle, data selection circuit 451 performs a selection cycle, multiplier circuits 454 1 and 454 2 perform simultaneous multiply cycles, and accumulator circuit 456 then performs an add cycle. During the selection cycle, data selection circuit 451 determines, based on the mask or index, which elements of the weight group 322 correspond to the elements of the compressed basic block matrix 324, and generates and sends the appropriate selection signals to multiplexers 452 1 and 452 2 , which select the appropriate parallel data lines. For this embodiment, the dot product calculation is complete after four processing cycles, and accumulator circuit 456 then outputs the data value to the corresponding element of vector register 442. [0231] More particularly, and in the interest of brevity, a single dot product calculation cycle will be described using the PE 450 located in the first row and the first column (i.e., upper left corner) of PE array 402. This particular PE 450 corresponds to DAP MAC unit DM 1 in FIG.9. [0232] During processing cycle 1, multiplexers 452 1 and 452 2 each receive w 1 1, w 1 5, w 1 9, w 1 13 from vector register 432, multiplier circuit 454 1 receives a 1 1 from vector register 422, multiplier circuit 454 1 receives a 3 1 from vector register 422, and data selection circuit 451 receives mask “1010” from scalar register 424. Data selection circuit 451 determines that the first element, w 1 1, should be selected by multiplexer 452 1 based on the first bit of the mask being set to 1, determines that the third element, w 1 9, should be selected by multiplexer 452 2 based on the third bit of the mask being set to 1, and then generates and sends the appropriate selection signals to multiplexers 452 1 and 452 2 . [0233] Multiplexer 452 1 receives a selection signal from data selection circuit 451, selects and outputs the first element, w 1 1, to multiplier circuit 454 1 . Multiplier circuit 454 1 multiplies w 1 1 and a 1 1 to generate intermediate product ip 1 , and sends intermediate product ip 1 to adder circuit 457. Multiplexer 452 2 receives a selection signal from data selection circuit 451, selects and outputs the third element, w 1 9, to multiplier circuit 454 2 . Multiplier circuit 454 2 multiplies w 1 9 and a 3 1 to generate intermediate product ip 2 , and sends intermediate product ip 2 to adder circuit 457. Adder circuit 457 adds intermediate products ip 1 , ip 2 and the value stored in accumulator register 458 (i.e., 0), and then outputs the resulting data value to accumulator register 458. [0234] During processing cycle 2, multiplexers 452 1 and 452 2 each receive w 1 2, w 1 6, w 1 10, w 1 14 from vector register 432, multiplier circuit 454 1 receives a 2 2 from vector register 422, multiplier circuit 454 1 receives a 4 2 from vector register 422, and data selection circuit 451 receives mask “0101” from scalar register 424. Data selection circuit 451 determines that the second element, w 1 6, should be selected by multiplexer 452 1 based on the second bit of the mask being set to 1, determines that the fourth element, w 1 14, should be selected by multiplexer 452 2 based on the fourth bit of the mask being set to 1, and then generates and sends the appropriate selection signals to multiplexers 452 1 and 452 2 . [0235] Multiplexer 452 1 receives a selection signal from data selection circuit 451, selects and outputs the second element, w 1 6, to multiplier circuit 454 1 . Multiplier circuit 454 1 multiplies w 1 6 and a 2 2 to generate intermediate product ip 1 , and sends intermediate product ip 1 to adder circuit 457. Multiplexer 452 2 receives a selection signal from data selection circuit 451, selects and outputs the fourth element, w 1 14, to multiplier circuit 454 2 . Multiplier circuit 454 2 multiplies w 1 14 and a 4 2 to generate intermediate product ip 2 , and sends intermediate product ip 2 to adder circuit 457. Adder circuit 457 adds intermediate products ip 1 , ip 2 and the value stored in accumulator register 458, and then outputs the resulting data value to accumulator register 458. [0236] During processing cycle 3, multiplexers 452 1 and 452 2 each receive w 1 3, w 1 7, w 1 11, w 1 15 from vector register 432, multiplier circuit 454 1 receives a 2 6 from vector register 422, multiplier circuit 454 1 receives a 4 6 from vector register 422, and data selection circuit 451 receives mask “0101” from scalar register 424. Data selection circuit 451 determines that the second element, w 1 7, should be selected by multiplexer 452 1 based on the second bit of the mask being set to 1, determines that the fourth element, w 1 15, should be selected by multiplexer 452 2 based on the fourth bit of the mask being set to 1, and then generates and sends the appropriate selection signals to multiplexers 452 1 and 452 2 . [0237] Multiplexer 452 1 receives a selection signal from data selection circuit 451, selects and outputs the second element, w 1 7, to multiplier circuit 454 1 . Multiplier circuit 454 1 multiplies w 1 7 and a 2 6 to generate intermediate product ip 1 , and sends intermediate product ip 1 to adder circuit 457. Multiplexer 452 2 receives a selection signal from data selection circuit 451, selects and outputs the fourth element, w 1 15, to multiplier circuit 454 2 . Multiplier circuit 454 2 multiplies w 1 15 and a 4 6 to generate intermediate product ip 2 , and sends intermediate product ip 2 to adder circuit 457. Adder circuit 457 adds intermediate products ip 1 , ip 2 and the value stored in accumulator register 458, and then outputs the resulting data value to accumulator register 458. [0238] During processing cycle 4, multiplexers 452 1 and 452 2 each receive w 1 4, w 1 8, w 1 12, w 1 16 from vector register 432, multiplier circuit 454 1 receives a 1 7 from vector register 422, multiplier circuit 454 1 receives a 4 7 from vector register 422, and data selection circuit 451 receives mask “1001” from scalar register 424. Data selection circuit 451 determines that the first element, w 1 4, should be selected by multiplexer 452 1 based on the first bit of the mask being set to 1, determines that the fourth element, w 1 16, should be selected by multiplexer 452 2 based on the fourth bit of the mask being set to 1, and then generates and sends the appropriate selection signals to multiplexers 452 1 and 452 2 . [0239] Multiplexer 452 1 receives a selection signal from data selection circuit 451, selects and outputs the first element, w 1 4, to multiplier circuit 454 1 . Multiplier circuit 454 1 multiplies w 1 4 and a 2 7 to generate intermediate product ip 1 , and sends intermediate product ip 1 to adder circuit 457. Multiplexer 452 2 receives a selection signal from data selection circuit 451, selects and outputs the fourth element, w 1 16, to multiplier circuit 454 2 . Multiplier circuit 454 2 multiplies w 1 16 and a 4 7 to generate intermediate product ip 2 , and sends intermediate product ip 2 to adder circuit 457. Adder circuit 457 adds intermediate products ip 1 , ip 2 and the value stored in accumulator register 458, and then outputs the resulting data value to accumulator register 458. [0240] At the end of processing cycle 4, accumulator register 458 outputs the stored data value to vector register 442. [0241] FIG.13 depicts a flow diagram 500 representing functionality associated with multiplying matrices, in accordance with embodiments of the present disclosure. [0242] At 510, a number of basic block matrices are generated based on an input tensor. Each basic block matrix includes a number of elements. [0243] The functionality at 520, 530 and 540 is repeated for each basic block matrix. [0244] At 520, the elements of the basic block matrix are pruned based on a sparsity value. [0245] At 530, a mask is generated for the basic block matrix. The mask includes a number of bits. Each bit corresponds to a different element of the basic block matrix. [0246] At 540, the basic block matrix is compressed to generate a compressed basic block matrix that has fewer elements than the basic block matrix. [0247] At 550, the compressed basic block matrices and a weight matrix are multiplied, based on the masks, to generate an output matrix. [0248] Embodiments of the present disclosure advantageously provide a system and method for multiplying matrices that significantly reduce “multiply by zero” conditions. Embodiments of the present disclosure are applicable to the multiplication of a dense matrix with a “sparse” matrix, and many embodiments accommodate any degree of sparsity ratio. The embodiments described above and summarized below are combinable. [0249] In one embodiment, a system includes a processor coupled to a memory, and a matrix multiply accelerator (MMA) coupled to the processor and the memory. The processor is configured to generate, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements; for each basic block matrix: prune, based on a sparsity value, the elements of the basic block matrix, generate a mask for the basic block matrix, each mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compress the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix. The MMA is configured to multiply, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix. [0250] In another embodiment of the system, the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix. [0251] In another embodiment of the system, the input tensor includes a number of input matrices, each input matrix has a same number of elements, and the number of input matrices is equal to a number of channels; the number of basic block matrices is equal to the number of input matrix elements, and each basic block matrix has a first dimension that is equal to 1 and a second dimension that is equal to a hyperparameter b; and each compressed basic block matrix has a first dimension that is equal to 1 and a second dimension that is less than the hyperparameter b. [0252] In another embodiment of the system, the processor is further configured to flatten a number of weight tensors to generate the weight matrix, where each weight tensor has a first dimension, a second dimension, and a third dimension that is equal to the number of channels, and where each flattened weight tensor forms a row of the weight matrix. [0253] In another embodiment of the system, the processor is further configured to convert the input tensor into a converted input data matrix based on a convolution operation, re-sequence each column of the converted input data matrix into a sequence of compressed basic block matrices, and re-sequence each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; and the MMA is further configured to multiply, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate the output matrix. [0254] In another embodiment of the system, the MMA includes a first register configured to store the masks and the compressed basic block matrices; a second register configured to store the weight groups; a third register configured to store the output matrix; and an array of processing elements (PEs), coupled to the first, second and third registers, each PE configured to multiply, based on the masks, one sequence of compressed basic block matrices and one sequence of weight groups to generate one element of the output matrix. [0255] In another embodiment of the system, each PE includes a first multiplexer configured to receive a weight group within the sequence of weight groups, and selectively output a first weight based on a first data selection signal; a second multiplexer configured to receive the weight group within the sequence of weight groups, and selectively output a second weight based on a second data selection signal; a data selection circuit, coupled to the first multiplexer and the second multiplexer, configured to receive the mask corresponding to a compressed basic block matrix within the sequence of compressed basic block matrices, generate the first data selection signal based on the mask, and generate the second data selection signal based on the mask; a first multiplier circuit, coupled to the first multiplexer, configured to receive a first element from the compressed basic block matrix and the first weight selectively output by the first multiplexer, multiply the first element and the first weight to generate a first intermediate product, and output the first intermediate product; a second multiplier circuit, coupled to the second multiplexer, configured to receive a second element from the compressed basic block matrix and the second weight selectively output by the second multiplexer, multiply the second element and the second weight to generate a second intermediate product, and output the second intermediate product; and an accumulator circuit, coupled to the first and second multiplier circuits, configured to receive the first and second intermediate products, and accumulate the first and second intermediate products into a value for one element of the output matrix. [0256] In another embodiment of the system, each weight group includes at least four weights, each mask includes at least four bits, and each compressed basic block matrix includes at least two elements. [0257] In another embodiment of the system, the system further includes a dynamic activation pruning (DAP) selection circuit, coupled to the processor, configured to generate the mask for each basic block matrix, the DAP selection circuit including a plurality of input registers, each input register including an enable bit and configured to store one basic block matrix element; a chain of magnitude compactors, coupled to the input registers, each magnitude compactor configured to receive two basic block matrix elements, determine which basic block matrix element has a greater magnitude, and then pass the basic block matrix element with the greater magnitude to a next magnitude compactor in the chain of magnitude compactors; and an output register including a plurality of output bits, each output bit corresponding to one of the input registers, where a final magnitude compactor in the chain of magnitude compactors is configured to set the respective output bit within the output register, and where the input register enable bit indicates whether the input register transmits or does not transmit the stored basic block matrix element to the chain of magnitude compactors. [0258] In one embodiment, a computer-based method for multiplying matrices includes generating, based on an input tensor, a number of basic block matrices, each basic block matrix including a number of elements; for each basic block matrix: pruning, based on a sparsity value, the elements of the basic block matrix, generating a mask for the basic block matrix, the mask including a number of bits, each bit corresponding to a different element of the basic block matrix, and compressing the basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix; and multiplying, based on the masks, the compressed basic block matrices and a weight matrix to generate an output matrix. [0259] In another embodiment of the computer-based method, the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix. [0260] In another embodiment of the computer-based method, the input tensor includes a number of input matrices, each input matrix has a same number of elements, and the number of input matrices is equal to a number of channels; the number of basic block matrices is equal to the number of input matrix elements, and each basic block matrix has a first dimension that is equal to 1 and a second dimension that is equal to a hyperparameter b; and each compressed basic block matrix has a first dimension that is equal to 1 and a second dimension that is less than the hyperparameter b. [0261] In another embodiment of the computer-based method, the method further includes flattening a number of weight tensors to generate the weight matrix, where each weight tensor has a first dimension, a second dimension, and a third dimension that is equal to the number of channels, and where each flattened weight tensor forms a row of the weight matrix. [0262] In another embodiment of the computer-based method, the method further includes converting the input tensor into a converted input data matrix based on a convolution operation; re-sequencing each column of the converted input data matrix into a sequence of compressed basic block matrices; re-sequencing each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; and multiplying, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate the output matrix. [0263] In another embodiment of the computer-based method, the multiplying is performed by an array of processing elements (PEs), each PE is configured to multiply, based on the masks, one sequence of compressed basic block matrices and one sequence of weight groups to generate one element of the output matrix. [0264] In another embodiment of the computer-based method, each PE includes a first multiplexer configured to receive a weight group within the sequence of weight groups, and selectively output a first weight based on a first data selection signal; a second multiplexer configured to receive the weight group within the sequence of weight groups, and selectively output a second weight based on a second data selection signal; a data selection circuit, coupled to the first multiplexer and the second multiplexer, configured to receive the mask corresponding to a compressed basic block matrix within the sequence of compressed basic block matrices, generate the first data selection signal based on the mask, and generate the second data selection signal based on the mask; a first multiplier circuit, coupled to the first multiplexer, configured to receive a first element from the compressed basic block matrix and the first weight selectively output by the first multiplexer, multiply the first element and the first weight to generate a first intermediate product, and output the first intermediate product; a second multiplier circuit, coupled to the second multiplexer, configured to receive a second element from the compressed basic block matrix and the second weight selectively output by the second multiplexer, multiply the second element and the second weight to generate a second intermediate product, and output the second intermediate product; and an accumulator circuit, coupled to the first and second multiplier circuits, configured to receive the first and second intermediate products, and accumulate the first and second intermediate products into a value for one element of the output matrix. [0265] In another embodiment of the computer-based method, each weight group includes at least four weights, each mask includes at least four bits, and each compressed basic block matrix includes at least two elements. [0266] In one embodiment, a computer-based method for training a convolutional neural network (CNN) includes during a forward phase: providing a filter to a convolutional layer, the filter including a number of weight sets; providing input feature maps to a dynamic activation pruning (DAP) process; at the DAP process: generating, based on the input feature maps, a number of basic block matrices, each basic block matrix including a number of elements, pruning, based on a sparsity value, the elements of each basic block matrix, generating a mask for each basic block matrix, the mask including a number of bits, each bit corresponding to a different element of the basic block matrix, compressing each basic block matrix to generate a compressed basic block matrix having fewer elements than the basic block matrix, and providing the masks and the compressed basic block matrices to the convolutional layer; at the convolutional layer: multiplying, based on the masks, the compressed basic block matrices and the weight sets to generate output feature maps; during a backward phase: backpropagating gradients; and updating the weight sets. [0267] In another embodiment of the computer-based training method, the sparsity value is a number greater than 0 and less than 1; and each bit in each mask has a value of 1 when the corresponding element of the basic block matrix is present within the compressed basic block matrix, and a value of 0 when the corresponding element of the basic block matrix is not present within the compressed basic block matrix [0268] In another embodiment of the computer-based training method, at the convolutional layer: flattening the weight sets to generate a weight matrix, each flattened weight set forming a row of the weight matrix; converting the input feature maps into a converted input data matrix based on a convolution operation; re-sequencing each column of the converted input data matrix into a sequence of compressed basic block matrices; re-sequencing each row of the weight matrix into a sequence of weight groups based on the sequences of compressed basic block matrices; multiplying, based on the masks, the sequences of compressed basic block matrices and the sequences of weight groups to generate an output data matrix; and generating the output feature maps based on the output data matrix. [0269] While implementations of the disclosure are susceptible to embodiment in many different forms, there is shown in the drawings and will herein be described in detail specific embodiments, with the understanding that the present disclosure is to be considered as an example of the principles of the disclosure and not intended to limit the disclosure to the specific embodiments shown and described. In the description above, like reference numerals may be used to describe the same, similar or corresponding parts in the several views of the drawings. [0270] In this document, relational terms such as first and second, top and bottom, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. The terms “comprises,” “comprising,” “includes,” “including,” “has,” “having,” or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element preceded by “comprises …a” does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. [0271] Reference throughout this document to “one embodiment,” “certain embodiments,” “an embodiment,” “implementation(s),” “aspect(s),” or similar terms means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of such phrases or in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments without limitation. [0272] The term “or” as used herein is to be interpreted as an inclusive or meaning any one or any combination. Therefore, “A, B or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B and C.” An exception to this definition will occur only when a combination of elements, functions, steps or acts are in some way inherently mutually exclusive. Also, grammatical conjunctions are intended to express any and all disjunctive and conjunctive combinations of conjoined clauses, sentences, words, and the like, unless otherwise stated or clear from the context. Thus, the term “or” should generally be understood to mean “and/or” and so forth. References to items in the singular should be understood to include items in the plural, and vice versa, unless explicitly stated otherwise or clear from the text. [0273] Recitation of ranges of values herein are not intended to be limiting, referring instead individually to any and all values falling within the range, unless otherwise indicated, and each separate value within such a range is incorporated into the specification as if it were individually recited herein. The words “about,” “approximately,” or the like, when accompanying a numerical value, are to be construed as indicating a deviation as would be appreciated by one of ordinary skill in the art to operate satisfactorily for an intended purpose. Ranges of values and/or numeric values are provided herein as examples only, and do not constitute a limitation on the scope of the described embodiments. The use of any and all examples, or exemplary language (“e.g.,” “such as,” “for example,” or the like) provided herein, is intended merely to better illuminate the embodiments and does not pose a limitation on the scope of the embodiments. No language in the specification should be construed as indicating any unclaimed element as essential to the practice of the embodiments. [0274] For simplicity and clarity of illustration, reference numerals may be repeated among the figures to indicate corresponding or analogous elements. Numerous details are set forth to provide an understanding of the embodiments described herein. The embodiments may be practiced without these details. In other instances, well-known methods, procedures, and components have not been described in detail to avoid obscuring the embodiments described. The description is not to be considered as limited to the scope of the embodiments described herein. [0275] In the following description, it is understood that terms such as “first,” “second,” “top,” “bottom,” “up,” “down,” “above,” “below,” and the like, are words of convenience and are not to be construed as limiting terms. Also, the terms apparatus, device, system, etc. may be used interchangeably in this text. [0276] The many features and advantages of the disclosure are apparent from the detailed specification, and, thus, it is intended by the appended claims to cover all such features and advantages of the disclosure which fall within the scope of the disclosure. Further, since numerous modifications and variations will readily occur to those skilled in the art, it is not desired to limit the disclosure to the exact construction and operation illustrated and described, and, accordingly, all suitable modifications and equivalents may be resorted to that fall within the scope of the disclosure.