Information processing device and program
Patent Information
- Application Number
- JP2020140900
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-08-24
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2040-08-24
Smart Images

Figure 0007537734000009 
Figure 0007537734000015 
Figure 0007537734000007
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing device and a program for reducing the data size of a trained neural network. [Background technology]
[0002] Conventionally, as a learning device for deleting layers in a multilayer neural network while preventing a decrease in accuracy, Patent Document 1 discloses a "learning device characterized by having a calculation unit that calculates, for each layer in the multilayer neural network, a contribution degree indicating the degree of contribution of the multilayer neural network to an estimation result of the multilayer neural network, a selection unit that selects a layer to be deleted based on the contribution degree of each layer calculated by the calculation unit, a deletion unit that deletes the layer to be deleted selected by the selection unit from the multilayer neural network, and a learning unit that trains the multilayer neural network from which the layer to be deleted has been deleted by the deletion unit." [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-185275 A [Non-patent literature]
[0004] [Non-Patent Document 1] Benoit Jacob, Skirmantas Kligys, et. al. Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference.arXiv:1712.05877, 2017. [Non-Patent Document 2] Dhiraj Kalamkar, Dheevatsa Mudigere, et. al. A Study of BFLOAT16 for Deep Learning Training.arXiv:1905.12322, 2019. [Non-Patent Document 3] Adrian Bulat, Georgios Tzimiropoulos. XNOR-Net++: Improved Binary Neural Networks. arXiv:1909.13863, 2019. Summary of the Invention [Problem to be solved by the invention]
[0005] However, in conventional techniques, deleting a layer to be deleted reduces the accuracy of inference by the multi-layer neural network, making it necessary to re-learn in order to compensate for this loss of accuracy. [Means for solving the problem]
[0006] Therefore, the information processing device of the present invention is an information processing device that reduces the data size of a trained neural network, and includes an acquisition unit that accesses the trained neural network and acquires a network structure and trained parameters including layer information of the trained neural network, a merging determination unit that determines whether a layer and another layer included in the trained neural network can be merged according to the network structure acquired by the acquisition unit, a merging unit that creates a merged layer by merging the one layer determined to be mergible by the merging determination unit with the other layer according to the network structure and the trained parameters acquired by the acquisition unit, and a deletion unit that searches for and deletes layers unnecessary for inference processing from the trained neural network, and is characterized in that the deletion unit deletes the layers unnecessary for inference processing after the merging processing by the merging unit.
[0007] In addition, the merging unit may create the merged layer by changing the layer information or the learned parameters of the one layer according to the layer information and the learned parameters of the other layer, and the deletion unit may delete the layer that is not necessary for the inference process including the other layer after the merging process by the merging unit.
[0008] In addition, the information processing device may be provided with a numerical expression conversion unit that converts the format of the numerical expression of the trained parameters included in the trained neural network, and the format of the numerical expression after conversion may be determined according to the performance of hardware on which inference processing by the trained neural network is performed.
[0009] The information processing device may further include a calculation method selection unit that selects a calculation method for a layer, and the calculation method selection unit may determine the calculation method for the layer according to layer information including a type of the layer.
[0010] The information processing device may further include an expansion unit that searches for a loop process or a recursive process included in the trained neural network and expands the searched loop process or the recursive process.
[0011] In addition, a program according to the present invention is a program for causing an information processing device capable of accessing a trained neural network to perform a process of reducing the data size of the trained neural network, and is characterized in that the information processing device is caused to access the trained neural network, acquire a network structure and trained parameters including layer information of the trained neural network, determine whether a layer and another layer included in the trained neural network can be merged according to the network structure, merge the one layer determined to be mergeable with the other layer according to the network structure and the trained parameters to create a merged layer, and search for and delete layers unnecessary for inference processing from the trained neural network.
[0012] In addition, the merged layer may be created by changing the layer information or the learned parameters of one layer according to the layer information and the learned parameters of the other layer, and the layer that is not necessary for the inference process may include the other layer after the merger.
[0013] The program may also cause the information processing device to perform a process of converting the format of numerical expression of trained parameters included in the trained neural network in accordance with the performance of hardware on which inference processing by the trained neural network is performed.
[0014] The program may also cause the information processing device to perform a process of selecting a calculation method for a layer in accordance with layer information including a type of the layer.
[0015] The program may also cause the information processing device to search for loop processing or recursive processing contained in the trained neural network, and to perform processing to expand the searched loop processing or recursive processing.
[0016] Note that layer information refers to information about each layer included in the trained neural network, and includes, for example, the number of neurons (operators) included in a specific layer, the path of input information to each neuron included in a specific layer, and the path of output information output from each neuron included in a specific layer.
[0017] The network structure is the structure of a trained neural network, and includes, for example, the arrangement of layers, the type of each layer, the input / output paths of information between layers, etc. The type of each layer refers to, for example, a convolution layer, a pooling layer, a batch normalization layer, etc.
[0018] The learned parameters are parameters that have been adjusted in the learning stage, and include, for example, weights, biases, and the like.
[0019] The layer not required for the inference process refers to a layer not required for maintaining the accuracy of the inference process when performing the inference process using a trained neural network. For example, it includes a dropout layer, a 1×1 pooling layer, etc. In addition, the layer not required for the inference process may include other layers after the merger process. When the layer not required for the inference process includes other layers after the merger process, the other layers will not disappear at the timing of the merger process. Effect of the Invention
[0020] According to the present invention, a layer that can be merged can be merged with another layer, and layers that are not necessary for inference processing can be deleted when performing inference processing using a trained neural network, thereby maintaining the inference accuracy of the trained neural network and easily reducing the data size of the trained neural network. [Brief description of the drawings]
[0021] [Figure 1] FIG. 2 is a functional block diagram of an information processing device 111 according to an embodiment. [Diagram 2] FIG. 2 is a hardware configuration diagram of an information processing device 111 according to an embodiment. [Diagram 3] FIG. 2 is a diagram showing a trained neural network before processing in an embodiment. [Figure 4] FIG. 11 is a flow diagram of the information processing device 111 according to the embodiment. [Diagram 5] FIG. 13 is a diagram showing a trained neural network after a merging process in an embodiment. [Figure 6] FIG. 13 is a diagram showing a trained neural network after a deletion process in the embodiment. [Figure 7] FIG. 2 is a functional block diagram of an information processing device 211 according to the first embodiment. [Figure 8] FIG. 2 is a hardware configuration diagram of an information processing device 211 according to the first embodiment. [Figure 9] FIG. 1 is a diagram showing a trained neural network before processing in the first embodiment. [Figure 10] 1 is a flow diagram of the information processing device 211 in the first embodiment. [Figure 11] FIG. 1 is a diagram showing a trained neural network during processing in the first embodiment. [Figure 12] FIG. 1 is a diagram showing a trained neural network during processing in the first embodiment. [Figure 13] FIG. 1 is a diagram showing a trained neural network during processing in the first embodiment. [Figure 14] FIG. 13 is a diagram showing a trained neural network after processing in Example 1. [Figure 15] FIG. 11 is a functional block diagram of an information processing device 211 according to a second embodiment. [Figure 16] FIG. 11 is a flow diagram of the information processing device 211 in the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0022] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. In this specification and the drawings, components having substantially the same functional configuration are denoted by the same reference numerals, and duplicated explanations will be omitted. Note that the embodiments and examples shown below are all examples of the present invention. Therefore, the description of the embodiments and examples does not limit the technical scope of the present invention.
[0023] The information processing device 111 performs a process of reducing the data size of the trained neural network. First, the configuration of an information processing device 111, which is an example of this embodiment, will be described in detail with reference to the drawings.
[0024] The information processing device 111 includes an acquisition unit 113 that accesses the trained neural network and acquires a network structure including layer information of the trained neural network and trained parameters; a merging determination unit 115 that determines whether a layer and another layer included in the trained neural network can be merged according to the network structure acquired by the acquisition unit 113; a merging unit 116 that creates a merged layer by merging the one layer determined by the merging determination unit 115 to be mergible with another layer according to the network structure and trained parameters acquired by the acquisition unit 113; and a deletion unit 117 that searches for and deletes layers unnecessary for the inference process from the trained neural network, and the deletion unit 117 deletes layers unnecessary for the inference process after the merging process by the merging unit 116. In addition, the merging unit 116 creates the merged layer by changing the layer information or learned parameters of one layer according to the layer information and learned parameters of other layers, and the deletion unit 117 can delete layers that are not necessary for the inference process including other layers after the merging process by the merging unit 116.
[0025] Fig. 1 is a functional block diagram of an information processing device 111 in an embodiment. As shown in Fig. 1, the information processing device 111 includes an acquisition unit 113, an analysis unit 114, a merger determination unit 115, a merger unit 116, and a deletion unit 117, which are configured to be able to transmit and receive information to and from a control unit 112. All of these functional units are realized by specific means in which the hardware and software of the information processing device 111 work together.
[0026] The acquiring unit 113 accesses the trained neural network to acquire the network structure including layer information of the trained neural network and the trained parameters. For example, the acquiring unit 113 can access the trained neural network stored in the hard disk 125 or the memory 122 of the information processing device 111 and acquire the network structure including layer information of the trained neural network and the trained parameters. Note that, although an example of accessing a trained neural network stored in the information processing device 111 has been shown here, the trained neural network is not limited to one stored in the information processing device 111. For example, a trained neural network received by the information processing device 111 as an input may be accessed, or a trained neural network stored in another information processing device may be accessed via the communication unit 126.
[0027] The analysis unit 114 analyzes the network structure and the trained parameters acquired by the acquisition unit 113. For example, this analysis process can be realized by analyzing the source code expressing the trained neural network. More specifically, this analysis process can be realized by performing lexical analysis, syntax analysis, etc. of the source code with reference to the symbol table 128 stored in the hard disk 125 of the information processing device 111. Furthermore, the analysis unit 114 may be realized as a set of independent functions (module), or may be realized as one function of the acquisition unit 113.
[0028] The merger determination unit 115 determines whether or not one layer and another layer included in the trained neural network can be merged according to the network structure acquired by the acquisition unit 113. For example, the merger determination unit 115 can be realized by determining whether the one layer and another layer acquired by the acquisition unit 113 are in a layer arrangement that can be merged, whether the layer types are mergeable, whether the paths of input and output of information between each layer can be merged, and the like. Furthermore, for example, the merger determination unit 115 can be realized by determining whether or not a mapping that outputs a result similar to that of the operation by the original two layers can be created by combining the one layer and the other layer. At this time, it is preferable to use information on the network structure analyzed by the analysis unit 114. In addition, in order to perform the merger determination process, it is preferable that the information processing device 111 stores pattern information indicating a pattern of one layer and another layer that can be merged, for example, in the hard disk 125. In this case, the merger determination unit 115 can determine whether or not a combination of layers that matches these patterns exists in the trained neural network by referring to the pattern information. Although an example in which the pattern information is stored in the hard disk 125 has been shown here, the information processing device 111 only needs to be configured to be able to access the pattern information of one layer and another layer that can be merged. In other words, the pattern information may be stored in another information processing device.
[0029] In addition, the types of layers that can be combined include combinations of a convolutional layer and a batch regularization layer, a deconvolution layer and a batch regularization layer, and a fully connected layer (also called an affine layer or an inner product layer) and a convolutional layer.
[0030] The merging unit 116 creates a merged layer by merging one layer determined by the merge determination unit 115 as being mergable with another layer according to the network structure and learned parameters acquired by the acquisition unit 113. The merging unit 116 may also merge another layer into the one layer by changing the layer information or learned parameters of the one layer according to the layer information and learned parameters of the other layer.
[0031] For example, one layer, a convolutional layer, and another layer, a batch regularization layer, can be merged by applying the following formula to the convolutional layer. Note that F i,j represents the output of the original batch regularization layer. Also, W BN is the weight of the batch regularization layer, b BN represents the bias of the batch regularization layer. Also, W conv is the weight of the convolutional layer, and f i,j is the feature map that is the input to the convolutional layer, and b conv represents the bias of the convolutional layer, and "·" is the operator representing the inner product.
[0032]
number
[0033] By creating the above mapping (Equation 1), the convolutional layer and the batch regularization layer can be merged. In this case, the weight of the merged layer that merges the convolutional layer and the batch regularization layer is W BN ·W conv The bias of the merged layer is W BN b conv +b BN Similarly, for other combinations of layers, one layer can be merged with another layer. Although an example of combining and merging two layers has been shown here, the merging of layers is not limited to two layers, and three or more layers may be merged into one.
[0034] The deletion unit 117 searches for and deletes layers not required for the inference process from the trained neural network. In addition, the deletion unit 117 deletes layers not required for the inference process after the merging process by the merging unit 116. At this time, the deletion unit 117 may delete the other layers described above that have been subjected to the merging process.
[0035] The inference process here is not a process performed by the information processing device 111 according to the present embodiment, but a process performed by a computer using a trained neural network. Note that this does not prevent the information processing device 111 according to the present embodiment from performing the inference process. Examples of layers that are not required for inference processing include a dropout layer, which is only required at the stage of creating a trained neural network, a 1x1 pooling layer, a flattening layer that flattens the input, etc. In addition, other layers after the merging process can also be considered as layers that are not required for inference processing. The deletion unit 117 can delete these layers and use the information that was input to these layers as input to the layer next to these layers.
[0036] Next, Fig. 2 is a hardware configuration diagram of the information processing device 111 in the embodiment. For example, as shown in Fig. 2, the information processing device 111 can be realized by a processor 121, a memory 122, a display 123, a keyboard 124, a hard disk 125, and a communication unit 126, which are connected to a bus and configured to be able to transmit and receive information to and from each other.
[0037] The processor 121 performs various arithmetic processing and control processing for implementing the processing in the embodiment. As the processor 121, for example, a chip such as a central processing unit (CPU), a micro-processing unit (MPU), or a graphics processing unit (GPU), a field-programmable gate array (FPGA), or an application specific integrated circuit (ASIC), can be adopted. The processor 121 reads out the program 127, the OS (Operating System), and data stored in the hard disk 125, and performs various calculation processes and control processes in cooperation with the memory 122. In particular, the processor 121 performs information acquisition processing, analysis processing, merger determination processing, merger processing, deletion determination processing, deletion processing, and the like.
[0038] The memory 122 temporarily stores a program 127 and data used for various arithmetic processes and control processes for implementing the processes in the embodiment. For example, a RAM (Random Access Memory), a cache memory, etc. can be used as the memory 122. The memory 122 temporarily stores a program 127 according to this embodiment and a trained neural network.
[0039] A display 123 displays the processing status and operation screen of this embodiment.
[0040] The keyboard 124 receives input operations from the user and transmits commands and the like relating to the processing of this embodiment to the processor 121 .
[0041] The hard disk 125 stores a program 127 for performing the processing of this embodiment, a symbol table 128, data, etc. A trained neural network may also be stored in the hard disk 125. Although the term "hard disk 125" is used here, the information processing device 111 according to this embodiment can be realized by a storage device including not only the hard disk 125 but also an SSD (Solid State Drive) or the like.
[0042] The communication unit 126 transmits and receives information required to perform the processing of this embodiment to and from outside the information processing device 111. For example, it can access a trained neural network or symbol table 128 stored outside the information processing device 111, transmit change information for the trained neural network, and the like. The communication unit 126 may be either wired or wireless, and may directly access information on an external trained neural network or indirectly access information via another computer.
[0043] Next, Fig. 3 is a diagram showing a trained neural network before processing in the embodiment. As shown in Fig. 3, the information processing device 111 according to the embodiment can access trained neural networks of various configurations to execute the processing according to the embodiment.
[0044] For example, the trained neural network shown in Fig. 3 is configured with n layers connected together. Specifically, the first layer is an input layer 131, the second layer is a convolution layer 132, the third layer is a batch regularization layer 133, the fourth layer is a 1x1 pooling layer 134, the fifth layer is a dropout layer 135, the n-1th layer is a fully connected layer 136, and the nth layer is an output layer 137.
[0045] Each layer has one or more neurons, and the neurons in each layer are configured to be able to exchange information with neurons in the layer immediately before the layer to which the neurons belong and with neurons in the layer immediately after the layer to which the neurons belong.
[0046] In addition, weights are set as learned parameters on the paths for exchanging information between neurons, and biases are set as learned parameters for each neuron. Also, a predetermined activation function that changes the information sent to the next layer is set for each neuron.
[0047] Next, an example of processing performed by the information processing device 111 according to this embodiment on the trained neural network shown in Fig. 3 will be described with reference to Fig. 4. Fig. 4 is a flow diagram of the information processing device 111 according to the embodiment.
[0048] First, in an access step S141, the information processing device 111 accesses the medium in which the trained neural network is saved, by the acquisition unit 113 including the processor 121. When the trained neural network is stored outside the information processing device 111, the information processing device 111 accesses the trained neural network using the processor 121 and the communication unit 126. In addition, in order to provide the trained neural network for various subsequent processes, it is preferable that the information processing device 111 stores the trained neural network in the memory 122 or the hard disk 125 of the information processing device 111 when accessing the trained neural network.
[0049] 3, the trained neural network before processing by the information processing device 111 of the present embodiment is configured with n layers connected together. Specifically, the first layer is an input layer 131, the second layer is a convolution layer 132, the third layer is a batch regularization layer 133, the fourth layer is a 1×1 pooling layer 134, the fifth layer is a dropout layer 135, the n-1th layer is a fully connected layer 136, and the nth layer is an output layer 137.
[0050] Next, in information acquisition step S142, the information processing device 111 acquires the network structure including layer information of the trained neural network and the trained parameters by the acquisition unit 113 including the processor 121. At this time, the information processing device 111 may select and acquire only information related to the network structure and the trained parameters of the trained neural network, or may acquire all of the source code of the trained neural network.
[0051] Next, in an analysis step S143, the information processing device 111 analyzes the network structure and the learned parameters acquired by the acquisition unit 113 using the analysis unit 114 configured to include the processor 121 and the memory 122. As described above, at this time, it is preferable to perform lexical analysis, syntactic analysis, etc. using the symbol table 128.
[0052] Next, in a merger determination step S144, the information processing device 111 determines whether or not one layer and another layer included in the trained neural network can be merged, depending on the network structure of the trained neural network, by the merger determination unit 115 configured to include the processor 121 and the memory 122. For example, it is preferable that the information processing device 111 accesses pattern information that records combinations of one layer and another layer that can be merged, and compares whether or not the combination exists in the trained neural network, thereby determining whether or not one layer and another layer can be merged. At this time, if there is a combination of one layer and another layer that can be merged, proceed to the next merging step S145, and if there is no combination of one layer and another layer that can be merged, skip merging step S145 and proceed to deletion determination step S146. In the case of the trained neural network shown in FIG. 3, it is determined that one layer, the convolutional layer 132, and another layer, the batch regularization layer 133, can be merged.
[0053] Next, in a merging step S145, the information processing device 111 creates a merged layer by merging one layer determined to be mergable by the merging determination unit 115 with another layer according to the network structure and learned parameters acquired by the acquisition unit 113, using the merging unit 116 including the processor 121 and the memory 122. In the merging step S145, the other layer may be merged into the one layer by changing the layer information or learned parameters of the one layer according to the layer information and learned parameters of the other layer. 5, the layer information and learned parameters of the convolution layer 132, which is one layer, are changed according to the layer information and learned parameters of the batch regularization layer 133, which is another layer, by the process of the merging step S145, and a merged layer, a "convolution × batch regularization layer", is created. At this time, as an example of changing the learned parameters, the learned weights and learned biases of the convolution layer 132 may be changed based on the learned weights and learned biases of the batch regularization layer 133.
[0054] Next, in deletion determination step S146, the information processing device 111 searches whether or not there is a layer that is not required for inference processing in the trained neural network by the deletion unit 117 configured to include the processor 121 and the memory 122. At this time, for example, the information processing device 111 may search whether or not there is a layer that is not required for inference processing by referring to a deletable table in which types and patterns of layers that are not required for inference processing are recorded. In addition, the deletion unit 117 may also determine that other layers that have been subjected to the merge process are layers that do not require inference processing. At this time, if it is determined that a layer that does not require inference processing exists, the process proceeds to the next deletion step S147, and if it is determined that a layer that does not require inference processing does not exist, the process skips deletion step S147 and proceeds to inter-layer adjustment step S148. In addition, in the trained neural network shown in FIG. 5 after the merging process, for example, the other layers after the merging process, that is, the batch regularization layer 133, the 1×1 pooling layer 134, and the dropout layer 135, are determined to be layers unnecessary for the inference process.
[0055] Next, in a deletion step S147, the information processing device 111 causes the deletion unit 117 constituted by the processor 121 and the memory 122 to delete one or more layers determined in the deletion determination step S146 as being unnecessary for the inference process. In the trained neural network shown in FIG. 5 after the merging process, for example, the batch regularization layer 133, the 1×1 pooling layer 134, and the dropout layer 135, which are other layers after the merging process that are determined to be layers unnecessary for the inference process, are deleted. By performing this process, as shown in FIG. 6, the trained neural network is converted into a trained model of n-3 layers from which the batch regularization layer 133, the 1×1 pooling layer 134, and the dropout layer 135 are deleted. As a result, the data size of the trained neural network is reduced while maintaining the accuracy of the inference process.
[0056] Next, in an inter-layer adjustment step S148, the paths between neurons are adjusted so that information can be passed between layers by an inter-layer adjustment unit (not shown) composed of the processor 121 and the memory 122. For example, for a layer that is no longer able to pass information due to a layer merging process or deletion process, the output information of that layer can be used as input information for the layer located in the next layer.
[0057] By performing the above processing, the information processing device 111 can create a second trained neural network by deleting layers unnecessary for inference processing, including other layers after the merging processing, from the first trained neural network before the processing is performed. This makes it possible to reduce the data size while maintaining the inference accuracy of the trained neural network. As a result of processing by the information processing device 111 according to this embodiment as an example, the trained neural network after processing is converted into a trained neural network of n-3 layers as a whole, in which the first layer is an input layer 131, the second layer is a convolution×batch regularization layer, the n-4th layer is a fully connected layer 136, and the n-3th layer is an output layer 137, as shown in FIG. 6.
[0058] According to the information processing device 111 of the present embodiment, a layer that can be merged can be merged with another layer, and when performing inference processing using a trained neural network, a layer that is not necessary for the inference processing can be deleted. This makes it possible to easily reduce the data size of the trained neural network while maintaining the inference accuracy of the trained neural network.
[0059] In addition, the information processing device 111 according to this embodiment can merge a layer that can be merged with another layer, and then delete the other layer as a layer that is not necessary for the inference process, thereby making it possible to reduce the data size of the trained neural network in particular.
[0060] Furthermore, the information processing device 111 according to this embodiment can reduce the data size of the trained neural network while maintaining the original inference accuracy, and therefore does not require re-learning.
[0061] Furthermore, the information processing device 111 according to the present embodiment reduces the data size by reducing the number of layers of the trained neural network while maintaining the original inference accuracy. This reduces the memory capacity required for inference processing using the trained neural network after processing, and also reduces the processing power required for the inference processing while maintaining the original inference accuracy. Therefore, the information processing device 111 according to the present embodiment can create a trained neural network suitable for performing inference using the trained neural network in an embedded device such as a real-time system.
[0062] Furthermore, in the information processing device 111 according to this embodiment, the merging unit 116 changes the layer information or learned parameters of one layer according to the layer information and learned parameters of the other layer, thereby merging another layer into one layer. Therefore, by changing the layer information or learned parameters, the information processing device 111 can reduce the data size while maintaining the original inference accuracy.
[0063] The information processing device 111 according to this embodiment can be appropriately modified in design without changing the concept. For example, the specific form of distribution and integration of the information processing device 111 according to this embodiment is not limited to that according to this embodiment, and the information processing device 111 may be configured in the form of a client-server system, or may be realized by distributed processing of multiple computers. In other words, the information processing device 111 according to this embodiment is not limited to a device configured of one computer, and the information processing device 111 may be configured by multiple computers working together. EXAMPLES
[0064] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings as an example. Note that in the following, the same parts as those in the above-mentioned embodiment may be omitted. The information processing device 211 of this embodiment reduces the data size of the first trained neural network, thereby creating a second trained neural network that is particularly suitable for inference in an embedded device that has limited memory capacity and processing power. First, the configuration of the information processing device 211 of this embodiment will be described in detail with reference to the drawings.
[0065] 7 is a functional block diagram of an information processing device 211 in the embodiment. The information processing device 211 includes an acquisition unit 213, an analysis unit 214, a merger determination unit 215, a merger unit 216, a deletion unit 217, a numerical expression conversion unit 218, and a language conversion unit 219, which are connected to a control unit 212 so as to be able to transmit and receive information to and from each other.
[0066] The information processing device 211 is a computing device configured by a combination of one or more computers. For example, the information processing device 211 can be realized by a server that can be accessed by multiple computers.
[0067] For example, the acquisition unit 213 receives a processing request from another computer and acquires data of a trained neural network from the other computer. In particular, for example, the acquisition unit 213 acquires a network structure and trained parameters included in the data of the trained neural network.
[0068] The analysis unit 214 analyzes, for example, the trained neural network acquired by the acquisition unit 213. In this case, for example, the network structure and trained parameters of the trained neural network are analyzed by analyzing the source code expressing the neural network. For example, this analysis process can clarify the network structure and trained parameters by referring to the first symbol table 228 corresponding to the source code expressing the trained neural network received by the information processing device 211. Note that, as the first symbol table 228, for example, a table that associates names (symbols) such as programming languages and variable names of libraries with contents such as their contents can be used.
[0069] The merge determination unit 215, for example, determines whether or not one layer and another layer can be merged. For example, the merge determination unit 215 may determine whether or not a combination of one layer and another layer matches any of the mergeable patterns stored in the hard disk 225 or the like.
[0070] For example, when a layer related to the merging process is determined by the merging determination unit 215 to be mergable with a predetermined other layer, the merging unit 216 merges the one layer with the other layer. In particular, for example, as described below, a convolution layer and a batch regularization layer may be merged. In addition, when an inner product calculation between learned parameters is possible between adjacent convolution layers and batch regularization layers, a total of three or more convolution layers and batch regularization layers may be merged. Note that, as an example of a case where inner product calculation is possible, a case where the number of neurons in each layer is the same can be cited.
[0071] The deletion unit 217 deletes, for example, layers present in the trained neural network that are used in the learning stage but do not affect the result of inference in the inference stage (layers unnecessary for inference processing). In addition, layers unnecessary for inference processing can include layers that have become unnecessary for inference processing as a result of the merging process performed by the merging unit 216.
[0072] The numerical expression conversion unit 218 converts the format of numerical expression of, for example, the trained parameters included in the trained neural network. In particular, for example, the trained parameters expressed as 32-bit floating point in the original trained neural network before processing by the information processing device 211 may be quantized. Note that quantization refers to expressing a numerical value with a bit length shorter than the original by converting the expression format of the original numerical value. This makes it possible to reduce the data size to a size suitable for performing inference processing by the trained neural network on the embedded device or reduce the processing load. Here, for example, the numerical value may be binarized. In addition, when the numerical expression is binarized, the inference processing of the trained neural network can be performed by XNOR-Net.
[0073] In particular, it is preferable that the numerical expression conversion unit 218 converts the numerical expression according to the performance of the hardware on which the inference process by the trained neural network is performed, such as the memory size and processing power. More specifically, when the memory size is small, it is preferable to convert to an 8-bit integer representation or to binarize. Also, when the inference process is performed on hardware with inferior processing power, it is preferable to convert to an integer representation with a short bit length. In addition, when converting numerical expressions, consideration may be given to the inference accuracy required by inference using the trained model, or constraints on the required response time, etc.
[0074] The language conversion unit 219 can convert, for example, the original trained neural network into a trained neural network expressed in a different programming language. For example, the language conversion unit 219 can convert a trained neural network expressed in a language other than the C language into a trained neural network expressed in the C language. For example, specifically, the trained neural network analyzed by the analysis unit 214 using the first symbol table 228 can be converted into an expression in the C language by searching for and using variable names in the C language corresponding to the analyzed semantic content from the second symbol table 229 (transcompilation).
[0075] Next, the hardware configuration of the information processing device 211 will be described. Fig. 8 is a hardware configuration diagram of the information processing device 211 in the embodiment. The information processing device 211 can be realized using a processor 221, a memory 222, a display 223, a keyboard 224, a hard disk 225, and a communication unit 226, which are connected to a bus and configured to be able to transmit and receive information to each other. Since the information processing device 211 according to the embodiment is similar to the information processing device 111 according to the embodiment except for the hard disk 225, the hard disk 225 will be particularly described. Also, the hard disk 225 can be realized using a storage device such as an SSD, similar to the information processing device 111 according to the embodiment.
[0076] Hard disk 225 stores a program 227 for carrying out the processing of this embodiment, a first symbol table 228, a second symbol table 229, data, and the like. For example, a table that associates names (symbols) such as programming languages or library variable names with their contents can be used for first symbol table 228. Also, for example, a table that associates names (symbols) such as programming languages or library variable names different from those of first symbol table 228 with their contents can be used for second symbol table 229.
[0077] Next, Fig. 9 is a diagram showing a trained neural network before processing in the embodiment. As shown in Fig. 9, the information processing device 211 according to the embodiment can access trained neural networks of various configurations to execute the processing according to the embodiment.
[0078] For example, the trained neural network shown in Fig. 9 is configured with n layers connected together. Specifically, the first layer is an input layer 231, the second layer is a first convolution layer 232, the third layer is a first batch regularization layer 233, the fourth layer is a second convolution layer 234, the fifth layer is a second batch regularization layer 235, the sixth layer is a dropout layer 236, the (n-1)th layer is a fully connected layer 237, and the nth layer is an output layer 238.
[0079] Next, an example of processing by the information processing device 211 according to this embodiment will be described with reference to Fig. 10. Fig. 10 is a flow diagram of the information processing device 211 in this embodiment.
[0080] First, in an access step S251, the information processing device 211 accesses the medium in which the trained neural network is stored by the acquisition unit 213. For example, when a processing request is received from another computer in which a trained neural network is stored, the information processing device 211 receives the trained neural network from that computer via the communication unit 226 and stores it on the hard disk 225 of the information processing device 211, and can access the trained neural network to be processed stored on the hard disk 225.
[0081] Next, in an information acquisition step S252, the information processing device 211 acquires the network structure including layer information of the trained neural network and the trained parameters by the acquisition unit 213. At this time, the information processing device 211 may select and acquire only information related to the network structure and the trained parameters of the trained neural network, or may acquire all of the source code of the trained neural network.
[0082] Next, in an analysis step S253, the information processing device 211 analyzes the network structure and the learned parameters acquired by the acquisition unit 213 using the analysis unit 214. The learned parameters include, for example, learned weights or learned biases. For example, in this case, the network structure and the learned parameters can be analyzed by analyzing the meaning of the source code, etc., using the first symbol table 228 stored in the hard disk 225.
[0083] Next, the information processing device 211 loops through the merger determination step S254, merging step S255, deletion determination step S256, deletion step S257, and numerical expression conversion step S258 described below for each layer, from the first layer to the last layer, and performs merger determination processing, merging processing, deletion determination processing, deletion processing, and numerical expression conversion processing for each layer.
[0084] Next, in a merge determination step S254, the information processing device 211 determines whether or not the one layer subjected to the loop processing can be merged with another layer by the merge determination unit 215. If it is determined that the one layer and the other layer can be merged, the process proceeds to a merge step S255. If it is determined that the layers cannot be merged, the process skips the merge step S255 and proceeds to a deletion determination step S256.
[0085] Next, in a merging step S255, the information processing device 211 merges the one layer subjected to the loop processing with another layer by the merging unit 216. In particular, the other layer is merged into the one layer by changing the layer information or the learned parameters of the one layer according to the layer information and the learned parameters of the other layer.
[0086] Next, in a deletion determination step S256, the information processing device 211 determines whether or not the one layer subjected to the loop processing is a layer unnecessary for the inference processing. At this time, if it is determined that the one layer is unnecessary for the inference processing, the process proceeds to a deletion step S257. On the other hand, if it is determined that the one layer is necessary for the inference processing, the process skips the deletion step S257 and proceeds to a numerical expression conversion step S258.
[0087] Next, in a deletion step S257, the information processing device 211 deletes the one layer that is not required for the inference processing that is applied to the loop processing by the deletion unit 217. In addition, if the one layer that is applied to the deletion step S257 here corresponds to another layer as viewed from a layer that has already been subjected to a merger processing, the one layer can be deleted.
[0088] Next, in a numerical expression conversion step S258, the information processing device 211 can convert the numerical expression format of the numerical value held by the layer subjected to the loop processing. For example, the numerical value may be a weight or bias held by the layer. For example, when the layer holds a numerical value expressed in 32 bits in a floating-point format, the information processing device 211 can perform a process of shortening the bit length of the numerical value, converting the numerical value to a fixed-point format, or binarizing the numerical value. Furthermore, for example, whether or not to convert a numerical expression may be determined based on the performance of the hardware that performs the inference process using the trained neural network that is applied to the process according to this embodiment.
[0089] Furthermore, when the above-mentioned merging determination step S254, merging step S255, deletion determination step S256, deletion step S257, and numerical expression conversion step S258 are completed, a layer that is the next layer to the layer that was the target of each of these processes is selected as a layer to be subjected to inference processing, and these processes are performed on the selected layer. This loop process continues until the numerical expression conversion step S258 for the last layer included in the trained neural network is completed. When the numerical expression conversion step S258 for the last layer is completed, the process proceeds to the next language conversion step S259.
[0090] Next, in a language conversion step S259, the information processing device 211 converts the source code of the trained neural network into an expression in a desired program 227 language by the language conversion unit 219. For example, the information processing device 211 can convert the trained neural network, in which layers have been merged or layers have been deleted, into a language different from the original language by using the second symbol table 229 stored in the hard disk 225. In this case, for example, the C language is a language suitable for processing in an embedded device, so by converting into the C language, a trained neural network suitable for an embedded environment with low processing power can be obtained.
[0091] By performing the above processing, the original first trained neural network can be converted into a second trained neural network capable of inference processing even in an execution environment with low memory capacity and low processing power, such as an embedded device.
[0092] In the following, an example will be described in which the processing according to the present embodiment described above is performed on the trained neural network shown in Fig. 9. The trained neural network to be processed is an n-layer neural network configured as shown in Fig. 9, in which the first layer is an input layer 231, the second layer is a first convolution layer 232, the third layer is a first batch regularization layer 233, the fourth layer is a second convolution layer 234, the fifth layer is a second batch regularization layer 235, the sixth layer is a dropout layer 236, the n-1th layer is a fully connected layer 237, and the nth layer is an output layer 238.
[0093] First, the information processing device 211 accesses the trained neural network and obtains information about the trained neural network.
[0094] Next, the information processing device 211 causes the analysis unit 214 to analyze the network structure and the trained parameters of the trained neural network.
[0095] After that, the information processing device 211 performs loop processing from the first layer to the final n-th layer in order.
[0096] In the loop process, first, in a merge determination step S254, a merge determination is made for the first layer. In this example, since the input layer 231 cannot be merged with other layers, the merge step S255 is skipped and the process proceeds to a deletion determination step S256.
[0097] In the loop process, next, in deletion determination step S256, it is determined whether or not the first layer is a layer unnecessary for the inference process. In this example, since the input layer 231 is a layer necessary for the inference process, the deletion step S257 is skipped and the process proceeds to the numerical expression conversion step S258.
[0098] In the loop process, next, in a numerical expression conversion step S258, the numerical expression is converted as desired. Here, if the input layer 231 does not have learned parameters such as learned weights or learned biases, the numerical expression conversion may not be performed.
[0099] When the processing up to this point is completed, the loop processing then returns to the merging determination step S254, and a merging determination is made for the second layer, the first convolutional layer 232. Here, since the first convolutional layer 232 can be merged with the third layer, the first batch regularization layer 233, it is determined that these layers can be merged, and the processing proceeds to the merging step S255.
[0100] Next, in the loop processing, in a merging step S255, the first convolutional layer 232, which is one layer subjected to the loop processing, and the first batch regularization layer 233, which is another layer, are merged.
[0101] In the loop processing, next, in a deletion determination step S256, the first batch regularization layer 233, which is another layer merged into the first convolutional layer 232, is determined to be a layer unnecessary for the inference processing, and the processing proceeds to a deletion step S257.
[0102] In the loop process, next, in a deletion step S257, the first batch regularization layer 233 determined to be a layer unnecessary for the inference process is deleted. As a result, the trained neural network is converted into the trained neural network shown in Fig. 11 in which a combined layer of the first convolution layer 232 and the first batch regularization layer 233 is located in the second layer, and the second convolution layer 234 is located in the third layer.
[0103] When the process up to this point is completed, the trained neural network is converted into a network structure of n-1 layers as a whole. If desired, the weights or biases of the merged layer may be quantized or binarized in the numerical representation conversion step S258.
[0104] In the loop processing, next, the process returns to the merging determination step S254, and a merging determination is performed on the third layer, the second convolutional layer 234. Here, since the second convolutional layer 234 can be merged with the merged layer of the second layer, the first convolutional layer 232 and the first batch regularization layer 233, it is determined that these layers can be merged, and the process proceeds to the merging step S255.
[0105] In the loop processing, next, in a merging step S255, the merged layer of the first convolutional layer 232 and the first batch regularization layer 233 is merged with the second convolutional layer 234.
[0106] In the loop processing, next, in a deletion determination step S256, the second convolutional layer 234, which is another layer merged into the merged layer of the first convolutional layer 232 and the second convolutional layer 234, is determined to be a layer unnecessary for the inference processing, and the process proceeds to a deletion step S257.
[0107] In the loop process, next, in a deletion step S257, the second convolutional layer 234 that is determined to be a layer unnecessary for the inference process is deleted. As a result, the trained neural network is converted into the trained neural network shown in Fig. 12 in which a combined layer of the first convolutional layer 232, the first batch regularization layer 233, and the second convolutional layer 234 is located in the second layer, and the second batch regularization layer 235 is located in the third layer.
[0108] When the process up to this point is completed, the trained neural network is converted into a network structure of n-2 layers as a whole. If desired, the weights or biases of the merged layer may be quantized or binarized in the numerical representation conversion step S258.
[0109] In the loop processing, next, the process returns to the merging determination step S254, and a merging determination is performed on the third layer, the second batch regularization layer 235. Here, since the second batch regularization layer 235 can be merged with the merged layer of the second layer, the first convolution layer 232, the first batch regularization layer 233, and the second convolution layer 234, it is determined that these layers can be merged, and the process proceeds to the merging step S255.
[0110] In the loop processing, next, in a merging step S255, a merged layer of the first convolutional layer 232, the first batch regularization layer 233, and the second convolutional layer 234 is merged with the second batch regularization layer 235.
[0111] In the loop processing, next, in a deletion determination step S256, the second batch regularization layer 235, which is another layer merged into the merged layer of the first convolutional layer 232, the first batch regularization layer 233, and the second convolutional layer 234, is determined to be a layer unnecessary for the inference processing, and the process proceeds to a deletion step S257.
[0112] In the loop process, next, in a deletion step S257, the second batch regularization layer 235 determined to be a layer unnecessary for the inference process is deleted. As a result, the trained neural network is converted into the trained neural network shown in Fig. 13 in which a combined layer of the first convolution layer 232, the first batch regularization layer 233, the second convolution layer 234, and the second batch regularization layer 235 is located in the second layer, and the dropout layer 236 is located in the third layer.
[0113] When the process up to this point is completed, the trained neural network is converted into a network structure of n-3 layers as a whole. If desired, the weights or biases of the merged layer may be quantized or binarized in the numerical representation conversion step S258.
[0114] The loop process then returns to the merge determination step S254, where a merge determination is made for the third layer, the dropout layer 236. In this example, since the dropout layer 236 cannot be merged with other layers, the process skips the merge step S255 and proceeds to the deletion determination step S256.
[0115] In the loop processing, next, in a deletion determination step S256, it is determined that the dropout layer 236 is a layer unnecessary for the inference processing, and the processing proceeds to a deletion step S257.
[0116] In the loop process, next, in a deletion step S257, the dropout layer 236 determined to be a layer unnecessary for the inference process is deleted. As a result, the trained neural network is converted into the trained neural network shown in Fig. 14 in which a merged layer of the first convolutional layer 232, the first batch regularization layer 233, the second convolutional layer 234, and the second batch regularization layer 235 is located in the second layer, and the dropout layer 236 in the third layer is deleted.
[0117] When the processing up to this point is completed, the trained neural network as a whole is converted into a network structure of n-4 layers.
[0118] After that, the process loops layer by layer and continues until the numerical expression conversion step S258 for the final layer, the output layer 238, is completed.
[0119] Next, the process proceeds to a language conversion step S259, where the language conversion unit 219 converts the trained neural network into a trained neural network expressed in a programming language different from the original language. In particular, the C language is preferred for embedded devices, and a trained neural network capable of performing inference processing in the C language can be created by transcompiling using the second symbol table 229 that supports the C language.
[0120] In this embodiment, an example has been described in which the second convolution layer 234 is merged into the merged layer of the first convolution layer 232 and the first batch regularization layer 233, and then the second batch regularization layer 235 is merged. However, the order of merging is not limited to this, and if each layer has the same number of neurons, the layers can be merged in a different order. As an example, the second merged layer, which is a merger of the second convolution layer 234 and the second batch regularization layer 235, can be merged into the first merged layer, which is a merger of the first convolution layer 232 and the first batch regularization layer 233. EXAMPLES
[0121] Next, another embodiment in which elements that are preferably added to the first embodiment will be described in detail with reference to the drawings. Note that, in the following, the same parts as those in the first embodiment will be omitted.
[0122] 15, in this embodiment, a calculation method selection unit 301 and an expansion unit 302 are added to the information processing device 211. These additional elements make the information processing device 211 more effective when using the information processing device 211 in the first embodiment to convert a trained neural network so that it can be subjected to inference processing by an embedded device. Note that the information processing device 211 has the same configuration as that in the first embodiment, except for the addition of the calculation method selection unit 301 and the expansion unit 302.
[0123] The calculation method selection unit 301 determines, for example, a calculation method between layers used when calculating an output (activation) from each layer, according to layer information including the type of layer. The calculation method selection unit 301 is realized, for example, by the processor 221 and the memory 222 working together. Furthermore, a table that stores an appropriate calculation method according to the type of layer may be stored in a hard disk, and the calculation method may be determined by referring to this table.
[0124] As the calculation method, various calculation methods can be selected and adopted according to the layer information. In the following, an example of selecting a calculation method when the layer type is a convolutional layer will be shown.
[0125] [Table 1]
[0126] In Table 1, the input size, output size, kernel, dilation, and stride are used as layer information. The output size can be calculated from the filter size. In addition, a padding layer may be inserted before the convolution layer to adjust the input size.
[0127] In Table 1, rows with "Convolution" in the calculation method column indicate convolution calculations, rows with "SGEMM" indicate calculations using SGEMM, and rows with "Winograd" indicate calculations using Winograd.
[0128] The unrolling unit 302 searches for and unrolls, for example, loop processing or recursive processing (recursive calls) present in the source code of the trained neural network. The unrolling unit 302 is realized, for example, by the processor 221 and the memory 222 working together.
[0129] FIG. 16 shows a process flow of the information processing device 211 in the first embodiment, to which a calculation method selection step S261 and an expansion step S262 according to the second embodiment have been added. The calculation method selection step S261 is preferably added after the numerical expression conversion step S258 in the loop processing of the information processing device 211. Also, the expansion step S262 is preferably added before the language conversion step S259. Also, the expansion process performed in the expansion step S262 may be performed simultaneously with the language conversion process performed in the language conversion step S259.
[0130] According to the information processing device 211 in the second embodiment, it is possible to select an optimal calculation method for each layer in addition to merging and deleting layers. This makes it possible to determine a calculation method for each layer while taking into consideration the performance constraints of the hardware. This makes it possible to reduce the processing load of the inference process by the trained neural network.
[0131] According to the information processing device 211 in the second embodiment, in addition to merging and deleting layers, loop processing and recursive processing included in the trained neural network can be expanded. This makes it possible to reduce the overhead caused by the determination of the end of loop processing and recursive calls in the inference processing by the trained neural network. This makes it possible to reduce the processing load of the inference processing by the trained neural network.
[0132] According to the information processing device 211 of the second embodiment, the calculation method selection unit 301 and the expansion unit 302 are combined to obtain an optimal trained neural network according to the hardware constraints of the embedded device, such as the processing power and memory capacity.
[0133] Below, based on the above-mentioned description of the embodiments and examples, some aspects of the present invention will be further illustrated.
[0134] A first aspect of the present invention is In the information processing device, Accessing a predetermined trained neural network to obtain a network structure including layer information and trained parameters of the trained neural network; Determining whether a layer and another layer included in the trained neural network can be merged according to the network structure; creating a merged layer by merging the one layer determined to be mergable with the other layer according to the network structure and the learned parameters; Search for and delete layers that are not required for inference processing from the trained neural network. It is a computer-readable recording medium on which a program for performing processing is stored.
[0135] According to a first aspect of the present invention, the data size of the trained neural network can be reduced by having a computer read a program for causing an information processing device to perform processing to reduce the data size of the trained neural network.
[0136] A second aspect of the present invention is, in addition to the first aspect of the present invention, The merged layer is created by changing the layer information or the learned parameters of the one layer according to the layer information and the learned parameters of the other layer; The layers not required for the inference process include the other layers after merging.
[0137] According to a second aspect of the present invention, the other layer is merged into the one layer by changing the layer information or the trained parameters of the one layer according to the layer information and trained parameters of the other layer. Therefore, an information processing device that reads a computer-readable recording medium according to the second aspect of the present invention can reduce the data size of the trained neural network while maintaining the original inference accuracy, simply by changing the layer information or the trained parameters.
[0138] As a third aspect of the present invention, The information processing device, the program, or the computer-readable recording medium includes: and a numerical expression conversion unit (numerical expression conversion means) that converts a format of a numerical expression of a trained parameter included in the trained neural network according to a storage capacity or a processing capacity of an information processing device in which an inference process is performed by the trained neural network, The numerical expression conversion unit (numerical expression conversion means) converts the numerical expressions of the learned parameters changed by the merging process. This may also be the case.
[0139] According to the third aspect of the present invention, it is further possible to obtain a trained neural network that is suited to the hardware capabilities of an information processing device in which inference processing is performed using the trained neural network.
[0140] As a fourth aspect of the present invention, The information processing device, the program, or the computer-readable recording medium includes: The system may further include a language conversion unit that converts a source code representing the trained neural network into another language. According to a fourth aspect of the present invention, the source code of a trained neural network can be converted into a program language suitable for the hardware of an information processing device in which inference processing is performed by the trained neural network. [Explanation of symbols]
[0141] 111 Information processing equipment 112 Control section 113 Acquisition Department 114 Analysis Department 115 Merger Judgment Department 116 Merger Department 117 Deleted section 121 processors 122 Memory 123 Display 124 Keyboard 125 Hard Disk 126 Communications Department 127 Programs 128 Symbol Table S141 Access step S142 Information acquisition step S143 Analysis step S144 Merger Judgment Step S145 Merger Step S146 Deletion judgment step S147 Removal Step S148 Layer adjustment step
Claims
1. An information processing device for reducing a data size of a trained neural network, comprising: An acquisition unit that accesses the trained neural network and acquires a network structure including layer information of the trained neural network and trained parameters; a merging determination unit that determines whether or not one layer and another layer included in the trained neural network can be merged according to the network structure acquired by the acquisition unit; A merging unit that merges the one layer determined to be mergable by the merging determination unit with the other layer according to the network structure and the learned parameters acquired by the acquisition unit to create a merged layer; a deletion unit that searches for and deletes layers that are not required for the inference process from the trained neural network by referring to a deletion table in which patterns of types of layers that are not required for the inference process are recorded, The deletion unit deletes the layers unnecessary for the inference process after the merging process by the merging unit.
23. An information processing apparatus comprising:
2. The merging unit creates the merged layer by changing the layer information or the learned parameters of the one layer according to the layer information and the learned parameters of the other layer; The deletion unit deletes the layer that is not necessary for an inference process including the other layer after the merging process by the merging unit.
2. The information processing apparatus according to claim 1,
3. The information processing device further includes a numerical expression conversion unit that converts a format of a numerical expression of the trained parameter included in the trained neural network, The format of the numerical representation after conversion is determined according to the performance of the hardware on which the inference process by the trained neural network is performed.
3. The information processing apparatus according to claim 1, wherein the information processing apparatus further comprises: a first input section;
4. The information processing device further includes a calculation method selection unit that selects a calculation method for a layer, The calculation method selection unit determines a calculation method for a layer according to layer information including a type of the layer.
4. The information processing apparatus according to claim 1, wherein the information processing apparatus is a computer.
5. Furthermore, the information processing device and an expansion unit that searches for loop processing or recursive processing included in the trained neural network and expands the searched loop processing or recursive processing.
5. The information processing apparatus according to claim 1, wherein the information processing apparatus is a computer.
6. A program for causing an information processing device that can access a trained neural network to perform a process of reducing a data size of the trained neural network, The information processing device includes: Accessing the trained neural network to obtain a network structure including layer information and trained parameters of the trained neural network; Determining whether a layer and another layer included in the trained neural network can be merged according to the network structure; creating a merged layer by merging the one layer determined to be mergable with the other layer according to the network structure and the learned parameters; A layer that is not necessary for the inference process is searched for and deleted from the trained neural network by referring to a deletable table in which patterns of layer types that are not necessary for the inference process are recorded. The program that performs the processing.
7. The merged layer changes the layer information or the learned parameters of the one layer according to the layer information and the learned parameters of the other layer. Created, The layers not required for the inference process include the other layers after merging.
7. The program according to claim 6 .
8. Furthermore, the information processing device A process of converting the format of a numerical expression of a trained parameter included in the trained neural network is performed according to the performance of hardware on which the inference process by the trained neural network is performed.
8. The program according to claim 6 or 7.
9. Furthermore, the information processing device A process of selecting a calculation method for a layer is performed according to layer information including the type of the layer. The program according to any one of claims 6 to 8.
10. Furthermore, the information processing device A loop process or a recursive process included in the trained neural network is searched for, and a process of expanding the searched loop process or the recursive process is performed. The program according to any one of claims 6 to 9.
Citation Information
Patent Citations
Learning method for hierarchical neural network
JP1993101209A
Calculation technique determining system, calculation technique determining device, processing device, calculation technique determining method, processing method, calculation technique determining program, and processing program
JP2019128831A
Method and device for optimizing and applying multi-layer neural network model, and storage medium
JP2019160319A
Learning device, learning method, and learning program
JP2019185275A
Method and system for performing machine learning
WO2019210237A1
