Patent ID: 11899744
Assignee: SAMSUNG ELECTRONICS CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 11:
12. A method performed by one or more processors, the method comprising:
reading from a memory an input feature map and at least a portion of a neural network comprising an input layer, multiple hidden layers, and an output layer, each layer comprising a respective set of nodes, each layer other than the input layer having weights of connections to a preceding adjacent layer, the neural network further comprising a weight matrix, the weight matrix comprising weight values of the weights, the weight matrix having a row dimension and a column dimension, wherein a matrix operation is to be performed on the input feature map and the weight matrix, wherein the matrix operation comprises a matrix multiplication operation, and wherein the method is capable of performing the transpose operation and the reshape operation before the matrix multiplication operation, and wherein the method is capable of performing the transpose operation and the reshape operation after the matrix multiplication operation;
determining whether a column split dimension is a column dimension or a row dimension based on whether the transpose and reshape operations are performed before or after the matrix multiplication operation;
splitting the weight matrix into weight sub-matrices based on the number of heads;
performing the matrix multiplication operation between the input feature map and each of the weight sub-matrices to generate intermediate feature maps respectively corresponding to the weight sub-matrices, wherein an intermediate feature map is generated based on activations of nodes of a given layer according an intermediate feature map outputted by a layer preceding the given layer; and
performing an operation on the intermediate feature maps to generate an output feature map, and storing the output feature map in the memory.