Method, system and storage medium for reducing resource requirements of neural models
The neural network model is compressed through tensor ring (TR) decomposition, which solves the problem of deploying complex neural networks on resource-constrained devices, and achieves efficient resource use and model accuracy maintenance.
Patent Information
- Application Number
- CN202111131670.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-10-21
- Filing Date
- 2021-09-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-09-26
AI Technical Summary
Using complex neural networks, such as 3D-CNN, on resource-constrained devices, faces high demands of computing and storage resources when performing video comprehension tasks, making it difficult to deploy.
The neural network model is compressed by tensor ring (TR) decomposition method to reduce the resource requirements of the model. Specific steps include TR decomposition of the neural network layer, adjusting the rank to meet an acceptable output threshold, and retraining the model after the threshold is met.
It realizes efficient deployment of large-scale deep learning models on resource-constrained devices, saving 10x-20x model size, improving inference speed and reducing power consumption, while maintaining high model accuracy.
Smart Images

Figure CN114386562B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to systems and methods for computer learning that can provide improved computer performance, features, and uses. More specifically, the present disclosure relates to systems and methods that can use complex neural networks on resource-constrained devices. Background Art
[0002] Neural networks have achieved great success in many fields, such as computer vision, natural language processing, recommendation systems, etc. One type of neural network is the convolutional neural network. Three-dimensional convolutional neural networks (3D-CNNs) have been applied to various video understanding tasks, such as classification, action recognition, and segmentation. However, the spatial and computational complexity of 3D-CNNs is much greater than that of traditional two-dimensional convolutional neural networks. Therefore, it becomes very difficult or impossible to use 3D-CNNs to perform video understanding tasks on resource-constrained devices such as mobile phones and cameras.
[0003] Therefore, what is needed is a way that complex neural networks such as 3D-CNNs can be utilized on resource-constrained devices. Summary of the invention
[0004] A first aspect of the present invention provides a computer-implemented method for reducing resource requirements of a neural model. The method includes given a trained multidimensional neural network including one or more neural network NN layers: for each neural network layer from a set of one or more neural network layers of the trained multidimensional neural network, using tensor ring TR decomposition to approximate the neural network layer to obtain a TR-decomposed NN layer and obtain a corresponding TR-decomposed multidimensional neural network including one or more TR-decomposed NN layers; using validation data on the TR-decomposed NN layer or on the TR-decomposed multidimensional neural network, compared with the output from the corresponding NN layer of the trained multidimensional neural network or the output from the trained multidimensional neural network, determine whether the output is within an acceptable threshold; in response to the output not meeting the acceptable threshold: increasing the rank of the TR decomposition of one or more NN layers in the set of one or more neural network layers; and returning to for each neural network layer in the set of one or more neural network layers from the trained multidimensional neural network, using TR decomposition to approximate the neural network layer to obtain a TR-decomposed NN layer and obtain a corresponding TR-decomposed multidimensional neural network including one or more TR-decomposed NN layers; and in response to the output meeting the acceptable threshold: retraining the TR-decomposed multidimensional neural network using the training data set until a stop condition is reached; and outputting the retrained TR-decomposed multidimensional neural network.
[0005] A second aspect of the present invention provides a non-transitory computer-readable medium comprising one or more instruction sequences, which, when executed by at least one processor, cause the at least one processor to perform the method according to the first aspect.
[0006] A third aspect of the present invention provides a system, comprising one or more processors and a memory connected to the one or more processors in communication. The memory stores instructions executed by the one or more processors, and the instructions are executed by the one or more processors to enable the one or more processors to execute the method according to the first aspect.
[0007] A fourth aspect of the present invention provides a computer program product, comprising a computer program, wherein the computer program implements the method according to the first aspect when executed by a processor.
[0008] Using the method of the present invention, complex neural networks such as 3D-CNN can be utilized on resource-constrained devices, allowing large deep learning models to be deployed on embedded devices in a resource-efficient manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Reference will be made to embodiments of the present disclosure, examples of which may be shown in the accompanying drawings. These drawings are intended to illustrate rather than limit. Although the present disclosure is generally described in the context of these embodiments, it should be understood that it is not intended to limit the scope of the present disclosure to these specific embodiments. Items in the drawings may not be drawn to scale.
[0010] Figure 1 Depicted is a tensor ring (TR) decomposition according to an embodiment of the present disclosure.
[0011] Figure 2 Depicted is an example flow of a 3D convolutional neural network according to an embodiment of the present disclosure.
[0012] Figure 3 Depicted is an example of a 3D convolutional neural network in accordance with an embodiment of the present disclosure.
[0013] Figure 4 Depicted is a method for compressing a neural network using tensor ring decomposition according to an embodiment of the present disclosure.
[0014] Figure 5 A method for performing tensor ring decomposition according to an embodiment of the present disclosure is depicted.
[0015] Figure 6 Depicted is the use of a compressed, trained model in accordance with an embodiment of the present disclosure.
[0016] Figure 7 Depicted is a simplified block diagram of a computing device / information processing system in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In the following description, for the purpose of explanation, specific details are set forth in order to provide an understanding of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure can be practiced without these details. In addition, those skilled in the art will recognize that the embodiments of the present disclosure described below can be implemented in a variety of ways, such as a process, device, system, apparatus, or method on a tangible computer-readable medium.
[0018] The components or modules shown in the figures are illustrations of exemplary embodiments of the present disclosure and are intended to avoid obscuring the present disclosure. It should also be understood that throughout the discussion, components may be described as separate functional units, which may include subunits, but those skilled in the art will recognize that various components or portions thereof may be divided into separate components or may be integrated together, including, for example, in a single system or component. It should be noted that the functions or operations discussed herein may be implemented as components. Components may be implemented in software, hardware, or a combination thereof.
[0019] In addition, the connections between the components or systems in the figure are not intended to be limited to direct connections. Instead, the intermediate components can modify, reformat or otherwise change the data between these components. Similarly, more or fewer connections can be used. It should also be noted that the terms "coupled", "connected", "communication coupled", "interfaced", "interfaced" or any derivatives thereof should be understood to include direct connections, indirect connections through one or more intermediate devices, and wireless connections. It should also be noted that any communication, such as signals, responses, replies, confirmations, messages, inquiries, etc., can include one or more information exchanges.
[0020] References in the specification to "one or more embodiments", "preferred embodiments", "one embodiment", "multiple embodiments", etc. mean that the specific features, structures, characteristics, or functions described in conjunction with the embodiments are included in at least one embodiment of the present disclosure, and may be in more than one embodiment. Likewise, the appearance of the above phrases in various places in the specification does not necessarily all refer to the same embodiment or embodiments.
[0021] The use of certain terms in various places in the specification is for illustrative purposes and should not be construed as limiting. Services, functions, or resources are not limited to a single service, function, or resource; the use of these terms may refer to groupings of related services, functions, or resources, which may be distributed or aggregated. The terms "include" and "comprise" should be understood as open terms, and any list below is an example and is not meant to be limited to the items listed. A "layer" may include one or more operations. The words "optimal," "optimized," and the like refer to improvements in results or processes, without the need for a particular result or process to have reached an "optimal" state or peak state. The use of memory, database, repository, data store, table, hardware, cache, and the like may be used herein to refer to one or more system components in which information may be entered or otherwise recorded.
[0022] In one or more embodiments, stopping conditions may include: (1) a set number of iterations have been executed; (2) a certain processing time has been reached; (3) convergence (e.g., the difference between consecutive iterations is less than a first threshold); (4) divergence (e.g., performance degradation); and (5) acceptable results have been achieved.
[0023] Those skilled in the art should recognize that: (1) certain steps may be performed optionally; (2) the steps may not be limited to the specific order described herein; (3) certain steps may be performed in a different order; and (4) certain steps may be performed simultaneously.
[0024] Any headings used herein are for organizational purposes only and should not be used to limit the scope of the specification or claims.Each reference / document mentioned in the patent document is incorporated herein by reference in its entirety.
[0025] It should be noted that any experiments and results provided herein are provided in an illustrative manner and are performed under specific conditions using one or more specific embodiments; therefore, these experiments and their results shall not be used to limit the scope of disclosure of the current patent document.
[0026] A. General Introduction
[0027] Machine learning models are being used in an increasing number of applications. However, as the complexity of the tasks solved using machine learning increases, so do the models. For example, consider video content analysis. Conventional approaches to this problem generally fall into two categories: (1) directly using 3D-CNN models or their variants to analyze video content; (2) using 2D CNNs and recurrent convolutional networks to perform video understanding tasks. However, each of these existing approaches has drawbacks. The first group tends to consume a large amount of computational and memory resources; thereby making them difficult, if not impossible, to deploy on resource-limited embedded devices. As mentioned above, the complex neural networks involved in the computation may require quite extensive resources (e.g., power, memory, computing power, etc.) to run. However, devices without sufficient resources (e.g., not enough power, memory, processing power) may not be able to use such models. They may also be quite slow during inference. The second group may also suffer from the same problems as the first group, but they also tend to be poor at capturing temporal information in videos and learning temporal representations.
[0028] Tensor decomposition has been shown to be effective for solving many problems in signal processing and machine learning. In particular, compressing deep convolutional neural networks using various tensor decomposition techniques has become very popular among computer vision and deep learning researchers and practitioners.
[0029] In this patent document, embodiments are presented that use a novel tensor ring decomposition method to compress neural network models and thereby allow large deep learning models to be deployed on embedded devices in a resource-efficient manner.
[0030] B. Tensor Ring (TR) Decomposition Example
[0031] There are many forms of tensor decomposition, such as Canonical Polyadic (CP) decomposition, Tucker decomposition, tensor chain decomposition, and tensor ring decomposition. Various embodiments herein focus on tensor ring (TR) decomposition because it is more compact than CP decomposition and Tucker decomposition and more stable than tensor chain decomposition in training, especially for convolutional neural networks.
[0032] like Figure 1 As shown in the figure, the tensor ring (TR) decomposition aims to represent a high-order or high-dimensional tensor 105 by a sequence of cyclically multiplied third-order tensors 110. That is, given a tensor It can be decomposed into TR format:
[0033]
[0034] in is a collection of tensor cores, where Note that the size of the last tensor core is R N ×I N ×R1, that is, R N+1 = R1, which relaxes R in the tensor chain decomposition N+1 =R1=1. Tr represents the tracking operation. The parameter size of the tensor is reduced through the tensor ring format.
[0035] The tensor ring format can be considered as a linear combination of the tensor chain format, which has the property of cyclic dimension permutation invariance and does not require strict ordering of multilinear products between kernels due to tracking operations. Therefore, it intuitively provides more powerful and more general representation capabilities than the tensor chain format. In one or more embodiments, tensor ring decomposition is used to compress neural networks, which will be discussed in the next section.
[0036] C. Example of TR Decomposition for Neural Networks
[0037] It should be noted that while the embodiments described herein may be within the context of a convolutional neural network, aspects of the disclosure are not limited thereto. Thus, aspects of the disclosure may be applied or adapted for use with other neural networks and in other contexts. For example, the embodiments may be extended to scale down other large models for other tasks beyond video understanding with spatiotemporal data, such as analyzing pure 3D data from a depth camera, recognizing stacked utterances from speech data, and the like.
[0038] Three-dimensional convolutional neural networks (3D-CNNs) can be used for various video understanding tasks such as classification, action recognition, and segmentation. Figure 2 As shown in , given a video input 205, a 3D convolutional neural network 210 can be used to analyze its content from both the spatial and temporal domains and produce a prediction output 215. For example, the 3D convolutional neural network can predict and classify whether there are people participating in an activity in the video.
[0039] Figure 3 An example of a 3D convolutional neural network according to an embodiment of the present disclosure is depicted. As shown, the example 3D CNN includes five convolutional layers 305, 315, 325, 335 and 345, five pooling layers 310, 320, 330, 340 and 350, a fully connected layer 355 and a softmax layer 360. The 3D CNN 300 receives a video input 302 and predicts one or more video classification results 365. The numbers (64, 128, etc.) in the convolutional layer block represent the number of filters used in the convolution operation, the kernel is 3D (e.g., 3×3×3 or 5×5×5), and the stride is 1. It should be noted that Figure 3The embodiment depicted in is an example of a 3D CNN - other embodiments may also be used. Given a 3D CNN, the goal is to obtain a corresponding three-dimensional (3D) convolution whose kernel is in the tensor ring format for a video understanding task.
[0040] In one or more embodiments, each convolution layer of a set of one or more convolution layers of a 3D-CNN model can be compressed. That is, the 3D convolution kernel in the layer can be reconstructed into a d-order tensor with a relatively balanced size, on which the TR format can be used. For the 3D convolution kernel, Mapping can be done to move entries from Transferred to a new fourth-order tensor, With the constraint thw = k1k2. Given the values of k1 and k2, we can construct Tensor core of .
[0041] The compression ratio that can be achieved using the embodiments of this article is related to the rank of the tensor ring. In general, using tensor ring decomposition, there are parameters, rather than Parameters. Note that i is one of the N factors used to factorize the weight tensor.
[0042] Figure 4 A method for compressing a neural network using tensor ring decomposition according to an embodiment of the present disclosure is depicted. Given a neural network, such as a 3D CNN, and a set of training data with ground truth, a neural network model is trained (405) to obtain a trained multidimensional neural network. In one or more embodiments, given the trained multidimensional neural network, for each neural network layer in a set of one or more neural network layers from the trained multidimensional neural network, the neural network layer is approximated using (410) tensor ring (TR) decomposition to obtain a TR-decomposed neural network layer, and a corresponding TR-decomposed multidimensional neural network is obtained, which includes the one or more TR-decomposed neural network layers. In one or more embodiments, this set of neural network layers can be all neural networks of the model, all neural networks of a certain type or types, or a subset thereof.
[0043] In one or more embodiments, the performance of the compressed layer or the performance on the entire compressed model can be checked for acceptability. Therefore, in one or more embodiments, validation data can be applied (415) to the TR-decomposed neural network layer or the TR-decomposed multidimensional neural network model to determine whether the output (e.g., layer output or model output) is within an acceptable threshold. In one or more embodiments, the acceptable threshold can be based on a comparison of the output from the compressed layer or model with the output from the corresponding neural network layer of the trained multidimensional neural network or the output from the trained multidimensional neural network.
[0044] In response to the output not satisfying (425) an acceptable threshold or range, the rank of the TR decomposition of one or more neural network layers in the set of one or more neural network layers can be increased (430) and the process returned to step 410.
[0045] In one or more embodiments, in response to the output satisfying (425) an acceptable threshold, the TR-decomposed multidimensional neural network can be retrained (435) using the training data set until a stopping condition is reached. In one or more embodiments, the training data set can be the same data set as the data used to initialize the training model, or can be a different data set. After retraining, the retrained TR-decomposed multidimensional neural network can be output (440) for use. It should be noted that the retrained TR-decomposed multidimensional neural network requires fewer resources to store and operate than the original neural network. Therefore, the retrained TR-decomposed multidimensional neural network can be more widely deployed because even resource-constrained devices can be used.
[0046] Figure 5 A method for performing a tensor ring decomposition according to an embodiment of the present disclosure is depicted. In one or more embodiments, certain data may be initialized (505), input data, output channels (S), input / output channel patterns (parameters for TR decomposition), rank, and kernel size (set per layer). Given a dimensionality constraint, where the reduced dimension is at least equal to a subset of the dimension of the neural network layer, where the subset of the dimension has more dimensions than the reduced dimension, the value of the reduced dimension is approximated (510). For example, in one or more embodiments, given a kernel of Then the constraint to reduce the dimensionality may be t×h×w=k1×k2, and recursion may be used to approximate the values of k1 and k2.
[0047] In one or more embodiments, for a neural network to be TR decomposed, a tensor core is constructed for a tensor for this layer using the reduced dimension values (e.g., values k1 and k2), a pattern of input / output channels for a neural network layer, one or more ranks for the neural network layer, and parameter weights for the neural network layer. For example, in one or more embodiments, the values k1 and k2, the input / output channel pattern, one or more ranks, and parameter weights for a convolutional layer are used (515) to construct a tensor core for a corresponding tensor. In one or more embodiments, the tensor cores are used to generate (520) their corresponding tensors. For example, given a tensor core for a convolutional neural network layer, a fourth-order tensor may be generated
[0048] In one or more embodiments, given a tensor, the tensor is reshaped (525) into a kernel using a mapping. For example, given a fourth-order tensor The fourth-order tensor can be reshaped into a 3D convolution kernel using mapping The layer is thereby compressed. In one or more embodiments, this process can be performed on multiple layers in the model.
[0049] Finally, in one or more embodiments, the output of the TR decomposition neural network layer is calculated (530) using the layer's input data and the kernel. As described above, depending on the embodiment, the compressed output of the layer can be compared with the original output of the layer to check whether its accuracy is still acceptable, or whether the layer should undergo a compression process using one or more different parameters. Alternatively or additionally, the overall output of the compressed model can be checked to determine whether it is acceptable, such as Figure 4 discussed in .
[0050] Figure 6 Depicted is the use of a compressed, trained model in accordance with an embodiment of the present disclosure. In one or more embodiments, given a trained TR-decomposed model, it is stored (605) on a device that uses less memory than the original model that was trained. Because the compressed model uses fewer resources—both to store and operate—the model can be deployed on resource-constrained devices, such as embedded devices. Assuming the model is a 3D CNN, the compressed model can receive (610) an input video and output (615) its predictions.
[0051] Those skilled in the art will recognize that embodiments have several advantages. For example, by decomposing the tensor ring, models such as 3D-CNN models can be compressed and deployed on resource-constrained devices. Figure 3 The 3D-CNN with 5 convolutional layers shown in , when compressed using one of the embodiments in this article, can save 10x-20x model size. The exact size saved will depend on the tensor ring rank used. With a smaller model size, during inference, the compressed model runs much faster than its original traditional model and consumes less power. In addition, compared with other tensor decomposition methods, the TR compressed model can achieve better performance in terms of stability and model accuracy.
[0052] D. Computing System Embodiments
[0053] In one or more embodiments, aspects of the present patent document may be directed to, may include, or may be implemented on one or more information processing systems (or computing systems). An information processing system / computing system may include any tool or aggregation of tools operable to compute, calculate, determine, classify, process, send, receive, retrieve, initiate, route, switch, store, display, communicate, display, detect, record, copy, process, or utilize any form of information, intelligence, or data. For example, a computing system may be or may include a personal computer (e.g., a laptop), a tablet computer, a mobile device (e.g., a personal digital assistant (PDA), a smart phone, a tablet phone, a tablet computer, etc.), a smart watch, a server (e.g., a blade server or a rack server), a network storage device, a camera, or any other suitable device, and may vary in size, shape, performance, functionality, and price. The computing system may include random access memory (RAM), one or more processing resources such as a central processing unit (CPU) or hardware or software control logic, read-only memory (ROM), and / or other types of memory. Additional components of a computing system may include one or more disk drives, one or more network ports for communicating with external devices and various input and output (I / O) devices, such as a keyboard, mouse, stylus, touch screen, and / or video display. A computing system may also include one or more buses operable to transmit communications between various hardware components.
[0054] Figure 7 A simplified block diagram of an information processing system (or computing system) according to an embodiment of the present disclosure is depicted. It will be appreciated that the functionality shown for system 700 may operate to support various embodiments of the computing system - although it should be appreciated that the computing system may be configured differently and include different components, including having fewer or more components, such as Figure 7 as shown in .
[0055] like Figure 7 As shown in , the computing system 700 includes one or more central processing units (CPUs) 701, which provide computing resources and control the computer. CPU 701 can be implemented with a microprocessor, etc., and can also include one or more graphics processing units (GPUs) 702 and / or floating point coprocessors for mathematical calculations. In one or more embodiments, one or more GPUs 702 can be incorporated into a display controller 709, such as part of one or more graphics cards. System 700 can also include system memory 719, which can include RAM, ROM, or both.
[0056] like Figure 7As shown in , multiple controllers and peripherals may also be provided. Input controller 703 represents an interface to various input devices 704 such as a keyboard, mouse, touch screen and / or stylus. The computing system 700 may also include a storage controller 707 for interfacing with one or more storage devices 708, each storage device 708 including a storage medium such as a tape or disk, or an optical medium that can be used to record a program of instructions for an operating system, utility program and application, which may include an embodiment of a program that implements various aspects of the present disclosure. According to the present disclosure, the storage device 708 may also be used to store processed data or data to be processed. The system 700 may also include a display controller 709 for providing an interface to a display device 711, which may be a cathode ray tube (CRT) display, a thin film transistor (TFT) display, an organic light emitting diode, an electroluminescent panel, a plasma panel, or any other type of display. The computing system 700 may also include one or more peripheral device controllers or interfaces 705 for one or more peripheral devices 706. Examples of peripheral devices may include one or more printers, scanners, input devices, output devices, sensors, and the like. The communication controller 714 may interface with one or more communication devices 715, which enables the system 700 to connect to remote devices via any of a variety of networks including the Internet, cloud resources (e.g., Ethernet cloud, Fibre Channel over Ethernet (FCoE) / Data Center Bridging (DCB) cloud, etc.), a local area network (LAN), a wide area network (WAN), a storage area network (SAN), or via any suitable electromagnetic carrier signals including infrared signals. As shown in the depicted embodiment, the computing system 700 includes one or more fans or fan trays 718 and one or more cooling subsystem controllers 717 that monitor the thermal temperature of the system 700 (or its components) and operate the fans / fan trays 718 to help regulate the temperature.
[0057] In the illustrated system, all major system components may be connected to bus 716, which may represent more than one physical bus. However, various system components may or may not be physically close to each other. For example, input data and / or output data may be remotely transmitted from one physical location to another physical location. In addition, programs that implement various aspects of the present disclosure may be accessed from a remote location (e.g., a server) over a network. Such data and / or programs may be transmitted via any of a variety of machine-readable media, including, for example, magnetic media such as hard disks, floppy disks, and tapes; and optical media such as CD-ROMs and holographic devices; magneto-optical media; and hardware devices specifically configured to store or store and execute program code, such as application specific integrated circuits (ASICs), programmable logic devices (PLDs), flash memory devices, other non-volatile memory (NVM) devices (such as 3D XPoint-based devices), and ROM and RAM devices.
[0058] Aspects of the present disclosure may utilize instructions for one or more processors or processing units to cause steps to be performed to be encoded on one or more non-transitory computer-readable media. It should be noted that one or more non-transitory computer-readable media should include volatile and / or non-volatile memory. It should be noted that alternative implementations are possible, including hardware implementations or software / hardware implementations. ASICs, programmable arrays, digital signal processing circuits, etc. can be used to implement the functions of hardware implementations. Therefore, the term "device" in any claim is intended to cover software and hardware implementations. Similarly, the term "computer-readable medium" used herein includes software and / or hardware, or a combination thereof, on which a program including instructions is included. In view of these alternatives to implementation, it should be understood that the drawings and the accompanying descriptions provide the functional information required for those skilled in the art to write program code (i.e., software) and / or manufacture circuits (i.e., hardware) to perform the desired processing.
[0059] It should be noted that embodiments of the present disclosure may further relate to computer products having non-transitory, tangible computer-readable media having computer code thereon for performing various computer-implemented operations. The media and computer code may be those specially designed and constructed for the purposes of the present disclosure, or they may be those known or available to those skilled in the relevant art. Examples of tangible computer-readable media include, for example: magnetic media such as hard disks, floppy disks, and tapes; optical media such as CD-ROMs and holographic devices; magneto-optical media; and hardware devices specially configured to store or store and execute program code, such as application specific integrated circuits (ASICs), programmable logic devices (PLDs), flash memory devices, other non-volatile memory (NVM) devices (such as 3D XPoint-based devices), and ROM and RAM devices. Examples of computer code include machine code, such as machine code generated by a compiler and files containing higher-level code executed by a computer using an interpreter. Embodiments of the present disclosure may be implemented in whole or in part as machine executable instructions, which may be in program modules executed by a processing device. Examples of program modules include libraries, programs, routines, objects, components, and data structures. In a distributed computing environment, program modules may be physically located locally, remotely, or both.
[0060] Those skilled in the art will recognize that no computing system or programming language is essential for the practice of the present disclosure. Those skilled in the art will also recognize that many of the above elements can be physically and / or functionally separated into modules and / or sub-modules or combined together.
[0061] Those skilled in the art will appreciate that the foregoing examples and embodiments are exemplary and do not limit the scope of the present disclosure. It is intended that all permutations, enhancements, equivalents, combinations and improvements that are apparent to those skilled in the art through reading the specification and studying the drawings are included within the true spirit and scope of the present disclosure. It should also be noted that the elements of any claim may be arranged differently, including having multiple dependencies, configurations and combinations.
Claims
1. A method for reducing resource requirements of a neural model, comprising: Given a trained three-dimensional convolutional neural network 3D CNN comprising one or more convolutional neural network CNN layers, wherein the input of the three-dimensional convolutional neural network 3D CNN is video data: For each CNN layer in the set of one or more CNN layers from the trained 3D CNN, approximate the CNN layer using a tensor ring TR decomposition to obtain a TR-decomposed CNN layer and obtain a corresponding TR-decomposed 3D CNN including the one or more TR-decomposed CNN layers; Using the validation data on the TR-decomposed CNN layer or the TR-decomposed 3D CNN, determine whether the output is within an acceptable threshold compared to the output of the corresponding NN layer from the trained 3D CNN or the output from the trained 3D CNN; In response to the output not meeting the acceptance threshold: Increasing the rank of the TR decomposition of one or more CNN layers in the set of one or more neural network layers; and Returning to, for each CNN layer in the set of one or more CNN layers from the trained 3D CNN, approximating the CNN layer using TR decomposition to obtain a TR decomposed CNN layer and obtaining a corresponding TR decomposed 3D CNN including the one or more TR decomposed CNN layers; and In response to the output meeting an acceptance threshold: Retraining the TR-decomposed 3D CNN using the training dataset until a stopping condition is reached; and Outputting a retrained TR-decomposed 3D CNN, the retrained TR-decomposed 3D CNN requires a smaller memory to store than the trained 3D CNN; Wherein, for each CNN layer in a set of one or more CNN layers from a trained 3D CNN, approximating the CNN layer using TR decomposition to obtain a TR-decomposed CNN layer and obtaining a corresponding TR-decomposed 3D CNN including the one or more TR-decomposed CNN layers, comprising: For CNN layers including output channels, input channel mode, output channel mode, rank of TR decomposition, and kernel size with multiple dimensions: approximating a value of a reduced dimension given a constraint, where the reduced dimension is at least equal to a subset of the dimensions of the neural network layer, where the subset of dimensions has more dimensions than the reduced dimension; Constructs a tensor core of a tensor using the values of the reduced dimension, the input / output channel pattern, rank, and parameter weights of the CNN layer; Generate tensors using tensor cores; Given a tensor, reshape the tensor into a kernel using mapping; and compute the output of the TR decomposed CNN layer using the input data of the TR decomposed CNN layer and the kernel.
2. The method according to claim 1, characterized in that The kernel size of the multiple dimensions is the length of the channel t × h × w × C × Number of filters S, The constraints are k 1× k 2 = t × h × w, The reduced dimensionality is approximately k 1 and k 2, the tensor is a 4th-order tensor, and the kernel is a 3D convolution kernel. The method of claim 1 , wherein the values of the reduced dimension are approximated using recursion.
4. The method of claim 2, wherein a recursive approximation is used k 1 and k The value of 2.
5. The method of claim 1, further comprising: The retrained TR-decomposed 3D CNN is stored on a computing device for execution, wherein the retrained TR-decomposed 3D CNN uses less memory of the computing device than the trained 3D CNN.
6. A non-transitory computer-readable medium comprising one or more instruction sequences, which, when executed by at least one processor, cause at least the processor to perform the method according to any one of claims 1 to 5.
7. A computer system comprising: one or more processors; as well as a memory communicatively coupled to the one or more processors; The memory stores instructions executed by one or more processors, and the instructions are executed by the one or more processors to enable the one or more processors to perform the method according to any one of claims 1 to 5.
8. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multilayer convolution neural network optimization system and method
CN105844653A
Neural network parameter compression method and related device
CN110276438A