Dimension transformation for efficient bottleneck processing

Through space-to-depth dimension transformation technology, the challenge of bottleneck neural network architecture in computing efficiency and model performance is solved, and more efficient data processing and performance improvement are achieved.

CN118742905APending Publication Date: 2024-10-01QUALCOMM INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380021449.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-02-17
Filing Date
2023-01-26
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing bottleneck neural network architectures present significant challenges in computational efficiency and model performance, especially during the processing of the initial layer, where heavy spatial downsampling leads to information loss, while large receptive field kernels introduce computational complexity and memory access. time delay.

Method used

Space-to-depth dimension transformation technology is used to transfer calculations in the spatial dimension to the channel dimension, improve processing efficiency through depth-by-depth convolution, and restore the dimension of the layer output through depth-to-space transformation, using hardware accelerators to achieve efficient execution.

Benefits of technology

It significantly improves data processing efficiency and model performance, reduces computing resources and latency, while maintaining information integrity, achieving similar or higher performance than traditional architecture, while reducing model complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118742905A_ABST
    Figure CN118742905A_ABST
Patent Text Reader

Abstract

Certain aspects of the present disclosure provide techniques for efficient bottleneck processing via dimensional transformation. The techniques include receiving a tensor, and processing the tensor in a bottleneck block in a neural network model, including applying a space-to-depth tensor transform, applying a depth-by-depth convolution, and applying a depth-to-space tensor transform.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of and priority to U.S. Application No. 17 / 651,549, filed on February 17, 2022, the entire contents of which are incorporated herein by reference. Background Art

[0003] Aspects of the present disclosure relate to machine learning, and more particularly to improving the efficiency of model processing.

[0004] Artificial neural networks can be used to generate inferences on various domains with considerable success. A large number of diverse neural network architectures have been proposed for various tasks, such as recurrent neural networks (RNNs), convolutional neural networks (CNNs), etc. In general, a neural network includes multiple neurons or nodes distributed across a series of layers, with neurons between layers connected by weighted edges.

[0005] Many neural network architectures use bottleneck blocks or layers at one or more points in the model. A bottleneck can generally be thought of as a layer that has relatively fewer neurons than the immediately preceding and succeeding layers (e.g., where the tensor being processed is smaller, with fewer elements). Such bottleneck blocks can be used to reduce the number of features in the data at various points in the model, which can reduce the required computational resources while improving generalization, which helps prevent overfitting. However, existing bottleneck architectures still incur significant computational overhead.

[0006] Therefore, an improved bottleneck architecture is needed to improve the processing efficiency of machine learning models. Summary of the invention

[0007] Certain aspects provide a method comprising: receiving a first tensor; and processing the first tensor in a bottleneck block in a neural network model, comprising: applying a spatial to depth tensor transform; applying a depth-wise convolution; and applying a depth-to-spatial tensor transform.

[0008] Other aspects provide: a processing system configured to perform the aforementioned methods and those described herein; a non-transitory computer-readable medium comprising instructions that, when executed by one or more processors of the processing system, cause the processing system to perform the aforementioned methods and those described herein; a computer program product embodied on a computer-readable storage medium comprising code for performing the aforementioned methods and those further described herein; and a processing system comprising components for performing the aforementioned methods and those further described herein.

[0009] The following description and associated drawings set forth in detail certain illustrative features of the one or more aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings depict certain aspects of the one or more aspects and therefore are not to be considered limiting of the scope of the present disclosure.

[0011] Figure 1 An example space to depth dimension transformation technique is depicted.

[0012] Figure 2 An example space to depth dimension transformation technique is depicted.

[0013] Figure 3 Depicted is an example bottleneck block that improves processing efficiency through dimensionality transformation.

[0014] Figure 4 Another example bottleneck block that improves processing efficiency through dimensionality transformation is depicted.

[0015] Figure 5 is an example flow chart illustrating a method for processing data tensors in a bottleneck block using dimensionality transformation to improve efficiency.

[0016] Figure 6 is another example flow chart illustrating a method for processing data tensors in a bottleneck block using dimensionality transformation to improve efficiency.

[0017] Figure 7 is an example flow chart illustrating a method for processing bottleneck blocks using dimensionality transformation to improve efficiency.

[0018] Figure 8 An example processing system configured to perform various aspects of the present disclosure is depicted.

[0019] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements and features of one aspect may be beneficially incorporated in other aspects without further recitation. DETAILED DESCRIPTION

[0020] Aspects of the present disclosure provide techniques for more efficiently processing data in a neural network bottleneck block via dimensionality transformation.

[0021] Typically, the initial layers of a neural network operate on features with large spatial dimensions (e.g., the height and width of image or video input data) and a relatively small number of channels (also referred to as depth in some respects), which requires a large number of multiply-accumulate (MAC) operations relative to the number of parameters in these layers. To improve efficiency, some CNN architectures employ heavy spatial downsampling in early layers, which can result in significant information loss and, therefore, negatively impact model performance.

[0022] In addition, many convolutional neural network architectures require larger receptive fields in the initial layers to improve accuracy. Therefore, due to the large spatial size of the inputs to these initial layers, large kernel sizes with large receptive fields are often used to effectively aggregate global spatial information. However, such large kernel sizes may introduce significant computational complexity and memory access latency, which negatively impacts model performance.

[0023] In various aspects of the present disclosure, bottleneck blocks are provided that incorporate dimensionality transformation techniques that transfer computations in the spatial dimension to the channel dimension via a spatial-to-depth operation, which improves the efficiency of data processing. This efficiency is achieved because, despite the increase in the channel dimension, subsequent depth-wise convolutions are more efficient when operating on a smaller spatial dimension because fewer total operations are required.

[0024] The bottleneck blocks described herein may also include depth-to-space operations to restore the desired dimensions of the layer output. In some aspects, these space-to-depth operations (and accompanying depth-to-space operations) may be implemented using hardware or accelerators, allowing them to be executed efficiently and with reduced latency.

[0025] Such a spatial-to-depth bottleneck block can provide significantly improved receptive fields compared to conventional bottlenecks (enabling the kernel to effectively cover a larger area of ​​the input tensor without increasing computational overhead) because shifting computation from the spatial dimension to the channel dimension aggregates spatial information with a larger receptive field (e.g., up to r times larger using the same size kernel, where r is the spatial expansion ratio used to configure the spatial-to-depth operation). This can enable neural networks to achieve or exceed the performance of comparable existing architectures while using fewer computational operations, resulting in reduced latency for data processing. Notably, applying this spatial-to-depth technique across depth-wise convolutional layers results in a negligible increase in the overall model size. As a result, model performance is improved with minimal additional model complexity.

[0026] In some aspects, the spatial expansion ratio can be selected based on the required spatial dimension of the depth layer of the depth-wise bottleneck or based on the required maximum number of operations required to perform the depth-wise convolution. For example, if the spatial dimension of the bottleneck convolution (or the number of operations required for the bottleneck convolution) exceeds a threshold, the spatial expansion ratio can be defined (e.g., by an administrator or user) to ensure that the required spatial dimension is met so that the number of operations required to perform the depth-wise convolution is less than or equal to the required maximum value.

[0027] Aspects of the present disclosure may generally be applied to improve the computational efficiency of processing data using bottleneck layers (or blocks) of a neural network during training (when training data is passed through the model) and during runtime (when new data is passed through the model to generate inferences).

[0028] Sample Elements to Deep Technology

[0029] Figure 1 An example element-by-element spatial to depth dimension transformation technique is depicted. That is, the illustrated example includes a spatial to depth transformation 110 that reduces the spatial dimension of an input data tensor 105 by expanding the channel or depth dimension of the tensor. Thus, information is preserved when the input data undergoes a "shape" transformation. Advantageously, performing depth-wise convolution on the transformed tensor is more efficient because computations can be performed more efficiently on a tensor having a smaller spatial dimension and a larger channel dimension than on a tensor having a larger spatial dimension and a smaller channel dimension.

[0030] As illustrated, the input tensor 105 has a spatial dimension (e.g., height and width) and a channel dimension (e.g., depth). Although for ease of illustration, the illustrated tensor 105 has a single channel (e.g., channel dimension is one) and a spatial dimension of four in height and width, aspects of the present disclosure can be readily applied to tensors of any dimension.

[0031] In the illustrated aspect, the spatial-to-depth transform 110 rearranges the input tensor 105 into an output tensor 115. Specifically, the spatial-to-depth transform 110 reduces the spatial dimension of the input tensor 105 (e.g., from 4×4 to 2×2 in the illustrated example) while increasing the channel dimension by a corresponding amount (e.g., from one to four in the illustrated example) to maintain the “volume” of the tensor (e.g., the number of elements in the tensor). That is, the volume of the output tensor 115 remains the same as the volume of the input tensor 105 because 4×4×1=2×2×4. In this way, no data is lost in the spatial-to-depth transform 110 (e.g., all data elements in the input tensor 105 are included in the output tensor 115).

[0032] The specific rearrangement or modification used to transform the input tensor 105 is defined at least in part based on a spatial expansion ratio r, which is a configurable hyperparameter. In some aspects, the spatial expansion ratio can be defined by a user or administrator to transform the input tensor into a tensor with a desired spatial dimension for a depth-wise convolution. For example, assume that the desired spatial dimension of the bottleneck is M×M, but the input tensor has a larger spatial dimension N×N. In such an example, the user can select a spatial expansion ratio that will cause the input tensor to be converted into an intermediate tensor with the desired spatial dimension M×M.

[0033] In some aspects, the spatial to depth transform 110 converts an input tensor of size C×H×W into a tensor of size The output tensor of , where C is the number of channels (also called the depth of the tensor), H and W are the spatial dimensions of the tensor (e.g., height and width), and r is the spatial expansion ratio. In the illustrated aspect, C=1, H=W=4, and r=2.

[0034] In some cases, the spatial to depth transform 110 may be referred to as a pixel to depth transform or an element to depth transform as described herein because the tensor transform is performed pixel by pixel (or element by element), where each element in the original input tensor 105 is processed independently and may not remain adjacent to the same neighboring elements in the output tensor 115. For conceptual clarity of how the elements are rearranged, the elements a, c, i, and k placed in the first channel 115A of the output tensor 115 are highlighted. In the illustrated aspect, the elements a, c, i, and k in the input tensor 105 have been placed in the first channel 115A of the output tensor 115, the elements b, d, j, and l in the input tensor 105 have been placed in the second channel 115B of the output tensor 115, the elements e, g, m, and o in the input tensor 105 have been placed in the third channel 115C of the output tensor 115, and the elements f, h, n, and p in the input tensor 105 have been placed in the fourth channel 115D of the output tensor 115.

[0035] In various aspects, the specific rearrangement of elements (e.g., which elements in the input are assigned to which channels in the output) can vary based on the specific implementation and architecture of the model. However, in general, the spatial to depth transform will be fixed in that each position in the input tensor is associated with a corresponding fixed position in the output tensor (e.g., the element in the upper left corner of the input tensor 105 will always be placed in the upper left corner of the first channel of the output tensor 115). Because the spatial to depth transform 110 is a fixed rearrangement of elements, it can be efficiently implemented via hardware or with hardware acceleration.

[0036] Although the illustrated example includes a spatial to depth transform 110, a complementary depth to space transform can be used to effectively reverse the dimensionality transform. That is, a depth to space transform using the same spatial expansion ratio r can be used to increase the spatial dimension of the input tensor while reducing the channel dimension and maintaining the volume of the tensor (e.g., converting tensor 115 to tensor 105).

[0037] Example Area to Depth Technique

[0038] Figure 2 Depicts an example region-by-region space-to-depth dimension transformation technique. Figure 1Compared to the spatial-to-depth transform 110 in FIG. 1 , which operates element-by-element, the spatial-to-depth transform 210 rearranges the input tensor at the level of non-overlapping regions, as shown by the shading in the illustrated example. For conceptual clarity of how regions are outlined, the first region 207 including elements a, b, e, and f is also highlighted. In some aspects, the spatial-to-depth transform 210 may be referred to as a region-to-depth transform.

[0039] In the illustrated aspect, the spatial to depth transform 210 rearranges the input tensor 205 into an output tensor 215 by reducing the spatial dimension of the input tensor 205 (e.g., from 4×4 to 2×2 in the illustrated example) while increasing the channel dimension by a corresponding amount (e.g., from one to four in the illustrated example) to maintain the volume of the tensor. Figure 1 Like the spatial-to-depth transform 110 depicted in , there is no data loss in the spatial-to-depth transform 210 (eg, all data elements in the input tensor 205 are included in the output tensor 215).

[0040] As described above, the particular rearrangement or modification used to transform the input tensor 205 is defined at least in part based on the spatial expansion ratio, which can be a configurable hyperparameter. Figure 1 In a similar manner to the space-to-depth transform 110 in FIG. 1 , the space-to-depth transform 210 converts the input tensor of size C×H×W into a tensor of size The output tensor of , where C is the number of channels (also called the depth of the tensor), H and W are the spatial dimensions of the tensor (e.g., height and width), and r is the spatial expansion ratio. In the illustrated aspect, C=1, H=W=4, and r=2.

[0041] However, the spatial to depth transform 210 may be referred to as a region to depth transform because the tensor rearrangement is performed region by region. Specifically, in the illustrated aspect, the first region 207 (including elements a, b, e, and f in the input tensor 205) has been placed in the first channel 215A of the output tensor 215, the second region including elements c, d, g, and h in the input tensor 205 has been placed in the second channel 215B of the output tensor 215, the third region including elements i, j, m, and n in the input tensor 205 has been placed in the third channel 215C of the output tensor 215, and the fourth region including elements k, l, o, and p in the input tensor 205 has been placed in the fourth channel 215D of the output tensor 215.

[0042] In various aspects, the specific rearrangement of regions (e.g., which regions in the input are assigned to which channels in the output) can vary based on the specific implementation and architecture of the model. However, in general, the spatial to depth transform will be fixed in that each region in the input tensor is associated with a corresponding fixed channel in the output tensor (e.g., the region in the upper left corner of the input tensor 205 will always be placed in the first channel of the output tensor 215). Because the spatial to depth transform 210 is a fixed rearrangement of regions, it can be efficiently implemented via hardware or with hardware acceleration.

[0043] Although the illustrated example includes a spatial to depth transform 210, a complementary depth to space transform may be used to effectively reverse the dimensionality transform. That is, a depth to space transform using the same spatial expansion ratio r may be used to increase the spatial dimension of the input tensor while reducing the channel dimension and maintaining the volume of the tensor (e.g., converting tensor 215 to tensor 205).

[0044] In various aspects, the region-based spatial-to-depth transform 210 can be used as Figure 1 The spatial-to-depth transform 210 has the same expressiveness as the spatial-to-depth transform 110, but may provide advantages in some implementations, such as improved spatial gating (a spatial version of channel gating).

[0045] Example bottleneck block with dimension transformation across point-wise convolutions

[0046] Figure 3 An example bottleneck block 300 with dimensional transformations to improve processing efficiency is depicted. The bottleneck block 300 generally includes a depthwise convolution 330, as well as a spatial to depth transform 320 and a corresponding depth to spatial transform 350 used before and after the bottleneck convolution, respectively. By using these dimensional transformations, the bottleneck block 300 can operate more efficiently (e.g., to reduce latency and computing resources).

[0047] In the bottleneck block 300, a first 1×1 (point-wise) convolution 310 is first used to reduce the number of channels in the input tensor 305, thereby reducing the memory and MAC count of subsequent convolutions.

[0048] Specifically, the size is C in ×H×W input tensor 305 uses Convolution is performed with point-wise convolution kernels, where each such kernel has C in ×1×1 dimensions, and where C inis the number of channels in input tensor 305, H and W are the spatial dimensions of input tensor 305, t is the channel expansion ratio, and r is the spatial expansion ratio discussed above. In at least one aspect, input tensor 305 is an activation tensor that is input to a layer of a neural network, and kernels correspond to weights of the layer.

[0049] Although the examples shown use The bottleneck block 300 shown in the example uses The point-by-point convolution 310 of the point-by-point kernels is only to reflect the traditional configuration of conventional bottleneck blocks, which use tC in The first point-wise convolution is performed on the kernels.

[0050] As illustrated, the first point-wise convolution 310 produces a vector with dimensions That is, the intermediate tensor 315 has the same spatial dimensions, but the channel depth is changed (e.g., reduced).

[0051] The intermediate tensor 315 is then processed using a spatial to depth transform 320 (e.g., an element-based dimensional transform or a region-based dimensional transform) to generate another intermediate tensor 325 with increased depth (e.g., more channels) and reduced spatial dimensionality. In the illustrated example, the intermediate tensor 325 has dimensions And the spatial dimension has been reduced by r.

[0052] The depthwise convolution 330 can then be applied to the tensor 325 having a reduced spatial dimension compared to the original input tensor 305, which means that fewer computational operations can be used to perform the depthwise convolution 330. Thus, the spatial-to-depth operation 320 advantageously reduces latency and computational resources without reducing the information in the input data. In the illustrated bottleneck block 300, tC is used. in Depth-wise convolution kernels are used to perform depth-wise convolution 330, where each such kernel has a dimension of 1×3×3. Although the depth-wise convolution kernels are illustrated as having a spatial size of 3×3, in other examples, the depth-wise kernels may have any spatial size.

[0053] Although the illustrated example uses tC in Depth-wise convolution 330 is performed with depth-wise kernels, but other numbers of kernels may also be used. In some aspects, the number of depth-wise kernels used for depth-wise convolution 330 is selected to be consistent with the channel dimension of the previous layer (e.g., the previous layer of tensor 325).

[0054] Advantageously, due to the spatial-to-depth transformation 320, the depthwise convolution 330 can effectively be used as a dilated convolution (covering an increased receptive field in the original input tensor 305 compared to a conventional bottleneck), which can improve model accuracy.

[0055] As illustrated, the depthwise convolution 330 produces a vector with the same dimensions as the intermediate tensor 325 (e.g., ) another intermediate tensor 335 that matches.

[0056] After the depthwise convolution 330, the bottleneck block 300 includes a second pointwise convolution 340, which uses r 2 C out Point-wise convolution kernels are performed, each with dimension tC in ×1×1. The resulting intermediate tensor 345 has dimensions Although the examples shown use r 2 C out The second point-by-point convolution 340 is performed using a plurality of point-by-point kernels, although other numbers of kernels may be used. In some aspects, the number of kernels used for the point-by-point convolution 340 is selected to ensure that the resulting tensor 345 has r 2 C out channels, so that the final output tensor 355 has C out channels (after performing the depth-to-spatial transform 350).

[0057] The intermediate tensor 345 can then be transformed to have dimension C using the depth-to-space transform 350 out ×H×W output tensor 355. In some aspects, bottleneck block 300 is configured such that the dimensions of output tensor 355 match those of a conventional bottleneck block, thereby allowing efficient bottleneck blocks 300 to be easily replaced without reconfiguring the rest of the network.

[0058] In the bottleneck block 300 , the second point-wise convolution 340 aggregates the channel information in the output features of the depth-wise convolution 330 , and then applies a depth-to-space operation 350 .

[0059] Advantageously, the bottleneck block 300 may use approximately the same number of parameters but requires substantially fewer operations than a conventional bottleneck (without the spatial to depth transform 320 or the depth to spatial transform 350). For example, if a 3×3 kernel is used to perform the depthwise convolution 330, the conventional bottleneck block requires parameters, and can use tC in HW*(C in +9+C out ) MACs to execute. In contrast, the more efficient bottleneck block 300 requires parameters, and can be used This reduced number of MAC operations can reduce the latency and computing resources required to process data using bottleneck block 300.

[0060] In some aspects, bottleneck block 300 is selectively used based on the characteristics of the device performing the convolution. For example, if the computational resources (which may include processing power, memory, energy availability (e.g., whether the device is on battery power), etc.) meet certain thresholds, the system can use a conventional bottleneck. In contrast, if the processing device is a low-power device (such as a mobile device or other battery-powered device) with reduced computational resources or energy availability that does not meet the threshold, the system can replace the conventional bottleneck with an efficient bottleneck block 300 that uses spatial to deep and deep to spatial dimension transformations to improve computational efficiency. This can allow more powerful devices to retain the full accuracy of the model, while less powerful devices can achieve similar accuracy with reduced computational complexity.

[0061] In some aspects, if bottleneck block 300 is used, it can replace all bottlenecks in a given neural network architecture. However, in other aspects, bottleneck block 300 can be selectively used to replace only a subset of existing (conventional) bottlenecks. For example, bottleneck block 300 can be used to replace only the last conventional bottleneck in the architecture, the second to last bottleneck, all bottlenecks in the second half of the architecture, etc. This can improve the accuracy of the assembled model. Therefore, the amount of conventional bottleneck blocks replaced by efficient bottleneck blocks (such as 300) can be a hyperparameter in various examples.

[0062] Example bottleneck block with dimensionality transformation across depth-wise convolutions

[0063] Figure 4 An example bottleneck block 400 with dimensional transformations to improve processing efficiency is depicted. The bottleneck block 400 generally includes a depthwise convolution 430, a spatial to depth transform 420 and a corresponding depth to spatial transform 440 used before and after the bottleneck convolution, respectively. By using these dimensional transformations, the bottleneck block 400 can operate more efficiently (e.g., to reduce latency and computing resources).

[0064] Although for Figure 3 The bottleneck block 300 discussed uses a modified first point-wise convolution to reduce the channel depth of the input, but the bottleneck block 400 can use the same point-wise convolution as the conventional bottleneck. In the bottleneck block 400, spatial to depth operations and depth to spatial operations are applied across the depth-separable convolution layers (immediately before and after), as discussed in more detail below.

[0065] In bottleneck block 400, the input tensor 405 is first processed using a first 1×1 (point-wise) convolution 410. Specifically, the size of C in ×H×W input tensor 405 uses tCin Convolution is performed with point-wise convolution kernels, where each such kernel has C in ×1×1 dimensions, and where C ub is the number of channels in the input tensor 405, H and W are the spatial dimensions of the input tensor 405, t is the channel expansion ratio, and r is the spatial expansion ratio discussed above.

[0066] Although the illustrated example uses tC in The bottleneck block 400 shown in the example uses tC in The point-by-point kernels are convolved 410 point-by-point to reflect the traditional configuration of a conventional bottleneck block.

[0067] As illustrated in the figure, this first point-wise convolution produces a network with dimension tC in ×H×W intermediate tensor 415. That is, the intermediate tensor 415 has the same spatial dimension, but the channel depth only changes based on the channel expansion ratio t.

[0068] In bottleneck block 400, intermediate tensor 415 is then processed using a spatial to depth transform 420 (e.g., an element-based dimensional transform or a region-based dimensional transform) to generate an intermediate tensor 425 having increased depth (e.g., more channels) and reduced spatial dimensionality. In the illustrated example, intermediate tensor 425 has dimensions

[0069] The depthwise convolution 430 can then be applied to the tensor 425, which has a reduced spatial size compared to the original input tensor 405. Therefore, the depthwise convolution 430 can be performed using fewer computational operations, which is beneficial in reducing latency and computing resources. 2 tC in The depth-wise convolution kernels perform depth-wise convolution 430 (while the conventional block uses tC in kernels), where in this example each such kernel has a dimension of 1×3×3. Although the figure illustrates that the spatial size of the depth-wise convolution kernel is 3×3, in other examples, the depth-wise kernel can have any spatial size.

[0070] Although the examples shown use r 2 C in Depth-wise convolution 430 is performed with depth-wise kernels, but other numbers of kernels may also be used. In some aspects, the number of depth-wise kernels used for depth-wise convolution 430 is selected to be consistent with the channel dimension of the previous layer (e.g., the previous layer of tensor 425).

[0071] Advantageously, due to the spatial-to-depth transformation 420, the depthwise convolution 430 can effectively be used as a dilated convolution (covering an increased receptive field in the original input tensor 405 compared to a conventional bottleneck), which can improve model accuracy.

[0072] As illustrated, the depthwise convolution 430 produces a vector with the same dimensions as the intermediate tensor 425 (e.g., )The matching intermediate tensor 435.

[0073] After the depthwise convolution 430, the depth-to-spatial transformation 440 can then be used to transform the intermediate tensor 435 into a vector with dimensions tC in ×H×W intermediate tensor 445.

[0074] The bottleneck block 400 then includes a second point-wise convolution 450 which uses C out point-wise convolutions are performed on tensors, each with dimension tC in ×1×1. The resulting output tensor 455 has dimension C out ×H×W. In some aspects, bottleneck block 300 is configured such that the dimensions of output tensor 355 match those of a conventional bottleneck block, thereby allowing efficient bottleneck blocks 300 to be easily replaced without reconfiguring the rest of the network.

[0075] Although the examples shown use C out The second point-by-point convolution 450 is performed with a number of point-by-point kernels, although other numbers of kernels may be used. In some aspects, the number of kernels used for the point-by-point convolution 450 is selected to ensure that the resulting output tensor 455 has C out channels.

[0076] Advantageously, the bottleneck block 400 uses exactly the same number of operations (e.g., MACs) as a conventional bottleneck (without the spatial-to-depth transform 420 or the depth-to-spatial transform 440), while using slightly more parameters. For example, if a 3×3 kernel is used to perform the depthwise convolution 430, the conventional bottleneck block requires parameters, and can use tC in HW*(C ib +9+C out ) MACs to execute. In contrast, bottleneck block 400 requires the same number of operations and parameters.

[0077] In some respects, Figure 3In a similar manner to the bottleneck block 300 depicted in , the bottleneck block 400 can be selectively used based on the characteristics of the device performing the convolution (e.g., based on the computational resources of the device that will handle the bottleneck). Similarly, the bottleneck block 400 can be used to selectively replace only a subset of the regular bottlenecks in the architecture, such as replacing only the last regular bottleneck in the architecture, the second to last bottleneck, all bottlenecks in the second half of the architecture, etc. This can improve the accuracy of the assembled model.

[0078] Example method for processing data using cross-dimensional transformations of point-wise convolutions

[0079] Figure 5 is an example flow chart illustrating a method 500 for processing a data tensor in a bottleneck block using a dimensional transformation to improve processing efficiency. In one aspect, the method 500 corresponds to the method described above with reference to Figure 3 The bottleneck block 300 is described.

[0080] In some aspects, as discussed above, method 500 can be selectively used to replace one or more conventional bottlenecks in existing neural network architectures. For example, method 500 can be used by low-power devices, used only in selected portions of a model (e.g., in the second half of a model), etc.

[0081] The method 500 begins at block 505 by receiving an input tensor. In some cases, the input tensor may be a raw input to the model, while in other cases, the input tensor may be an output tensor of a previous layer in the model. Typically, the input tensor has a shape defined by a spatial dimension (e.g., height and width in the context of certain types of input data, such as image and video input data) and a channel dimension (also referred to as depth).

[0082] At block 510, a point-wise convolution is performed on the input tensor based at least in part on a spatial expansion ratio (also referred to in some aspects as a spatial factor) to generate an intermediate tensor. For example, the processing system may use a point-wise convolution to reduce the number of channels in the input tensor based in part on the spatial expansion ratio, as described above with reference to Figure 3 As discussed in point-by-point convolution 310 in .

[0083] Method 500 then continues to block 515, where a spatial to depth transform is applied to the intermediate tensor (generated using point-wise convolution in block 510) to reduce the spatial dimension of the intermediate tensor and increase the channel dimension while maintaining the volume of the intermediate tensor. The spatial to depth transform may include any suitable dimensionality transform, such as reference Figure 1 Element-by-element transformations discussed, reference Figure 2 The region-by-region transformation discussed, etc.

[0084] At block 520 , a depthwise convolution is performed on the transformed intermediate tensor to generate a second intermediate tensor.

[0085] The method 500 then proceeds to block 525, where a point-wise convolution is performed on the second intermediate tensor based at least in part on the spatial expansion ratio to aggregate channel information of the second intermediate tensor. Figure 3 As discussed, point-wise convolution can be used to change the number of channels in the second intermediate tensor based in part on the spatial expansion ratio. This produces a third intermediate tensor.

[0086] At block 530, a depth-to-space transform may be applied to the third intermediate tensor (generated using point-wise convolution in block 525) to increase the spatial dimension of the tensor and reduce the channel dimension while maintaining the volume of the tensor. As discussed above, the depth-to-space transform may generally include any suitable dimensionality transform, such as reference Figure 1 Element-by-element transformations discussed, reference Figure 2 The discussed region-by-region transforms, etc. In some aspects, the depth-to-spatial transform and the spatial-to-depth transform are selected to be complementary (eg, if an element-by-element spatial-to-depth transform is used, then an element-by-element depth-to-spatial transform should also be used).

[0087] As depicted in block 535, the resulting tensor may then be returned as an output of the bottleneck layer of the model (e.g., as an input to the next layer).

[0088] Example method for processing data using cross-dimensional transformations of depth-wise convolutions

[0089] Figure 6 is an example flow chart illustrating a method 600 for processing a data tensor in a bottleneck block using a dimensional transformation to improve processing efficiency. In one aspect, the method 600 corresponds to the method described above with reference to Figure 4 The bottleneck block 400 is depicted.

[0090] In some aspects, as discussed above, method 600 can be selectively used to replace one or more conventional bottlenecks in existing neural network architectures. For example, method 600 can be used by low-power devices, used only in selected portions of a model (e.g., only in the second half of a model), etc.

[0091] Method 600 begins at block 605 where an input tensor is received. As discussed above, this tensor is the input to the bottleneck layer, but may not be the original input to the model. That is, the input tensor may be the output tensor of a previous layer in the model. The input tensor has existing dimensions, including spatial dimensions (also referred to as height and width) and channel dimensions (also referred to as depth).

[0092] At block 610, a point-wise convolution is performed on the input tensor to generate an intermediate tensor. Figure 4As discussed above with respect to the point-by-point convolution 410 in , this can be a conventional point-by-point convolution. That is, since the method 400 uses dimensionality transformation immediately before and after the depth-wise convolution, existing conventional point-by-point convolution can be used.

[0093] Method 600 then continues to block 615, where a spatial to depth transform is applied to the intermediate tensor (generated using point-wise convolution in block 610) to reduce the spatial dimension of the intermediate tensor and increase the channel dimension while maintaining the volume of the intermediate tensor. The spatial to depth transform may include any suitable dimensionality transform, such as reference Figure 1 Element-by-element transformations discussed, reference Figure 2 The region-by-region transformation discussed, etc.

[0094] At block 620, based at least in part on the spatial expansion ratio, a bottleneck depthwise convolution is performed on the transformed intermediate tensor to generate a second intermediate tensor. Figure 4 As discussed above with respect to depthwise convolution 430 in , the depthwise convolution may be performed using a plurality of kernels defined at least in part according to the spatial expansion ratio. This produces a second intermediate tensor.

[0095] The method 600 then continues to block 625, where a depth-to-space transform is applied to the second intermediate tensor (generated using depth-wise convolution in block 620) to increase the spatial dimension of the tensor and reduce the channel dimension while maintaining the volume of the tensor. As discussed above, the depth-to-space transform may generally include any suitable dimensionality transform, such as reference Figure 1 Element-by-element transformations discussed, reference Figure 2 The region-by-region transformation discussed, etc.

[0096] At block 630, a point-wise convolution is performed on the transformed second tensor. Figure 4 As discussed in the point-by-point convolution 450 in , this can be a conventional point-by-point convolution. That is, since the method 400 uses dimensionality transformation immediately before and after the depth-wise convolution, existing conventional point-by-point convolution can be used.

[0097] As depicted in block 635 , the resulting tensor may then be returned as an output of the bottleneck layer of the model (e.g., returned to a subsequent layer of the model).

[0098] Example method for handling bottleneck layers using dimensionality transformation

[0099] Figure 7 is an example flow chart illustrating a method 700 for processing bottleneck blocks using dimensionality transformation to improve efficiency.

[0100] Method 700 begins at block 705 where a first tensor is received.

[0101] At block 710 , a first tensor is processed in a bottleneck block in a neural network model, including applying a spatial to depth tensor transform, applying a depth-wise convolution, and applying a depth-to-spatial tensor transform.

[0102] In some aspects, the space-to-depth tensor transform is configured to reduce the spatial dimension of an input tensor of the space-to-depth tensor transform by a spatial factor r, and to increase the channel dimension of the input tensor of the space-to-depth tensor transform by a spatial factor r, wherein the volume of the output vector of the space-to-depth tensor transform matches the volume of the input tensor of the space-to-depth tensor transform.

[0103] In some aspects, the depth-to-space tensor transform is configured to increase the spatial dimension of an input tensor of the depth-to-space tensor transform by a spatial factor r, and to reduce the channel dimension of the input tensor of the depth-to-space tensor transform by a spatial factor r, wherein the volume of the output vector of the depth-to-space tensor transform matches the volume of the input tensor of the depth-to-space tensor transform.

[0104] In some aspects, the spatial-to-depth tensor transformation is directly after the first point-wise convolution and directly before the depth-wise convolution of the bottleneck block.

[0105] In some aspects, the depth-to-spatial tensor transformation directly follows the second point-wise convolution of the bottleneck block.

[0106] In some aspects, the first point-wise convolution includes cores, where t is the channel expansion ratio, r is the spatial expansion ratio, and C in is the number of channels in the first tensor.

[0107] In some aspects, the output of the spatial-to-depth tensor transformation is of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

[0108] In some aspects, the depth-to-spatial tensor transformation directly precedes the second point-wise convolution of the bottleneck block.

[0109] In some aspects, the output of the spatial-to-depth tensor transformation is of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

[0110] In some aspects, method 700 also includes determining that an input tensor of the neural network model exceeds a spatial dimension threshold, and determining a spatial factor r based on a desired spatial dimension of a depthwise convolution of the bottleneck block.

[0111] In some aspects, method 700 also includes determining a computational power characteristic of a device processing a bottleneck block in the neural network model, and replacing a section of the neural network model with the bottleneck block based on the determined characteristic.

[0112] In some aspects, the neural network model includes multiple bottleneck blocks, and among the multiple bottleneck blocks, only the bottleneck blocks in the second half of the neural network model include a spatial to deep tensor transformation (or a deep to spatial tensor transformation).

[0113] The method 700 then continues to block 715, where subsequent blocks in the neural network model are optionally processed. That is, the processing system can use blocks or layers after the bottleneck block or layer to process data (e.g., tensor outputs of the bottleneck block).

[0114] Example processing system for efficient bottleneck processing using dimensionality transformation

[0115] In some respects, reference Figures 1 to 7 The described techniques, methods, and workflows may be implemented on one or more devices or systems.

[0116] Figure 8 An example processing system 800 is depicted that can be configured to perform aspects of the various methods described herein, including, for example, Figures 1 to 7 Aspects described.

[0117] Processing system 800 includes a central processing unit (CPU) 802, which in some examples may be a multi-core CPU. Instructions executed at CPU 802 may be loaded, for example, from a program memory associated with CPU 802 or may be loaded from memory partition 824.

[0118] The processing system 800 also includes additional processing components tailored for specific functions, such as a graphics processing unit (GPU) 804 , a digital signal processor (DSP) 806 , a neural processing unit (NPU) 808 , a multimedia processing unit 810 , and wireless connectivity components 812 .

[0119] An NPU, such as 808, is typically a dedicated circuit configured to implement all necessary control and arithmetic logic for executing machine learning algorithms, such as algorithms for processing artificial neural networks (ANNs), deep neural networks (DNNs), random forests (RFs), etc. An NPU is sometimes alternatively referred to as a neural signal processor (NSP), a tensor processing unit (TPU), a neural network processor (NNP), an intelligence processing unit (IPU), a vision processing unit (VPU), or a graphics processing unit.

[0120] NPUs such as 808 are configured to accelerate the execution of common machine learning tasks such as image classification, machine translation, object detection, and various other predictive models. In some examples, multiple NPUs may be instantiated on a single chip such as a system on a chip (SoC), while in other examples, multiple NPUs may be part of a dedicated neural network accelerator.

[0121] The NPU can be optimized for training or inference, or in some cases configured to balance performance between the two. For NPUs that can perform both training and inference, the two tasks can generally still be performed independently.

[0122] NPUs designed to accelerate training are generally configured to accelerate the optimization of new models, which is a highly computationally intensive operation that involves inputting an existing data set (usually labeled or tagged), iterating on the data set, and then adjusting model parameters (such as weights and biases) to improve model performance. Generally speaking, optimization based on error predictions involves passing back through the layers of the model and determining the gradient to reduce the prediction error.

[0123] NPUs designed to accelerate inference are generally configured to operate on complete models. Such NPUs can thus be configured to input new data slices and quickly process them through an already trained model to generate model output (e.g., inference).

[0124] In one implementation, the NPU 808 is part of one or more of the CPU 802 , the GPU 804 , and / or the DSP 806 .

[0125] In some examples, the wireless connectivity component 812 may include, for example, subcomponents for third generation (3G) connectivity, fourth generation (4G) connectivity (e.g., 4G LTE), fifth generation connectivity (e.g., 5G or NR), Wi-Fi connectivity, Bluetooth connectivity, and other wireless data transmission standards. The wireless connectivity processing component 812 is further connected to one or more antennas 814.

[0126] The processing system 800 may also include one or more sensor processing units 816 associated with any manner of sensors, one or more image signal processors (ISPs) 818 associated with any manner of image sensors, and / or a navigation processor 820, which may include satellite-based positioning system components (e.g., GPS or GLONASS) and inertial positioning system components.

[0127] The processing system 800 may also include one or more input and / or output devices 822, such as a screen, a touch-sensitive surface (including a touch-sensitive display), physical buttons, speakers, microphones, and the like.

[0128] In some examples, one or more processors of processing system 800 may be based on the ARM or RISC-V instruction set.

[0129] The processing system 800 also includes a memory 824, which represents one or more static and / or dynamic memories, such as dynamic random access memory, flash-based static memory, etc. In this example, the memory 824 includes computer-executable components that can be executed by one or more of the aforementioned processors of the processing system 800.

[0130] Specifically, in this example, the memory 824 includes a spatial to depth component 824A, a point-by-point convolution component 824B, an analysis component 824C, a training component 824D, a depth-to-spatial component 824E, a depth-by-depth convolution component 824F, an inference component 824G, and a set of model parameters 824H. These components can be configured according to one or more aspects described herein.

[0131] For example, the spatial-to-depth component 824A and the depth-to-spatial component 824E may be configured to perform spatial-to-depth and depth-to-spatial tensor transformations, respectively, as part of one or more bottleneck blocks in a neural network.

[0132] The point-wise convolution component 824B and the depth-wise convolution component 824F may be configured to perform point-wise convolution and depth-wise convolution, respectively, as part of one or more bottleneck blocks in a neural network.

[0133] The analysis component 824C can be configured to determine a spatial expansion ratio, determine whether to replace one or more conventional bottlenecks in the model with an efficient bottleneck block (having spatial to deep and depth to spatial transformation layers), and the like.

[0134] The training component 824D and the inference component 824G can generally be configured to respectively train one or more models (e.g., refine the set of model parameters 824H) and use the models (e.g., use the trained model parameters 824H) to generate inferences. Figure 3 and Figure 4 Those illustrated in ) can be trained by training component 824D.

[0135] The set of model parameters 824H may generally include parameters for one or more machine learning models (e.g., neural networks), including models using the efficient bottlenecks described herein.

[0136] The processing system 800 also includes a spatial to depth circuit 826 and a depth to spatial circuit 828, which may be configured to perform spatial to depth transforms and depth to spatial transforms, respectively, via hardware.

[0137] Although for the sake of clarity Figure 8 Although depicted as separate circuits in FIG. 8 , spatial to depth circuit 826 and depth to spatial circuit 828 may be implemented in other processing devices of processing system 800 , such as within CPU 802 , GPU 804 , DSP 806 , NPU 808 , and the like.

[0138] In general, the processing system 800 and / or its components may be configured to perform the methods described herein.

[0139] It is worth noting that in other aspects, aspects of the processing system 800 may be omitted, such as where the processing system 800 is a server computer, etc. For example, in other aspects, the multimedia component 810, the wireless connectivity 812, the sensor 816, the ISP 818, and / or the navigation component 820 may be omitted. Furthermore, aspects of the processing system 800 may be distributed among multiple devices.

[0140] The depicted components, as well as other components not depicted, may be configured to perform various aspects of the methods described herein.

[0141] Sample Clauses

[0142] Item 1: A method comprising: receiving a first tensor; and processing the first tensor in a bottleneck block in a neural network model, comprising: applying a spatial to depth tensor transform; applying depth-wise convolution; and applying a depth-to-spatial tensor transform.

[0143] Clause 2: A method according to clause 1, wherein the space-to-depth tensor transform is configured to: reduce the spatial dimension of the input tensor of the space-to-depth tensor transform by a spatial factor r; increase the channel dimension of the input tensor of the space-to-depth tensor transform by a spatial factor r, wherein the volume of the output vector of the space-to-depth tensor transform matches the volume of the input tensor of the space-to-depth tensor transform.

[0144] Clause 3: A method according to any one of clauses 1-2, wherein the depth-to-space tensor transform is configured to: increase the spatial dimension of an input tensor of the depth-to-space tensor transform by a spatial factor r; and reduce the channel dimension of the input tensor of the depth-to-space tensor transform by a spatial factor r, wherein the volume of the output vector of the depth-to-space tensor transform matches the volume of the input tensor of the depth-to-space tensor transform.

[0145] Clause 4: A method according to any of clauses 1-3, wherein the spatial to depth tensor transformation is directly after the first point-wise convolution and directly before the depth-wise convolution of the bottleneck block.

[0146] Clause 5: A method according to any of clauses 1-4, wherein the depth-to-spatial tensor transform directly follows the second point-wise convolution of the bottleneck block.

[0147] Clause 6: A method according to any one of clauses 1-5, wherein the first point-wise convolution comprises cores, where t is the channel expansion ratio, r is the spatial expansion ratio, and C in is the number of channels in the first tensor.

[0148] Clause 7: A method according to any one of clauses 1-6, wherein the output of the spatial to depth tensor transform is a tensor with dimensions A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

[0149] Clause 8: A method according to any of clauses 1-7, wherein the depth-to-spatial tensor transform directly precedes the second point-wise convolution of the bottleneck block.

[0150] Clause 9: A method according to any one of clauses 1-8, wherein the output of the spatial to depth tensor transform is a tensor of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

[0151] Clause 10: According to the method described in any one of clauses 1-9, the method further includes: determining that the input tensor of the neural network model exceeds a spatial dimension threshold; and determining the spatial factor r based on the required spatial dimension of the depth-wise convolution of the bottleneck block.

[0152] Clause 11: A method according to any one of clauses 1-10, the method further comprising: determining computing power characteristics of a device processing the bottleneck block in the neural network model; and replacing a section of the neural network model with the bottleneck block based on the determined characteristics.

[0153] Clause 12: A method according to any one of clauses 1-11, wherein the neural network model includes multiple bottleneck blocks, and wherein among the multiple bottleneck blocks, only the bottleneck blocks in the second half of the neural network model include a spatial to depth tensor transformation layer.

[0154] Clause 13: A system comprising: a memory comprising computer-executable instructions; and one or more processors configured to execute the computer-executable instructions and cause the processing system to perform the method according to any one of clauses 1-12.

[0155] Clause 14: A system comprising means for performing the method of any of clauses 1-12.

[0156] Clause 15: A non-transitory computer readable medium comprising computer executable instructions that, when executed by one or more processors of a processing system, cause the processing system to perform the method of any of clauses 1-12.

[0157] Clause 16: A computer program product embodied on a computer readable storage medium, the computer program product comprising code for performing the method according to any of clauses 1-12.

[0158] Additional considerations

[0159] The foregoing description is provided to enable any person skilled in the art to practice the various aspects described herein. The examples discussed herein are not limited to the scope, applicability or aspects set forth in the claims. Various modifications to these aspects will be apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects. For example, without departing from the scope of the present disclosure, the functions and arrangements of the elements discussed may be changed. Each example may ignore, replace or add each process or component as appropriate. For example, the described method may be performed in a different order than described, and various steps may be added, omitted or combined. In addition, the features described for some examples may be combined in some other examples. For example, any number of aspects set forth herein may be used to implement a device or practice method. In addition, the scope of the present disclosure is intended to cover such devices or methods practiced using other structures, functions, or structures and functions that are supplemented or substituted for the various aspects of the present disclosure set forth herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of the claims.

[0160] As used herein, the word “exemplary” means “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.

[0161] As used herein, a phrase referring to "at least one of" a list of items refers to any combination of those items (including single members). As an example, "at least one of a, b, or c" is intended to cover: a, b, c, ab, ac, bc, and abc, as well as any combination with multiple identical elements (e.g., aa, aaa, aab, aac, abb, acc, bb, bbb, bbc, cc, and ccc, or any other ordering of a, b, and c).

[0162] As used herein, the term "determining" encompasses a wide variety of actions. For example, "determining" may include calculating, computing, processing, deriving, investigating, searching (e.g., searching in a table, a database, or another data structure), ascertaining, and the like. Moreover, "determining" may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), and the like. In addition, "determining" may include resolving, selecting, choosing, establishing, and the like.

[0163] As used herein, in the context of sharing electronic signals and data between the various elements described herein, the term "connected to" generally refers to the data communication between the corresponding elements connected to each other. In some cases, the elements can be directly connected to each other, such as via one or more conductive traces, lines or other conductive carriers that can carry signals and / or data between the corresponding elements directly connected to each other. In other cases, the elements can be indirectly connected to each other, such as via one or more data buses or similar shared circuit systems and / or integrated circuit elements for conveying signals and data between the corresponding elements indirectly connected to each other.

[0164] The method disclosed herein includes one or more steps or actions for implementing the method. Method steps and / or actions can be interchangeable with each other without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions can be modified without departing from the scope of the claims. In addition, the various operations of the method described above can be performed by any appropriate component capable of performing the corresponding function. The component may include various hardware and / or software components and / or modules, including but not limited to circuits, application specific integrated circuits (ASICs) or processors. Typically, in the presence of operations illustrated in the accompanying drawings, those operations may have corresponding corresponding components with similar numbers plus functional components.

[0165] The following claims are not intended to be limited to the various aspects shown herein, but should be granted the full scope consistent with the language of the claims. Within the claims, unless otherwise specified, the reference to the singular element is not intended to mean "one and only one", but "one or more". Unless otherwise specified, the term "some" refers to one or more. No claim element should be interpreted according to the provisions of 35 U.S.C. § 112 (f), unless the phrase "parts for..." is used to expressly record the element, or in the case of a method claim, the phrase "step for..." is used to record the element. All structural and functional equivalents of the elements of the various aspects described throughout the present disclosure that are known or will be known later to a person of ordinary skill in the art are expressly incorporated herein by reference and are intended to be covered by the claims. In addition, regardless of whether such disclosures are explicitly cited in the claims, anything disclosed herein is not intended to be disclosed to the public.

Claims

1. A computer-implemented method, the method comprising: include: Receive the first tensor; as well as Processing the first tensor in a bottleneck block in the neural network model includes: Apply spatial to deep tensor transformation; Applying depthwise convolution; and Applies a depth-to-spatial tensor transform.

2. The method of claim 1, wherein the space-to-depth tensor transformation is configured as: Reducing the spatial dimension of an input tensor of the spatial-to-depth tensor transformation by a spatial factor r; and Increase the channel dimension of the input tensor of the spatial to depth tensor transformation by the spatial factor r, Wherein the volume of the output vector of the space-to-depth tensor transformation matches the volume of the input tensor of the space-to-depth tensor transformation.

3. The method of claim 1, wherein the depth-to-spatial tensor transformation is configured as: Increase the spatial dimension of the input tensor of the depth-to-spatial tensor transform by a spatial factor r; and reducing the channel dimension of the input tensor of the depth-to-spatial tensor transform by the spatial factor r, Wherein the volume of the output vector of the depth-to-space tensor transformation matches the volume of the input tensor of the depth-to-space tensor transformation.

4. The method of claim 1, wherein the spatial to depth tensor transformation is directly after a first point-wise convolution and directly before the depth-wise convolution of the bottleneck block.

5. The method of claim 4, wherein the depth-to-spatial tensor transformation is directly after the second point-wise convolution of the bottleneck block.

6. The method according to claim 5, wherein the first point-wise convolution comprises cores, where t is the channel expansion ratio, r is the spatial expansion ratio, and C in is the number of channels in the first tensor.

7. The method of claim 5, wherein the output of the space-to-depth tensor transformation is a tensor of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

8. The method of claim 4, wherein the depth-to-spatial tensor transformation directly precedes the second point-wise convolution of the bottleneck block.

9. The method of claim 8, wherein the output of the space-to-depth tensor transformation is a tensor of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

10. The method according to claim 1, further comprising: include: Determining that an input tensor of the neural network model exceeds a spatial dimension threshold; as well as A spatial factor r is determined based on a required spatial dimension of the depthwise convolution of the bottleneck block.

11. The method according to claim 1, further comprising: include: determining a computing power characteristic of a device processing the bottleneck block in the neural network model; as well as Sections of the neural network model are replaced with the bottleneck block based on the determined characteristics.

12. The method of claim 1, wherein the neural network model comprises a plurality of bottleneck blocks, and wherein among the plurality of bottleneck blocks, only the bottleneck blocks in the second half of the neural network model comprise a spatial-to-depth tensor transformation layer.

13. A non-transitory computer readable medium comprising computer executable instructions that, when executed by one or more processors of a processing system, cause the processing system to perform operations, the operations include: Receive the first tensor; as well as Processing the first tensor in a bottleneck block in the neural network model includes: Apply spatial to deep tensor transformation; Applying depthwise convolution; and Applies a depth-to-spatial tensor transform.

14. The non-transitory computer readable medium of claim 13, wherein the space-to-depth tensor transform is configured to: Reducing the spatial dimension of an input tensor of the spatial-to-depth tensor transformation by a spatial factor r; and Increase the channel dimension of the input tensor of the spatial to depth tensor transformation by the spatial factor r, Wherein the volume of the output vector of the space-to-depth tensor transformation matches the volume of the input tensor of the space-to-depth tensor transformation.

15. The non-transitory computer readable medium of claim 13, wherein the depth-to-spatial tensor transform is configured to: Increase the spatial dimension of the input tensor of the depth-to-spatial tensor transform by a spatial factor r; and reducing the channel dimension of the input tensor of the depth-to-spatial tensor transform by the spatial factor r, Wherein the volume of the output vector of the depth-to-space tensor transformation matches the volume of the input tensor of the depth-to-space tensor transformation.

16. The non-transitory computer-readable medium of claim 13, wherein the spatial to depth tensor transform is directly after a first point-wise convolution and directly before the depth-wise convolution of the bottleneck block.

17. The non-transitory computer-readable medium of claim 16, wherein the depth-to-spatial tensor transform is directly after the second point-wise convolution of the bottleneck block.

18. The non-transitory computer readable medium of claim 17, wherein the first point-wise convolution comprises cores, where t is the channel expansion ratio, r is the spatial expansion ratio, and C in is the number of channels in the first input tensor.

19. The non-transitory computer readable medium of claim 17, wherein the output of the space-to-depth tensor transform is a vector of dimensions A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

20. The non-transitory computer readable medium of claim 16, wherein the depth-to-spatial tensor transform directly precedes the second point-wise convolution of the bottleneck block.

21. The non-transitory computer readable medium of claim 20, wherein the output of the space-to-depth tensor transform is a vector of dimensions A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

22. The non-transitory computer readable medium of claim 13, wherein the operation further comprises: include: Determining that an input tensor of the neural network model exceeds a spatial dimension threshold; as well as A spatial factor r is determined based on a required spatial dimension of the depthwise convolution of the bottleneck block.

23. The non-transitory computer readable medium of claim 13, wherein the operation further comprises: include: determining a computing power characteristic of a device processing the bottleneck block in the neural network model; as well as Sections of the neural network model are replaced with the bottleneck block based on the determined characteristics.

24. The non-transitory computer-readable medium of claim 13, wherein the neural network model comprises a plurality of bottleneck blocks, and wherein among the plurality of bottleneck blocks, only bottleneck blocks in a second half of the neural network model comprise a spatial-to-depth tensor transformation.

25. A processing system, the processing system include: a memory including computer executable instructions; and one or more processors configured to execute the computer-executable instructions and cause the processing system to perform operations comprising: receiving a first tensor; and Processing the first tensor in a bottleneck block in the neural network model includes: Apply spatial to deep tensor transformation; Applying depthwise convolution; and Applies a depth-to-spatial tensor transform.

26. The processing system of claim 25, wherein the spatial to depth tensor transform is directly after a first point-wise convolution and directly before the depth-wise convolution of the bottleneck block.

27. The processing system of claim 26, wherein the depth-to-spatial tensor transform directly follows the second point-wise convolution of the bottleneck block.

28. The processing system of claim 26, wherein the first point-wise convolution comprises cores, where t is the channel expansion ratio, r is the spatial expansion ratio, and C in is the number of channels in the first tensor.

29. The processing system of claim 26, wherein the output of the space-to-depth tensor transform is a tensor of dimension A tensor of , where t is the channel expansion ratio, r is the spatial expansion ratio, C in is the number of channels in the first tensor, and H and W are the spatial dimensions of the first tensor.

30. The processing system of claim 25, wherein the depth-to-spatial tensor transform directly precedes the second point-wise convolution of the bottleneck block.

Citation Information

Patent Citations

  • Dimensionality transformation for efficient bottleneck processing

    US20230259773A1