Neural network structure searching device and neural network structure searching method
The neural network structure search device efficiently identifies and removes redundant elements in the training process, reducing the number of training sessions needed to find an optimal structure for faster recognition processing.
Patent Information
- Application Number
- JP2023515912
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-04-20
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2041-04-20
AI Technical Summary
Existing neural network structure search methods require numerous training sessions, consuming significant computational resources and time due to the need for repeated training to evaluate recognition accuracy, which is unknown until weights are updated, and there is no efficient method to derive a structure that optimizes execution speed while maintaining accuracy.
A neural network structure search device that trains a neural network model, analyzes its elements for importance, and deletes those with low importance, reducing the number of training sessions by identifying and removing redundant parts, such as layers and kernels with low contribution to the final result.
This approach significantly reduces the number of training sessions required to find an optimal neural network structure, enabling faster recognition processing without compromising accuracy.
Smart Images

Figure 0007552880000007 
Figure 0007552880000001 
Figure 0007552880000002
Abstract
Description
[Technical field]
[0001] The present invention relates to a neural network structure searching device, a neural network structure searching method, and a neural network structure searching program. In particular, the present invention relates to a neural network structure searching device, a neural network structure searching method, and a neural network structure searching program that derive an optimal neural network structure in a short time by reducing the number of training times required for the search. [Background technology]
[0002] A neural network structure is a typical mathematical model structure used in the field of deep learning. The neural network structure includes the number of layers, the number of channels in each layer, the kernel size, etc.
[0003] In addition, to find the optimal neural network structure, it is necessary to search for a neural network structure that can perform recognition processing at high speed while maintaining high recognition accuracy. This work has often been done by researchers and engineers familiar with AI (Artificial Intelligence), based on their own experience.
[0004] In contrast to the above-mentioned manual neural network structure search work, several NAS (Neural Architecture Search) methods have been proposed for automatically searching neural network structures.
[0005] For example, Non-Patent Document 1 describes a technique for obtaining a neural network structure that has a higher recognition accuracy than a neural network structure designed by humans, by using reinforcement learning.
[0006] Furthermore, Non-Patent Document 2 describes a technique that enables a search to be performed without relying on reinforcement learning by continuously relaxing the search problem and making it differentiable.
[0007] In addition, Non-Patent Document 3 describes a technology that derives a neural network structure that performs recognition processing at high speed and has high recognition accuracy by stacking and combining neural network structure components with relatively high recognition processing efficiency in a bottom-up manner.
[0008] Moreover, Non-Patent Document 4 describes M2Det, which is an example of a neural network structure. [Prior art documents] [Non-patent literature]
[0009] [Non-Patent Document 1] Barret Zoph and Quoc V. Le, “Neural Architecture Search with Reinforcement Learning,” Under review as a conference paper at ICLR 2017. [Non-Patent Document 2] Hanxiao Liu, Karen Simonyan, and Yiming Yang, “DARTS: Differentiable Architecture Search,” Published as a conference paper at ICLR 2019. [Non-Patent Document 3] X. Zhang, et al., “SkyNet: A hardware-efficient method for object detection and tracking on embedded systems,” in Proc. Conf. Mach. Learn. Syst., 2020, pp. 216-229. [Non-Patent Document 4] Q. Zhao, et al., “M2Det: A Single-Shot Object Detector Based on Multi-Level Feature Pyramid Network,” pp. 9259-9266, Vol. 33 No. 01: AAAI-19. Summary of the Invention [Problem to be solved by the invention]
[0010] In neural network structure search, there are a huge number of neural network structures to search for. In addition, in order to evaluate the accuracy of a neural network structure, it is necessary to repeatedly perform "training" (synonymous with learning) during the search, which is time-consuming.
[0011] The reason is that even if only a neural network structure is devised, the recognition accuracy of the devised neural network structure is unknown, because in order to confirm the recognition accuracy, it is necessary to determine the weights of the devised neural network structure using a training data set.
[0012] In addition, the recognition accuracy of a neural network structure does not necessarily improve when the number of layers or channels is increased, and does not necessarily decrease when the number of layers or channels is decreased. What kind of structure will increase the recognition accuracy cannot be determined until training is performed in which the weights are gradually updated while repeating forward propagation and backward propagation.
[0013] For example, it takes several hours to several days to complete one training session. In addition, training must be repeated dozens of times during the search. In other words, neural network structure search has the challenges of requiring abundant computer resources and prolonging the search period.
[0014] The technique described in Non-Patent Document 1 also has the problem that the computational costs required for the search are enormous, for example, requiring 800 GPUs (Graphics Processing Units) to operate for a long period of time.
[0015] Furthermore, the techniques described in Non-Patent Documents 2 and 3 also require repeated training several times or more, making it difficult to complete a search in a short time.
[0016] Furthermore, a method for searching for highly accurate neural network structures that are publicly available, such as the neural network structure described in Non-Patent Document 4, is not disclosed.
[0017] In other words, no method has been disclosed for efficiently deriving a neural network structure that optimizes the neural network structure to increase the execution speed of the recognition process while maintaining the recognition accuracy required by an application that uses the neural network structure.
[0018] Therefore, an object of the present invention is to provide a neural network structure searching device, a neural network structure searching method, and a neural network structure searching program that can reduce the number of training sessions required to search for a neural network structure. [Means for solving the problem]
[0019] A neural network structure searching device according to the present invention includes a training means for training a neural network model having a first neural network structure using a training data set, a first generating means for generating analysis information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by training using the training data set, a specifying means for specifying an element in the first neural network structure having an importance lower than a predetermined value using the generated analysis information, and a second generating means for generating a second neural network structure based on the first neural network structure by deleting the specified element from the first neural network structure. Each element includes a weight in a kernel used in a convolution layer constituting a first neural network structure, and the second generating means deletes kernels that include the identified weight at a predetermined rate or more. It is characterized by:
[0020] A neural network structure searching method according to the present invention includes: training a neural network model having a first neural network structure using a training data set; analyzing a trained model generated from the neural network model by training using the training data set, thereby generating analytical information indicating the importance of each element constituting the first neural network structure; identifying elements in the first neural network structure having an importance lower than a predetermined value using the generated analytical information; and deleting the identified elements from the first neural network structure, thereby generating a second neural network structure based on the first neural network structure; Each element includes a weight in a kernel used in a convolutional layer constituting a first neural network structure, and when removing the identified element from the first neural network structure, a kernel that includes a predetermined percentage or more of the identified weight is removed. It is characterized by:
[0021] A neural network structure search program according to the present invention causes a computer to execute a training process of training a neural network model having a first neural network structure using a training data set, a first generation process of generating analytical information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by training using the training data set, an identification process of identifying elements in the first neural network structure having an importance lower than a predetermined value using the generated analytical information, and a second generation process of generating a second neural network structure based on the first neural network structure by deleting the identified elements from the first neural network structure; Each element includes a weight in a kernel used in a convolution layer constituting a first neural network structure, and the computer is caused to delete kernels that include a predetermined percentage or more of the identified weight in the second generation process. It is characterized by: Effect of the Invention
[0022] According to the present invention, the number of training rounds required to search for a neural network structure can be reduced. [Brief description of the drawings]
[0023] [Figure 1] 1 is a block diagram showing an example of the configuration of a neural network structure searching device according to an embodiment of the present invention; [Diagram 2] FIG. 1 is an explanatory diagram illustrating an example of a convolutional neural network. [Diagram 3] FIG. 1 is an explanatory diagram showing an example of convolution calculation in CNN. [Figure 4] FIG. 11 is an explanatory diagram illustrating an example of model analysis information. [Diagram 5] FIG. 11 is an explanatory diagram showing another example of the model analysis information. [Figure 6] 4 is a flowchart showing the operation of a neural network structure searching process by the neural network structure searching device 100 of the present embodiment. [Figure 7] 13 is a flowchart showing the operation of another neural network structure searching process by the neural network structure searching device 100 of the present embodiment. [Figure 8] FIG. 2 is an explanatory diagram showing an example of a hardware configuration of the neural network structure searching device according to the present invention; [Figure 9] 1 is a block diagram showing an overview of a neural network structure searching device according to the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment of the present invention will be described with reference to the drawings. A neural network structure searching device according to the present invention is a device that can solve the problem that a large number of training sessions are required to search for a neural network structure.
[0025] Specifically, the neural network structure searching device according to the present invention first trains the entire neural network model having a neural network structure based on a given training data set. The training data set is a training data set used for training. A label indicating the correct answer is attached to the training data set in advance.
[0026] From the trained model, which is a trained neural network model, information such as the weights of the neural network structure, which is the training result, can be obtained. Next, the neural network structure searching device analyzes the training result and determines a new neural network structure so that the size is reduced while maintaining the recognition accuracy.
[0027] [Configuration Description] FIG. 1 is a block diagram showing an example of the configuration of a neural network structure searching device according to an embodiment of the present invention.
[0028] 1, the neural network structure searching device 100 of this embodiment includes training means 110, trained model analysis means 120, and optimal neural network structure determination means 130. Each means operates as follows.
[0029] The training means 110 receives a first neural network structure and a training data set as input. Then, the training means 110 generates a neural network model having the first neural network structure. The training means 110 performs training in deep learning on the generated neural network model using the training data set. The training means 110 inputs a trained model, which is a training result, to the trained model analysis means 120.
[0030] The first neural network structure input to the training means 110 is, for example, a neural network structure that has already been made public and has high recognition accuracy.
[0031] The first neural network structure assumed in this embodiment is, for example, a convolutional neural network (CNN) structure. A convolutional neural network is a feedforward type neural network having a structure in which two types of layers, a convolutional layer and a pooling layer, are alternately stacked. Hereinafter, the convolutional neural network is also simply referred to as CNN.
[0032] Figure 2 is an explanatory diagram showing an example of a convolutional neural network. In the CNN shown in Figure 2, a first convolutional layer, a first pooling layer, a second convolutional layer, and a second pooling layer are stacked alternately.
[0033] Also, C1 and C2 in Fig. 2 each represent a convolution calculation. For example, a convolution calculation C1 is performed on an input image input to the first convolution layer.
[0034] Note that an image is an example of input data. Data input to a CNN may be data other than an image.
[0035] 2 each represent a pooling calculation. For example, a pooling calculation P1 is performed on the convolution calculation result input to the first pooling layer.
[0036] In addition, F in Figure 2 represents a fully connected network. The fully connected network F has the function of a fully connected layer that connects all the nodes in the second pooling layer and the nodes in the output layer. Finally, the output of the CNN is obtained from the output layer.
[0037] The convolution calculation in CNN will be specifically described below. Figure 3 is an explanatory diagram showing an example of the convolution calculation in CNN. The example of the convolution calculation shown in Figure 3 corresponds to the convolution calculation C1 shown in Figure 2.
[0038] The input image shown in FIG. 3 is an image input to the CNN. The input image shown in FIG. 3 is an image input to the CNN. in Channel (C in is an integer of 2 or more) in order. That is, C in means the number of input channels. Also, as shown in Fig. 3, the vertical size of the images that make up the input image is H and the horizontal size is W.
[0039] For ease of explanation, the input X to be calculated by convolution is shown in Fig. 3. The vertical size is 1, the horizontal size is 1, and the number of channels is C. in Consider the image of the input X when viewed from the height direction. The lower part of Fig. 3 shows the input X when viewed from the height direction. The code to the left of the input X in Fig. 3 is the channel identification number.
[0040] In the convolution calculation shown in Figure 3, the vertical size is C out , horizontal size is C in The 1×1 kernel W of the input X is multiplied. As a result of the multiplication, the number of channels becomes C out The output Y is the image of C. out means the number of output channels. In the example shown in FIG. in =3, C out =128.
[0041] The convolution calculation shown in FIG. 3 corresponds to multiplication of matrices. That is, in the convolution calculation shown in FIG. 3, the kernel W, the input X, and the output Y are each treated as a matrix.
[0042] In addition to the CNN structure, in this embodiment, it is assumed that a neural network structure that has a large number of layers and is considered to have high recognition accuracy is input as the first neural network structure to the training means 110. However, a neural network structure other than the above may be input as the first neural network structure to the training means 110 of this embodiment.
[0043] As described above, the training means 110 trains the neural network model having the first neural network structure by using the training data set.
[0044] The trained model analysis means 120 uses the training data set to analyze the trained model input from the training means 110. By performing the analysis, the trained model analysis means 120 inputs model analysis information indicating redundant parts in the first neural network structure to the optimal neural network structure determination means 130.
[0045] There are several possible analysis methods used by the trained model analysis means 120. The first method is to sequentially input data (images, etc.) in the training data set to the trained model and observe the activation rate of each part (each channel of each layer, etc.) in the first neural network structure.
[0046] By using the first analysis method, the trained model analysis means 120 can identify a portion of the first neural network structure that is less activated than other portions. The trained model analysis means 120 can obtain the activation rate using a statistical index such as the average value of an activation map.
[0047] The second method is to identify kernels that contain many weights near zero by analyzing a trained model when the first neural network structure is a CNN structure. It is believed that even if a kernel that contains many weights near zero is deleted, it will not have a significant effect on the processing results of the first neural network structure.
[0048] By performing analysis using the above-mentioned analysis techniques or the like, the trained model analysis means 120 can identify parts of the first neural network structure that have a relatively low contribution to the final result, ie, redundant parts.
[0049] Fig. 4 is an explanatory diagram showing an example of model analysis information. The model analysis information shown in Fig. 4 is composed of a layer number and a score. That is, Fig. 4 shows the score for each layer.
[0050] FIG. 5 is an explanatory diagram showing another example of the model analysis information. The model analysis information shown in FIG. 5 is composed of a layer number, a kernel number, and a score. That is, FIG. 5 shows the score for each kernel weight. In the examples shown in FIGS. 4 to 5, a CNN structure consisting of a total of 100 layers is assumed as the first neural network structure.
[0051] In the example shown in Figure 5, it is assumed that the layer with layer number L1 corresponds to 3 input channels and 128 output channels. That is, the example shown in Figure 5 corresponds to the example shown in Figure 3. The kernel numbers shown in Figure 3 correspond to the kernel numbers shown in Figure 5.
[0052] As shown in Figures 3 and 5, the kernel used in layer number L1 is composed of 3x128=384 weights. In addition, in the model analysis information shown in Figure 5, a score is given to each weight of the kernel.
[0053] In this embodiment, the score is a value that represents the importance of a layer or kernel weight, with a score of "100" representing the highest importance and a score of "0" representing the lowest importance.
[0054] In the example shown in Fig. 4, for example, the score of layer number L3 is "24", which is relatively lower than the scores of the other layers. In addition, the score of layer number L99 is also "43", which is relatively lower than the scores of the other layers.
[0055] Also, in the example shown in FIG. 5, for example, the weight score of the kernel with kernel number K1_512 in the layer with layer number L2 is "31", which is relatively lower than the weight scores of the other kernels.
[0056] For example, when the average value of the activation map values, which are the output results of the convolutional layer, is used to determine the score, the trained model analysis means 120 may normalize the activation maps of all channels obtained from any convolutional layer between channels and then evaluate the average value.
[0057] In addition, the trained model analysis means 120 may determine the score using the maximum value in the activation map instead of the average value, or may set a threshold and determine whether the maximum value is greater than or equal to the threshold before determining the score.
[0058] The method for determining the score is not limited to the above-mentioned method, and the trained model analysis means 120 may determine the score using a general statistical analysis method.
[0059] That is, the trained model analysis means 120 uses the training data set to analyze the trained model generated from the neural network model by the training means 110. By performing the analysis, the trained model analysis means 120 generates analysis information indicating the importance of each element constituting the first neural network structure.
[0060] Also, as described above, each element may include layers that make up the first neural network structure.
[0061] Additionally, each element may include a weight within a kernel used in a convolutional layer that constitutes the first neural network structure.
[0062] As described above, the trained model analysis means 120 calculates the importance based on the activation rate obtained by inputting data in a training data set into a trained model, for example.
[0063] The optimal neural network structure determining means 130 determines and outputs an optimal neural network structure based on the model analysis information output by the trained model analyzing means 120 .
[0064] For example, the optimal neural network structure determination means 130 deletes the layer with the layer number L3 and the layer with the layer number L99, which have small scores, from the first neural network structure based on the model analysis information shown in Fig. 4. The optimal neural network structure determination means 130 outputs the first neural network structure from which the layers have been deleted as the second neural network structure.
[0065] In order to prevent layers from being deleted too much, a threshold value may be set as an upper limit on the ratio or number of layers to be deleted. For example, the optimal neural network structure determination means 130 may use a ratio such as 50% of the total number of layers as the threshold for layers to be deleted, or a number such as 10. The threshold for layers to be deleted may be provided to the optimal neural network structure determination means 130 from outside as an input.
[0066] Furthermore, when the processing time in each layer of the first neural network structure is given as an input, the optimal neural network structure determination means 130 may preferentially delete layers with long processing times and small scores.
[0067] Furthermore, when the execution efficiency of the arithmetic units in each layer of the first neural network structure is given as an input, the optimal neural network structure determination means 130 may preferentially delete layers with low execution efficiency and small scores.
[0068] Generally, in order to obtain high performance in hardware, the degree of parallelism is increased by arranging many arithmetic units in a row. For example, in the case of hardware where 256 arithmetic units are arranged in a row and only the parallelism in the direction of the number of channels is utilized in these arithmetic units, only a maximum of 32 arithmetic units can operate for a layer with a maximum of 32 channels.
[0069] Therefore, the execution efficiency of the arithmetic unit in a layer with a maximum number of channels of 32 is 32 / 256=1 / 8=12.5%. The optimal neural network structure determination means 130 may preferentially delete layers with low execution efficiency calculated as above.
[0070] Also, when a target accuracy is given as an input, the optimal neural network structure determination means 130 may determine the score threshold by, for example, multiplying the given target accuracy by a constant. The optimal neural network structure determination means 130 removes layers with scores lower than the determined score threshold.
[0071] Furthermore, similarly to the case of deleting a layer, the optimal neural network structure determination means 130 can determine which kernels to delete based on the scores when deleting kernels.
[0072] For example, the optimal neural network structure determination means 130 deletes kernels that include a predetermined ratio or more of weights whose scores are lower than the determined score threshold value. Note that when a kernel is deleted, the convolution calculation that was executed using the corresponding kernel is no longer executed.
[0073] The optimal neural network structure determining means 130 may delete both layers and kernels, or may delete only layers, or may delete only kernels.
[0074] That is, the optimal neural network structure determining means 130 uses the analysis information generated by the trained model analyzing means 120 to identify elements in the first neural network structure whose importance is lower than a predetermined value.
[0075] The optimal neural network structure determining means 130 then generates a second neural network structure based on the first neural network structure by deleting the identified elements from the first neural network structure.
[0076] The optimal neural network structure determination means 130 may also determine which elements to delete from among the elements identified using the processing time of the computing units in the layer.The optimal neural network structure determination means 130 may also determine which elements to delete from among the elements identified using the execution efficiency of the computing units in the layer.
[0077] Furthermore, when each element includes a weight within a kernel, the optimal neural network structure determination means 130 may delete a kernel that includes a specified proportion or more of the identified weight.
[0078] As described above, the neural network structure searching device 100 of this embodiment efficiently determines a neural network structure that enables high-speed recognition processing by optimizing a publicly available highly accurate neural network structure while maintaining the recognition accuracy required for the application to which the neural network structure is to be applied.
[0079] Note that the neural network structure searching device 100 of the present embodiment does not seek a highly accurate neural network structure like the technology described in Non-Patent Document 1, but maintains accuracy equivalent to that of a publicly available model. The neural network structure searching device 100 determines a neural network structure with a reduced scale so as to increase the execution speed of the recognition process while maintaining accuracy.
[0080] [Explanation of operation] Hereinafter, the operation of the neural network structure searching device 100 of this embodiment will be described with reference to Figures 6 to 7. Figure 6 is a flowchart showing the operation of the neural network structure searching process by the neural network structure searching device 100 of this embodiment.
[0081] First, a first neural network structure and a training data set are input to the neural network structure searching device 100 .
[0082] The training means 110 trains the neural network model having the input first neural network structure using the input training data set, and outputs a trained model that is the training result (step S110). The training means 110 inputs the trained model to the trained model analysis means 120.
[0083] Next, the trained model analysis means 120 analyzes the trained model input from the training means 110 and generates model analysis information (step S120). The trained model analysis means 120 inputs the generated model analysis information to the optimal neural network structure determination means 130.
[0084] Next, the optimal neural network structure determination means 130 identifies redundant structures in the first neural network structure based on the input model analysis information, and then generates an optimal neural network structure by deleting the identified redundant structures from the first neural network structure.
[0085] Next, the optimal neural network structure determination means 130 outputs the generated optimal neural network structure as a second neural network structure (step S130). After outputting the second neural network structure, the neural network structure searching device 100 ends the neural network structure searching process.
[0086] Fig. 7 is a flowchart showing the operation of another neural network structure search process by the neural network structure searching device 100 of this embodiment. Fig. 7 shows an example in which the neural network structure searching device 100 repeatedly executes the search process.
[0087] First, a first neural network structure and a training data set are input to the neural network structure searching device 100. That is, a search loop is started (step S210).
[0088] The processes in steps S220 to S230 are similar to the processes in steps S110 to S120 shown in FIG.
[0089] Next, the trained model analysis means 120 determines whether or not the scores indicated by the model analysis information generated in step S230 satisfy a predetermined condition (step S240). The predetermined condition is, for example, that all scores exceed a specified threshold value.
[0090] If the score satisfies the predetermined condition (Yes in step S240), the trained model analysis means 120 outputs the first neural network structure (step S270). After outputting the first neural network structure, the neural network structure searching device 100 ends the neural network structure searching process.
[0091] If the score does not satisfy the predetermined condition (No in step S240), the optimal neural network structure determination means 130 performs the same process as in step S130 (step S250).
[0092] Next, the processing of steps S220 to S240 is repeatedly executed. Note that in the second and subsequent processing, the training means 110 receives the second neural network structure generated in step S250 as the first neural network structure.
[0093] Even if the score does not satisfy a predetermined condition, for example, when the processes of steps S220 to S250 have been repeatedly executed a predetermined number of times, neural network structure searching device 100 exits the search loop (step S260). After exiting the search loop, neural network structure searching device 100 ends the neural network structure searching process.
[0094] [Effect description] In the neural network structure searching device 100 of this embodiment, the training means 110 trains the entire neural network model having a neural network structure based on a given training data set. Then, the trained model analysis means 120 analyzes the training results by the training means 110. Then, the optimal neural network structure determination means 130 determines a neural network structure that is small in scale while maintaining the recognition accuracy.
[0095] The neural network structure searching device 100 of this embodiment can reduce the number of trainings required for searching a neural network structure because the training means 110 first executes training on the entire neural network structure, then the trained model analysis means 120 analyzes the trained model that is the training result, and the optimal neural network structure determination means 130 determines the optimal structure of the neural network.
[0096] The techniques described in Non-Patent Documents 1 to 3 have a problem in that a large number of training sessions are required to search for a neural network structure. The reason is that training is required to evaluate the recognition accuracy as described above.
[0097] The neural network structure searching device 100 of this embodiment can determine an optimal neural network structure based on a given training data set without repeating training many times. Specifically, the neural network structure searching device 100 performs training only once initially on a neural network model having a neural network structure that is expected to have high accuracy in principle.
[0098] Next, the neural network structure searching device 100 accurately identifies redundant parts of the first neural network structure by analyzing the model obtained by training using the training data set. Thus, the neural network structure searching device 100 can efficiently determine an optimal neural network structure.
[0099] A specific example of the hardware configuration of the neural network structure searching device 100 of this embodiment will be described below. Fig. 8 is an explanatory diagram showing an example of the hardware configuration of the neural network structure searching device according to the present invention.
[0100] 8 includes a CPU (Central Processing Unit) 11, a main memory unit 12, a communication unit 13, and an auxiliary memory unit 14. It also includes an input unit 15 for user operation and an output unit 16 for presenting the processing results or the progress of the processing contents to the user.
[0101] Neural network structure searching device 100 is realized by software, when CPU 11 shown in FIG. 8 executes a program that provides the functions of each component.
[0102] That is, the CPU 11 loads a program stored in the auxiliary storage unit 14 into the main storage unit 12, executes it, and controls the operation of the neural network structure searching device 100, whereby each function is realized by software.
[0103] Note that the neural network structure searching device 100 shown in Fig. 8 may include a DSP (Digital Signal Processor) instead of the CPU 11. Alternatively, the neural network structure searching device 100 shown in Fig. 8 may include both the CPU 11 and a DSP.
[0104] The main memory unit 12 is used as a working area for data and a temporary storage area for data. The main memory unit 12 is, for example, a RAM (Random Access Memory).
[0105] The communication unit 13 has a function of inputting and outputting data to and from peripheral devices via a wired network or a wireless network (information and communication network).
[0106] The auxiliary storage unit 14 is a non-transitory tangible storage medium. Examples of non-transitory tangible storage media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory), and a semiconductor memory.
[0107] The input unit 15 has a function of inputting data and processing commands, and is, for example, an input device such as a keyboard or a mouse.
[0108] The output unit 16 has a function of outputting data, and is, for example, a display device such as a liquid crystal display device, or a printing device such as a printer.
[0109] As shown in FIG. 8, in the neural network structure searching device 100, each component is connected to a system bus 17.
[0110] In the neural network structure searching device 100, the auxiliary storage unit 14 stores programs for realizing a training means 110, a trained model analysis means 120, and an optimal neural network structure determination means 130.
[0111] Note that the neural network structure searching device 100 may be implemented with a circuit including hardware components such as an LSI (Large Scale Integration) that realizes the functions shown in FIG.
[0112] Furthermore, the neural network structure searching device 100 may be realized by hardware that does not include a computer function using an element such as a CPU. For example, some or all of the components may be realized by a general-purpose circuit, a dedicated circuit, a processor, or a combination of these. These may be configured by a single chip (for example, the above-mentioned LSI), or may be configured by multiple chips connected via a bus. Some or all of the components may be realized by a combination of the above-mentioned circuits, etc. and a program.
[0113] Furthermore, some or all of the components of the neural network structure searching device 100 may be configured by one or more information processing devices each including a calculation unit and a storage unit.
[0114] When some or all of the components are realized by a plurality of information processing devices, circuits, etc., the plurality of information processing devices, circuits, etc. may be centrally or distributed. For example, the information processing devices, circuits, etc. may be realized as a client-server system, a cloud computing system, etc., in a form in which each is connected via a communication network.
[0115] Next, an overview of the present invention will be described. Fig. 9 is a block diagram showing an overview of a neural network structure searching device according to the present invention. The neural network structure searching device 20 according to the present invention includes a training means 21 (e.g., training means 110) for training a neural network model having a first neural network structure using a training data set, a first generating means 22 (e.g., trained model analyzing means 120) for generating analysis information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by training using the training data set, a specifying means 23 (e.g., optimal neural network structure determining means 130) for specifying an element in the first neural network structure whose importance is lower than a predetermined value using the generated analysis information, and a second generating means 24 (e.g., optimal neural network structure determining means 130) for generating a second neural network structure based on the first neural network structure by deleting the specified element from the first neural network structure.
[0116] With such a configuration, the neural network structure searching device can reduce the number of training sessions required to search for a neural network structure.
[0117] Each element may include a layer constituting the first neural network structure. The second generation means 24 may determine elements to be deleted from among the elements identified using the processing time of the arithmetic units in the layer. The second generation means 24 may determine elements to be deleted from among the elements identified using the execution efficiency of the arithmetic units in the layer.
[0118] With such a configuration, the neural network structure searching device can generate a second neural network structure based on the processing contents in the layers that constitute the first neural network structure.
[0119] Furthermore, each element may include a weight in a kernel used in a convolutional layer constituting the first neural network structure, and the second generating means 24 may delete a kernel that contains the identified weight at a predetermined rate or more.
[0120] With such a configuration, the neural network structure search device can handle CNN.
[0121] In addition, the first generating means 22 may calculate the importance based on an activation rate obtained by inputting data in a training data set into a trained model.
[0122] With such a configuration, the neural network structure searching device can reduce the number of training sessions required to search for a neural network structure using the activation map.
[0123] Although the present invention has been described above with reference to the embodiments and examples, the present invention is not limited to the above-mentioned embodiments and examples. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
[0124] The present invention is preferably applied to applications in which the accuracy of each camera installed in various locations is maintained while optimizing the neural network structure applied to the cameras to speed up the recognition processing. [Explanation of symbols]
[0125] 11 CPU 12 Main memory 13. Communications Department 14 Auxiliary storage 15 Input section 16 Output section 17 System Bus 20, 100 Neural network structure search device 21, 110 Training methods 22 First generation means 23 Specific means 24 Second generation means 120 Pre-trained model analysis methods 130 Method for determining optimal neural network structure
Claims
1. A training means for training a neural network model having a first neural network structure using a training data set; a first generation means for generating analysis information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by the training using the training data set; a specifying means for specifying an element in the first neural network structure whose importance is lower than a predetermined value by using the generated analysis information; a second generating means for generating a second neural network structure based on the first neural network structure by deleting the identified element from the first neural network structure; Each of the elements includes a weight in a kernel used in a convolution layer constituting the first neural network structure; The second generating means deletes kernels in which the identified weight is included at a predetermined rate or more. A neural network structure searching device comprising:
2. Each element includes a layer that constitutes a first neural network structure.
2. The neural network structure searching device according to claim 1.
3. The second generating means determines an element to be deleted from among the elements identified using the processing time of the arithmetic unit in the layer.
3. The neural network structure searching device according to claim 2.
4. The second generating means determines elements to be deleted from among the identified elements using the execution efficiency of the arithmetic units in the layer.
4. The neural network structure searching device according to claim 2 or 3.
5. The first generating means calculates the importance based on the activation rate obtained by inputting the data in the training data set into the trained model.
5. The neural network structure searching device according to claim 1.
6. training a neural network model having a first neural network structure using a training data set; generating analysis information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by the training using the training data set; Using the generated analysis information, elements in the first neural network structure having an importance level lower than a predetermined value are identified; generating a second neural network structure based on the first neural network structure by deleting the identified elements from the first neural network structure; Each of the elements includes a weight in a kernel used in a convolution layer constituting the first neural network structure; When deleting the identified element from the first neural network structure, a kernel containing the identified weight at a predetermined rate or more is deleted. A neural network structure searching method comprising the steps of:
7. Each element includes a layer that constitutes a first neural network structure.
7. The neural network structure searching method according to claim 6.
8. On the computer, a training process for training a neural network model having a first neural network structure using a training data set; a first generation process for generating analysis information indicating the importance of each element constituting the first neural network structure by analyzing a trained model generated from the neural network model by the training using the training data set; a process of identifying elements in the first neural network structure whose importance is lower than a predetermined value using the generated analysis information; and executing a second generation process for generating a second neural network structure based on the first neural network structure by deleting the identified element from the first neural network structure; Each of the elements includes a weight in a kernel used in a convolution layer constituting the first neural network structure; causing the computer to delete kernels in which the specified weights are included at a predetermined rate or more in the second generation process; A neural network structure search program for
9. Each element includes a layer that constitutes a first neural network structure.
9. The neural network structure searching program according to claim 8.
Citation Information
Patent Citations
Learning task compiling method of artificial intelligence processor and related product
CN110766145A
Neural network weight reducing device, neural network weight reducing method, and program
JP2020190996A
Automatic tuning of artificial neural networks
US20160358070A1
Neural network reduction device, neural network reduction method, and storage medium
US20200372325A1
Learning task compiling method of artificial intelligence processor and related products
US20210182682A1
