Depth concatenation using a matrix computation unit
First Claim
1. A method comprising:
- receiving a request to process network inputs to a neural network using an integrated circuit that performs neural network computations in hardware using a matrix computation unit, the neural network comprising a depth concatenation neural network layer that specifies a concatenation of an input tensor having dimensions x1 by y1 by z1 and an input tensor having dimensions x1 by y1 by z2 along a depth dimension to generate an output tensor having dimensions x1 by y1 by (z1+z2); and
generating instructions that, when executed by the integrated circuit, cause the integrated circuit to, during processing of a network input by the neural network, generate a layer output tensor that satisfies the specification of the depth concatenation neural network layer by performing operations comprising;
for each spatial location in a first input tensor to the depth concatenation layer and a second input tensor to the depth concatenation layer;
multiplying, using the matrix computation unit, a second depth vector for the spatial location in the second input tensor by a shift weight matrix for the depth concatenation layer to generate a shifted second depth vector that has zeroes as the first z1 entries and entries of the second depth vector as the last z2 entries; and
adding the shifted second depth vector and a first input depth vector for the spatial location in the first input tensor to generate a concatenated depth vector, the first input depth vector having entries of the first input depth vector as the first z1 entries of the first input depth vector and zeroes as the last z2 entries of the first input depth vector.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for depth concatenation using a matrix computation unit. One of the methods includes: receiving a request to process network inputs to a neural network using an integrated circuit, the neural network comprising a depth concatenation neural network layer; and generating instructions that, when executed by the integrated circuit, cause the integrated circuit to performing operations comprising: for each spatial location in a first input tensor to the depth concatenation layer and a second input tensor to the depth concatenation layer: multiplying, using the matrix computation unit, a second depth vector for the spatial location by a shift weight matrix for the depth concatenation layer to generate a shifted second depth vector; and adding the shifted second depth vector and a first input depth vector for the spatial location to generate a concatenated depth vector.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving a request to process network inputs to a neural network using an integrated circuit that performs neural network computations in hardware using a matrix computation unit, the neural network comprising a depth concatenation neural network layer that specifies a concatenation of an input tensor having dimensions x1 by y1 by z1 and an input tensor having dimensions x1 by y1 by z2 along a depth dimension to generate an output tensor having dimensions x1 by y1 by (z1+z2); and generating instructions that, when executed by the integrated circuit, cause the integrated circuit to, during processing of a network input by the neural network, generate a layer output tensor that satisfies the specification of the depth concatenation neural network layer by performing operations comprising; for each spatial location in a first input tensor to the depth concatenation layer and a second input tensor to the depth concatenation layer; multiplying, using the matrix computation unit, a second depth vector for the spatial location in the second input tensor by a shift weight matrix for the depth concatenation layer to generate a shifted second depth vector that has zeroes as the first z1 entries and entries of the second depth vector as the last z2 entries; and adding the shifted second depth vector and a first input depth vector for the spatial location in the first input tensor to generate a concatenated depth vector, the first input depth vector having entries of the first input depth vector as the first z1 entries of the first input depth vector and zeroes as the last z2 entries of the first input depth vector. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising one or more computers and one or more storage devices storing first instructions that when executed by the one or more computers cause the one or more computers to perform first operations comprising:
-
receiving a request to process network inputs to a neural network using an integrated circuit that performs neural network computations in hardware using a matrix computation unit, the neural network comprising a depth concatenation neural network layer that specifies a concatenation of an input tensor having dimensions x1 by y1 by z1 and an input tensor having dimensions x1 by y1 by z2 along a depth dimension to generate an output tensor having dimensions x1 by y1 by (z1+z2); and generating second instructions that, when executed by the integrated circuit, cause the integrated circuit to, during processing of a network input by the neural network, generate a layer output tensor that satisfies the specification of the depth concatenation neural network layer by performing second operations comprising; for each spatial location in a first input tensor to the depth concatenation layer and a second input tensor to the depth concatenation layer; multiplying, using the matrix computation unit, a second depth vector for the spatial location in the second input tensor by a shift weight matrix for the depth concatenation layer to generate a shifted second depth vector that has zeroes as the first z1 entries followed by entries of the second depth vector; and adding the shifted second depth vector and a first input depth vector for the spatial location in the first input tensor to generate a concatenated depth vector, the first input depth vector having entries of the first input depth vector as the first z1 entries of the first input depth vector. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. One or more non-transitory computer storage media encoded with first instructions that when executed by one or more computers cause the one or more computers to perform first operations comprising:
- receiving a request to process network inputs to a neural network using an integrated circuit that performs neural network computations in hardware using a matrix computation unit, the neural network comprising a depth concatenation neural network layer that specifies a concatenation of an input tensor having dimensions x1 by y1 by z1 and an input tensor having dimensions x1 by y1 by z2 along a depth dimension to generate an output tensor having dimensions x1 by y1 by (z1+z2); and
generating second instructions that, when executed by the integrated circuit, cause the integrated circuit to, during processing of a network input by the neural network, generate a layer output tensor that satisfies the specification of the depth concatenation neural network layer by performing second operations comprising;
for each spatial location in a first input tensor to the depth concatenation layer and a second input tensor to the depth concatenation layer;
multiplying, using the matrix computation unit, a second depth vector for the spatial location in the second input tensor by a shift weight matrix for the depth concatenation layer to generate a shifted second depth vector that has zeroes as the first z1 entries followed by entries of the second depth vector; and
adding the shifted second depth vector and a first input depth vector for the spatial location in the first input tensor to generate a concatenated depth vector, the first input depth vector having entries of the first input depth vector as the first z1 entries of the first input depth vector. - View Dependent Claims (16, 17, 18, 19, 20)
- receiving a request to process network inputs to a neural network using an integrated circuit that performs neural network computations in hardware using a matrix computation unit, the neural network comprising a depth concatenation neural network layer that specifies a concatenation of an input tensor having dimensions x1 by y1 by z1 and an input tensor having dimensions x1 by y1 by z2 along a depth dimension to generate an output tensor having dimensions x1 by y1 by (z1+z2); and
Specification