WO2023248454A1 - Computation device and computation method - Google Patents

Computation device and computation method Download PDF

Info

Publication number
WO2023248454A1
WO2023248454A1 PCT/JP2022/025251 JP2022025251W WO2023248454A1 WO 2023248454 A1 WO2023248454 A1 WO 2023248454A1 JP 2022025251 W JP2022025251 W JP 2022025251W WO 2023248454 A1 WO2023248454 A1 WO 2023248454A1
Authority
WO
WIPO (PCT)
Prior art keywords
layer
dnn
unit
neural network
reduction rate
Prior art date
Application number
PCT/JP2022/025251
Other languages
French (fr)
Japanese (ja)
Inventor
咲絵 小松
浩朗 伊藤
真 岸本
Original Assignee
日立Astemo株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日立Astemo株式会社 filed Critical 日立Astemo株式会社
Priority to PCT/JP2022/025251 priority Critical patent/WO2023248454A1/en
Publication of WO2023248454A1 publication Critical patent/WO2023248454A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present invention relates to an arithmetic device and an arithmetic method.
  • DNN deep neural network
  • Automated driving systems use DNN models to recognize objects around the vehicle (referred to as “surrounding recognition"), perform automatic steering, and perform automatic speed control to control the vehicle to its destination. Therefore, the DNN model is used in a learning process for learning the features of an object from an image, and an inference process for extracting an object from an image based on the learning results of the learning process.
  • an automatic driving system using a DNN model controls automatic driving of a vehicle, it first acquires an image of the outside world from a camera, and converts the image into a format that can be used by the DNN model. In the inference process, an image whose format has been converted is used as an input image, and an object is extracted from the input image using a DNN model that has undergone learning processing in advance. Thereafter, the automatic driving system creates a surrounding map representing the outside world of the vehicle from the object extraction results, creates a behavior plan for the vehicle based on the surrounding map, and controls the vehicle based on the action plan.
  • the surrounding map may be, for example, a map in which the type of object shown in the image, such as a vehicle or a person, can be determined based on an image taken in front of the vehicle.
  • images not only taken of the front of the vehicle but also images taken of the rear of the vehicle and images taken of the sides of the vehicle may be used.
  • an image taken of the surrounding area by a camera and information obtained from sensors such as LiDAR (Light Detection and Ranging) and Radar may be used in combination.
  • Patent Documents 1 and 2 describe various models using neural networks.
  • Patent Document 1 describes, "a first combination information group for determining an output value when an input value is given, and a plurality of combinations whose degree of influence on predetermined data given as an input value exceeds a predetermined value.
  • a neural network including a third group of connected information created by a thinning unit deleting at least one piece of connected information from a first group of connected information based on a second group of connected information that is information. ing.
  • ⁇ learning is performed using a cost function that takes into consideration the degree of influence when deleting each channel/filter, and a scaling coefficient is obtained, and at least the degree of influence when deleting a channel/filter is calculated based on the scaling coefficient.
  • the DNN model used in automatic driving systems has a very large number of operations because convolution operations consisting of multiplication and addition are repeatedly executed.
  • object recognition using a DNN model requires high-speed calculations. Therefore, when implementing a DNN model in an in-vehicle autonomous driving ECU (Electronic Control Unit), it is necessary to reduce the number of calculations. Therefore, by simplifying the DNN model using reduction, it is possible to reduce the number of operations.
  • ECU Electronic Control Unit
  • the present invention has been made in view of this situation, and it is an object of the present invention to make it possible to reduce the number of man-hours required for reduction of a multilayer neural network.
  • the arithmetic device calculates the importance of a channel using a weighting coefficient set for a channel of a multilayer neural network model that has channels each composed of a plurality of neurons in an input layer, a middle layer, and an output layer.
  • an importance calculation unit that sets a target reduction rate for the entire multilayer neural network model; a target reduction rate setting unit that sets a target reduction rate for the entire multilayer neural network model; and a reduction rate calculation unit that sets a target reduction rate for the entire multilayer neural network model.
  • a reduction rate calculation unit for each layer that calculates the reduction rate, and a reduction unit that reduces each layer according to the reduction rate calculated by the reduction rate calculation unit for each layer and generates a multilayer neural network model after reduction. and a relearning unit that retrains the reduced multilayer neural network model.
  • FIG. 1 is a block diagram showing an example of the overall configuration of an automatic driving system according to a first embodiment of the present invention.
  • 1 is a block diagram showing an example of a hardware configuration of a computer according to a first embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating an example of processing of the DNN reduction device according to the first embodiment of the present invention.
  • FIG. 2 is a simplified diagram showing a trained DNN model according to the first embodiment of the present invention.
  • 1 is a diagram showing a basic form of a convolutional neural network according to a first embodiment of the present invention.
  • FIG. FIG. 3 is a diagram illustrating an example of a reduced DNN model according to the first embodiment of the present invention.
  • FIG. 1 is a block diagram showing an example of the overall configuration of an automatic driving system according to a first embodiment.
  • the automatic driving system 1 is composed of a DNN reduction device 100 and an automatic driving ECU 300 installed in the vehicle 500, and controls the recognition of the surroundings of the vehicle 500 and automatic steering, and automatically drives the vehicle 500 to the destination by automatic speed control. control.
  • the vehicle 500 is also equipped with a camera 200 and an actuator 400.
  • Automatic driving ECU 300 controls automatic driving of vehicle 500 using contracted DNN model 40 contracted from trained DNN model 10 by DNN reduction device 100 .
  • the camera 200 is an example of a monocular camera or a stereo camera that can photograph the outside world of the vehicle 500 using visible light and infrared rays. Camera 200 outputs an image of the outside world to automatic driving ECU 300 as outside world information.
  • the actuator 400 is a device that is driven under the control of the automatic driving ECU 300, and operates various parts such as an accelerator, a brake, and a steering wheel.
  • the automatic driving ECU 300 includes an external world recognition section 310, a risk prediction section 320, and an action planning section 330.
  • Each functional part of automatic driving ECU 300 shown in FIG. 1 is a main part necessary for automatic driving of vehicle 500, and description and illustration of other functional parts necessary for automatic driving will be omitted.
  • the external world recognition unit 310 recognizes objects in the external world based on external world information acquired from the camera 200.
  • the object recognized by the external world recognition unit 310 is output to the risk prediction unit 320 as an object recognition result.
  • the external world recognition unit 310 uses a reduced DNN model 40 output from the DNN relearning unit 150, which will be described later, when performing external world recognition processing.
  • the risk prediction unit 320 uses the object recognition results input from the external world recognition unit 310 to predict possible risks based on the current external world situation.
  • the risk predicted by the risk prediction unit 320 is output to the action planning unit 330 as a risk prediction result.
  • the action planning unit 330 generates an action plan including the traveling direction and traveling speed of the vehicle 500 based on the risk prediction results input from the risk predicting unit 320.
  • the action plan generated by the action planning unit 330 is output to the actuator 400.
  • the actuator 400 realizes automatic driving of the vehicle 500 by driving each part of the vehicle 500 according to the action plan.
  • the DNN reduction device 100 is installed in a cloud server installed at a location away from the vehicle 500.
  • the automatic driving ECU 300 is configured to download the reduced DNN model 40 from the DNN reduction device 100 every time the automatic driving ECU 300 is started.
  • the load of reduction processing of the learned DNN model 10, etc. can be shouldered by the cloud server.
  • the DNN reduction device 100 is a device that performs reduction processing on the trained DNN model 10. Reduction processing of the learned DNN model 10 requires a large amount of calculation processing.
  • This DNN reduction device 100 includes an importance calculation section 110, a target reduction rate setting section 120, a reduction condition setting section 130, a DNN reduction section 140, and a DNN relearning section 150.
  • rectangles surrounded by solid lines represent subjects of various types of processing, and rectangles surrounded by dashed-dotted lines represent various types of data or information.
  • the importance calculation unit 110 and the target reduction rate setting unit 120 are connected to each layer reduction rate calculation unit 131.
  • the importance calculation unit (importance calculation unit 110) is set to a channel of a multilayer neural network model (trained DNN model 10), which has a channel composed of a plurality of neurons for each input layer, intermediate layer, and output layer. The importance of the channel is calculated using the weighting coefficient 20 for each channel.
  • This multilayer neural network model is a deep neural network model and is used as the trained DNN model 10. Therefore, the importance calculation unit 110 extracts the weighting coefficient 20 of each channel (hereinafter abbreviated as “ch”) from the learned DNN model 10. Then, the importance calculation unit 110 calculates the importance of each channel using the weighting coefficient 20 of each channel.
  • the degree of importance is an index representing the influence of each channel of the trained DNN model 10 on recognition accuracy.
  • the importance of each channel calculated by the importance calculation unit 110 is output to each layer reduction rate calculation unit 131.
  • FIG. 4 is a schematic diagram of the trained DNN model 10.
  • the trained DNN model 10 is an example of a multilayer neural network, and is composed of an input layer, a plurality of intermediate layers, and an output layer.
  • Each layer of the trained DNN model 10 is composed of a neural network including a plurality of neurons.
  • a neuron in a certain layer of the intermediate layer is connected to a plurality of neurons in the front layer and a plurality of neurons in the rear layer.
  • FIG. 5 is a diagram showing the basic form of a convolutional neural network.
  • the input image data (indicated by the number "7") is divided into predetermined sizes and taken into the input layer.
  • the value of a neuron in a certain layer is convolved with the values of a plurality of neurons in a previous layer by a filter, and is taken into a plurality of convolution layers for each filter.
  • pooling processing is performed on each convolutional layer to generate a pooling layer.
  • one cell in the pooling layer is called a neuron
  • a set of each neuron in the pooling layer is called a channel (ch).
  • the outputs of the pooling layer are combined into a fully connected layer.
  • each intermediate layer includes a plurality of sets of convolution layers and pooling layers.
  • a target reduction rate setting unit sets a target reduction rate for the entire multilayer neural network model (trained DNN model 10). For example, the target reduction rate setting unit 120 sets what percentage of channels to reduce in the entire trained DNN model 10, not for each layer of the trained DNN model 10. Therefore, the target reduction rate setting unit 120 sets a target reduction rate based on the target reduction rate 30 inputted in advance by the user. The target reduction rate set by the target reduction rate setting unit 120 is output to each layer reduction rate calculation unit 131.
  • the reduction condition setting unit 130 sets conditions for reducing the DNN from conditions such as the weighting coefficient 20 and the number of operations.
  • the reduction condition setting unit 130 includes a reduction rate calculation unit 131 for each layer.
  • Each layer reduction rate calculation unit calculates the reduction rate of each layer of the multilayer neural network model (trained DNN model 10) based on the importance level and the target reduction rate. .
  • This layer reduction rate calculation section 131 is connected to the DNN reduction section 140.
  • Each layer reduction rate calculation unit 131 calculates the learned DNN model based on the importance calculated by the importance calculation unit 110 and the reduction rate of the entire trained DNN model 10 set by the target reduction rate setting unit 120 The reduction rate of each layer is calculated so that the DNN model 10 reaches the target reduction rate.
  • each layer reduction rate calculation unit 131 calculates the reduction rate of each layer by inputting the importance of each channel and the set target reduction rate.
  • the reduction rate of each layer calculated by the layer reduction rate calculation unit 131 is output to the DNN reduction unit 140.
  • the reduction unit reduces each layer according to the reduction rate calculated by the layer reduction rate calculation unit (each layer reduction rate calculation unit 131), and generates a multilayer neural network after reduction.
  • a network model (reduced DNN model 40) is generated.
  • This DNN reduction unit 140 is connected to a DNN relearning unit 150.
  • the trained DNN model 10 and the reduction rate of each layer calculated by the layer reduction rate calculation unit 131 are input to the DNN reduction unit 140 .
  • the DNN reduction unit 140 reduces the learned DNN model 10 according to the reduction rate of each layer set by the layer reduction rate calculation unit 131. For example, if 10% is set as the reduction rate for a certain layer of the trained DNN model 10, reduction is performed to delete 10% of the channels in this layer.
  • the learned DNN model 10 reduced by the DNN reduction unit 140 is output to the DNN relearning unit 150 as the reduced DNN model 40.
  • the relearning unit performs relearning of the reduced multilayer neural network model (reduced DNN model 40).
  • This DNN relearning section 150 is connected to the external world recognition section 310 of the automatic driving ECU 300.
  • the reduced DNN model 40 is input to the DNN relearning unit 150 from the DNN reduction unit 140 .
  • the reduced DNN model 40 input to the DNN relearning unit 150 is not shown.
  • the DNN relearning unit 150 then relearns the input reduced DNN model 40.
  • the DNN relearning unit 150 reads learning data (not shown), retrains the reduced DNN model 40, reads evaluation data (not shown), and evaluates the reduced DNN model 40.
  • the DNN relearning unit 150 confirms that the object recognition accuracy of the reduced DNN model 40 is higher than the target recognition accuracy, the DNN relearning unit 150 outputs the reduced DNN model 40 to the external world recognition unit 310 of the automatic driving ECU 300. do. In this way, the DNN relearning unit 150 retrains the reduced DNN model 40 at least once.
  • the DNN reduction device 100 may be mounted on the vehicle 500. In this case, even if the vehicle 500 is in an environment where it cannot connect to a wireless network (such as a tunnel or an underground road), the reduced DNN model 40 generated and retrained by the DNN reduction device 100 is immediately connected to the external world recognition unit 310. is input. Therefore, even in an environment where vehicle 500 cannot connect to a wireless network, external world recognition unit 310 can accurately recognize objects.
  • a wireless network such as a tunnel or an underground road
  • FIG. 2 is a block diagram showing an example of the hardware configuration of the computer 600.
  • Computer 600 is an example of hardware used as a computer that can operate as DNN reduction device 100 according to this embodiment.
  • the DNN reduction device 100 according to the present embodiment realizes a DNN reduction calculation method performed by the functional blocks shown in FIG. 1 in cooperation with each other by having the computer 600 (computer) execute a program.
  • the computer 600 includes a CPU (Central Processing Unit) 610, a ROM (Read Only Memory) 620, and a RAM (Random Access Memory) 630, each connected to a bus 640. Further, the computer 600 includes a nonvolatile storage 650 and a network interface 660.
  • CPU Central Processing Unit
  • ROM Read Only Memory
  • RAM Random Access Memory
  • the CPU 610 reads out software program codes that implement each function according to the present embodiment from the ROM 620, loads them into the RAM 630, and executes them. Variables, parameters, etc. generated during the calculation process of the CPU 610 are temporarily written to the RAM 630, and these variables, parameters, etc. are read out by the CPU 610 as appropriate.
  • an MPU Micro Processing Unit
  • the CPU 610 realizes processing of each functional unit included in the DNN reduction device 100.
  • non-volatile storage 650 for example, an HDD (Hard Disk Drive), SSD (Solid State Drive), flexible disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, or non-volatile memory is used. It will be done.
  • an OS Operating System
  • programs for operating the computer 600 are recorded in the nonvolatile storage 650.
  • the ROM 620 and the non-volatile storage 650 record programs and data necessary for the operation of the CPU 610, and serve as an example of a computer-readable non-transitory storage medium that stores programs executed by the computer 600. used.
  • the trained DNN model 10 and the reduced DNN model 40 are stored in the nonvolatile storage 650.
  • a NIC Network Interface Card
  • various data can be sent and received between devices via a LAN (Local Area Network) connected to a terminal of the NIC, a dedicated line, etc. It is possible.
  • DNN reduction device 100 transmits reduced DNN model 40 to automatic driving ECU 300 via network interface 660.
  • FIG. 3 is a flowchart illustrating an example of processing by the DNN reduction device 100 according to the first embodiment.
  • the DNN reduction device 100 has the trained DNN model 10 that has been trained in advance. Then, the DNN reduction device 100 obtains the weighting coefficient 20 of each channel from the learned DNN model 10.
  • FIG. 4 is a simplified diagram of the trained DNN model 10.
  • Each intermediate layer of the trained DNN model 10 shown in FIG. 4 includes five channels.
  • 1ch in the middle layer in the trained DNN model 10 is shown as a region 501.
  • the importance calculation unit 110 calculates the importance of the channel shown in the area 501.
  • each channel represents the degree of influence of each channel on recognition accuracy. It is known that among the channels of each layer of the intermediate layer, the average value of the importance of the layer near the input layer is large, and the average value of the importance of the layer near the output layer is small. The channel having a higher degree of importance is less likely to be deleted in later processing. Conventionally, layers that were close to the output layer and had low importance required a small number of operations, so almost all layers were sometimes deleted.
  • the importance calculation unit 110 calculates the importance so that a channel with a large variance of the weighting coefficient 20 or a channel whose characteristics are different from other channels has a high importance. For example, a channel with an importance level of 0.9 can be said to have a large variance. Furthermore, since a channel that differs from the characteristics of other channels reflects a feature amount that is different from that of other channels, recognition accuracy may be affected if it is deleted in later processing. Therefore, the importance calculation unit 110 calculates a high importance of a channel that has characteristics different from those of other channels, thereby making it difficult for this channel to be deleted in later processing.
  • the importance calculation unit calculates the priority of the previous stage connected to the subsequent channel, based on the importance of the subsequent channel and the weighting coefficient 20 of each subsequent channel, starting from the layer closest to the output layer. Calculate channel importance.
  • the importance of the channels subsequent to the region 501 (that is, the channels on the right side of the region 501) are 0.6, 0.9, 0.4, 0.2, 0. It is 1. Therefore, the importance calculation unit 110 calculates the importance of the region 501 using the following equation (1), assuming that the weighting coefficients 20 of each channel are w1, w2, w3, w4, and w5.
  • Equation (1) whether the weighting coefficient 20 is positive or negative, if the value becomes large, the influence on the calculation is large and the channel should not be deleted, so the absolute value is used.
  • the target reduction rate setting unit 120 sets the target reduction rate 30 set in advance by the user (S2).
  • the target reduction rate 30 is an index indicating how much the number of operations is reduced in the trained DNN model 10 (reduced DNN model 40), This is the target reduction rate.
  • each layer reduction rate calculation unit calculates the entire multilayer neural network model (trained DNN model 10) based on the importance in each layer of the importance calculated for each channel. Calculate the target reduction rate of each layer with respect to the target reduction rate in .
  • each layer reduction rate calculation unit 131 calculates the target reduction rate of each layer based on the importance of each channel calculated by the importance calculation unit 110 and the target reduction rate 30 set by the target reduction rate setting unit 120.
  • a reduction rate is calculated (S3).
  • the target reduction rate of each layer is an index that indicates which channel is to be reduced and by how much among the channels in each layer of the trained DNN model 10. Compared to , it is possible to contract each layer.
  • the DNN reduction unit 140 reduces the trained DNN model 10 based on the input trained DNN model 10 and the target reduction rate of each layer calculated by the layer reduction rate calculation unit 131.
  • the DNN relearning unit 150 retrains the reduced DNN model 40 using the reduced trained DNN model 10 as the reduced DNN model 40 (S4).
  • the DNN relearning unit 150 outputs the relearned reduced DNN model 40 to the automatic driving ECU 300 of the vehicle 500 (S5). After the process of step S5, the process of the DNN reduction device 100 ends.
  • FIG. 6 is a diagram showing an example of the reduced DNN model 40.
  • a reduction process when the target reduction rate 30 in the trained DNN model 10 is set to 40% will be described.
  • the DNN reduction unit 140 reduces channels in order of importance from among the plurality of channels included in the intermediate layer. For example, the DNN reduction unit 140 reduces 6 channels whose target reduction rate 30 is 40% from the 15 channels in the middle layer of the learned DNN model 10 shown in FIG. 4 in descending order of importance. As a result, the reduced DNN model 40 shown in FIG. 6 is created in which the number of channels in the middle layer is 9. This reduced DNN model 40 is retrained by the DNN retraining unit 150 and then output to the external world recognition unit 310.
  • the channels of the trained DNN model 10 are reduced in descending order of importance according to the target reduction rate 30, and the reduced DNN model 40 is Creating. Then, the DNN reduction device 100 obtains an optimal reduction rate in advance by using the importance calculated from the weighting coefficient 20 of each channel in the importance analysis and the number of operations for each layer. Therefore, the DNN reduction device 100 can suppress a decrease in object recognition accuracy using the reduced DNN model 40 by reducing the trained DNN model 10 using the importance level. Further, the DNN reduction device 100 only needs to relearn the reduced DNN model 40 at least once. Therefore, there is no need to repeat relearning of the DNN model as in the past, and the number of man-hours required to reduce the learned DNN model 10 can be reduced.
  • the external world recognition unit 310 can reduce the number of operations in the external world recognition process using the reduced DNN model 40 and quickly obtain necessary information such as the external world recognition result.
  • the learned DNN model 10 is reduced according to the target reduction rate 30 set by the user, the learned DNN model 10 is reduced to the reduction rate intended by the user.
  • the trained DNN model 10 may be reduced too much and the recognition accuracy of the reduced DNN model 40 may decrease, or conversely, the number of operations performed by the automatic driving ECU 300 may increase without being reduced. There is no.
  • external information is acquired from the image captured by the camera 200, but this is done using a sensor that can acquire the distance to an object and the type of the object, such as Lidar, Radar, or a far-infrared camera.
  • the means for acquiring external information is not limited to the camera 200. Further, a sensor capable of acquiring external information may be used alone, or a plurality of sensors may be used in combination.
  • the automatic driving ECU 300 may store the external world recognition result by the external world recognition unit 310, the risk prediction result by the risk prediction unit 320, and the action plan by the action planning unit 330. Then, the DNN reduction device 100 may acquire this information from the automatic driving ECU 300, calculate a DNN model anew, and use it as the learned DNN model 10.
  • the layer reduction rate calculation unit 131 of the DNN reduction device 100 calculates the reduction rate of each layer based on the importance of each channel. However, if only the importance of each channel is used, the weight coefficient 20 of the latter layer (layer close to the output layer) of the trained DNN model 10 is likely to be calculated small, so the importance of the channels in the latter layer becomes small. Therefore, channels in the latter half of the layer are likely to be subject to contraction. However, since the latter layer of the trained DNN model 10 originally has a small number of operations, it is assumed that it is difficult to obtain the effect of reduction. Therefore, when the layer reduction rate calculation unit 131 calculates the reduction rate of each layer, the number of operations is also taken into consideration. As a result, it is possible to avoid reducing only layers with a small number of operations.
  • FIG. 7 is a block diagram showing a configuration example of an automatic driving system 1A including a DNN condensation device 100A according to the second embodiment.
  • functional blocks that perform the same processing as those in FIG. 1 are given the same names and numbers, and unless otherwise specified, descriptions will be omitted as they have the same or similar functions.
  • An automatic driving system 1A includes a DNN reduction device 100A and an automatic driving ECU 300.
  • the reduction condition setting section 130A included in the DNN reduction device 100A additionally includes a parameter setting section 132 in addition to the layer reduction rate calculation section 131.
  • the parameter setting unit 132 sets parameters that contribute when the layer reduction rate calculation unit 131 calculates the reduction rate of each layer. This parameter is also called a contribution parameter.
  • the parameter setting unit sets the degree of importance and the number of operations for each layer extracted from the multilayer neural network model (trained DNN model 10) as parameters.
  • the number of operations 50 for each layer extracted from the trained DNN model 10 is input to the parameter setting unit 132.
  • the number of operations 50 in each layer is the number of connection lines of a plurality of channels in the next layer connected to one cn in a certain layer. Since FIG. 4 is an example of the simplified trained DNN model 10, 5 channels in the next layer (the middle layer of the intermediate layer) are connected to 1 channel in the layer on the input side of the intermediate layer.
  • the number of operations between channel 1 of the layer on the input side of the intermediate layer and channel of the next layer is "5". Since the number of operations for each channel in a certain layer with respect to the channel in the next layer is determined, the total number of operations for the channels in each layer is determined as the number of operations 50 for each layer.
  • the parameter setting unit 132 sets parameters that determine the degree of importance and the contribution rate of the number of calculations, depending on whether the recognition accuracy and calculation speed of the trained DNN model 10 achieve each goal.
  • the parameter setting unit (parameter setting unit 132) calculates the degree of contribution of the importance calculated for each channel and the number of calculations 50 for each layer, which are used when each layer reduction rate calculation unit 131 calculates the reduction rate.
  • the contribution degree is set as a parameter (contribution degree parameter).
  • a learned DNN is created based on the importance and the number of operations 50 in each layer. Model 10 is reduced.
  • parameter setting may also be referred to as parameter adjustment.
  • the contribution parameter set by the parameter setting unit 132 is input to each layer reduction rate calculation unit 131.
  • Each layer reduction rate calculation unit calculates the target reduction rate of each layer based on the parameter (contribution parameter) and the target reduction rate. For example, each layer reduction rate calculation unit 131 calculates the reduction rate of each layer based on the reduction rate, importance, number of operations, and contribution parameters of the entire trained DNN model 10 determined by the target reduction rate setting unit 120. calculate.
  • FIG. 8 is a flowchart illustrating an example of processing by the DNN reduction device 100 according to the second embodiment.
  • the same process as in FIG. 3 is given the same number, and the description will be omitted as having the same or similar function unless otherwise specified.
  • the DNN reduction device 100 has a trained DNN model 10 that has been trained in advance. Then, the DNN reduction device 100 obtains the weighting coefficient 20 of each channel from the learned DNN model 10. Then, the importance calculation unit 110 calculates the importance of each channel based on the weighting coefficient 20 of each channel (S1).
  • the parameter setting unit 132 of the DNN reduction device 100 obtains the number of operations 50 for each layer in addition to the importance of each channel calculated from the weighting coefficient 20 of each channel according to the first embodiment ( S11).
  • the parameter setting unit 132 sets the contribution parameter of each channel when contracting the trained DNN model 10 based on the contribution of the importance of each channel and the number of operations of each channel ( S12). Then, the parameter setting unit 132 applies the set contribution parameter to the following equation (2) for calculating the reduction rate of each layer, and calculates the reduction rate of each layer (S13). For example, the parameter setting unit 132 sets the degree of contribution x of importance to 0.5 and the degree of contribution y of number of operations to 0.5.
  • C(L) represents the reduction rate of each layer.
  • P(L) represents the importance of each layer.
  • x represents the degree of contribution of importance.
  • O(L) represents the number of operations 50 in each layer.
  • y represents the degree of contribution of the number of operations.
  • base_rate represents the target reduction rate of 30.
  • the contribution x of the importance and the contribution y of the number of operations are both the same 0.5, but the contribution x of the importance is 0.3 and the contribution y of the number of operations is 0.
  • a different value of .6 is also envisaged.
  • the initial value of the contribution degree x of importance and the initial value of the contribution degree y of operation number can be determined in advance by the user.
  • the processing after the reduction ratio of each layer is calculated by the layer reduction ratio calculation unit 131 in step S13 is the same as the processing in the DNN reduction apparatus 100 according to the first embodiment.
  • each layer reduction rate calculation unit 131 calculates the reduction rate of each layer based on the contribution parameter. By using the contribution degree parameter of the number of operations to calculate the reduction rate, each layer reduction rate calculation unit 131 can avoid only layers with a small number of operations being targeted for reduction.
  • each layer reduction rate calculation unit 131 can avoid layers with high importance from becoming reduction targets.
  • the DNN reduction unit 140 reduces the learned DNN model 10 according to the target reduction rate 30 by leaving the channels with high importance in the trained DNN model 10 and reducing the channels with a large number of operations. becomes possible.
  • the automatic driving ECU 300 can quickly execute the calculation process for external world recognition using the reduced DNN model 40 in which the total number of calculations is greatly reduced.
  • automatic driving ECU 300 can reliably recognize an object to be recognized and control the driving of vehicle 500 while avoiding this object.
  • the DNN reduction device checks the recognition accuracy of the reduced DNN model 40 and adjusts the reduction rate based on the confirmation result of the recognition system, thereby achieving recognition accuracy that ensures safety. Try to keep it.
  • FIG. 9 is a block diagram showing a configuration example of an automatic driving system 1B including a DNN reduction device 100B according to the third embodiment.
  • blocks that perform the same processing as those in FIG. 7 are given the same names and numbers, and unless otherwise explained, they are assumed to have the same or similar functions and will not be described.
  • An automatic driving system 1B includes a DNN reduction device 100B and an automatic driving ECU 300.
  • the DNN reduction device 100B has a configuration in which an FPS (Frames Per Second) confirmation unit 160 and a recognition accuracy confirmation unit 170 are newly added to the DNN reduction device 100A according to the second embodiment.
  • FPS Frams Per Second
  • fps is also referred to as calculation speed.
  • the DNN relearning section 150 is connected to the FPS confirmation section 160. Therefore, the reduced DNN model 40 retrained by the DNN relearning unit 150 is output to the FPS confirmation unit 160.
  • the calculation speed checking unit (FPS checking unit 160) checks the calculation speed from the re-learned reduced multilayer neural network model (reduced DNN model 40).
  • This FPS confirmation section 160 is connected to the parameter setting section 132 and the recognition accuracy confirmation section 170.
  • the FPS confirmation unit 160 measures the calculation speed of the reduced DNN model 40 input from the DNN relearning unit 150, and checks whether the calculation speed of the reduced DNN model 40 satisfies the target calculation speed. do.
  • the recognition accuracy confirmation unit 170 causes the reduced DNN model 40 to read several dozen images whose data amount is known, and calculates the number of images that the reduced DNN model 40 can process within a predetermined time. Find it as speed.
  • the result of checking the calculation speed of the reduced DNN model 40 by the FPS checking unit 160 is output to the parameter setting unit 132. Further, the FPS confirmation unit 160 outputs the reduced DNN model 40 to the recognition accuracy confirmation unit 170.
  • the recognition accuracy confirmation unit confirms the recognition accuracy of the re-learned reduced multilayer neural network model (reduced DNN model 40).
  • This recognition accuracy confirmation section 170 is connected to the parameter setting section 132 and the external world recognition section 310 of the automatic driving ECU 300.
  • the recognition accuracy confirmation unit 170 measures the recognition accuracy of the reduced DNN model 40 and checks whether the recognition accuracy of the reduced DNN model 40 satisfies the target recognition accuracy. For example, the recognition accuracy confirmation unit 170 causes the reduced DNN model 40 to read several dozen images in which objects are known in advance, and calculates the rate at which the reduced DNN model 40 can correctly recognize the object as the recognition accuracy. .
  • the recognition accuracy confirmation result of the reduced DNN model 40 by the recognition accuracy confirmation unit 170 is output to the parameter setting unit 132. Further, the recognition accuracy confirmation unit 170 determines that the calculation speed of the reduced DNN model 40 satisfies the target calculation speed by the FPS confirmation unit 160, and the recognition accuracy confirmation unit 170 determines that the calculation speed of the reduced DNN model 40 satisfies the target calculation speed. If it is determined that the recognition accuracy meets the target recognition accuracy, the reduced DNN model 40 is output to the external world recognition unit 310 of the automatic driving ECU 300.
  • the DNN reduction device 100B checks not only the calculation speed of the reduced DNN model 40 but also the recognition accuracy to determine whether the reduced DNN model 40 with high calculation speed and high recognition accuracy has been obtained. This allows you to check.
  • the calculation speed and recognition accuracy of the reduced DNN model 40 may vary depending on the device on which it is executed. Therefore, the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 confirm the calculation speed and recognition accuracy according to the type of CPU of the automatic driving ECU 300 on which the reduced DNN model 40 is executed. Therefore, the DNN reduction device 100B can generate a reduced DNN model 40 that can achieve optimal calculation speed and recognition accuracy for each CPU of the automatic driving ECU 300.
  • processing is performed in the order of the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170, but the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 may be processed in parallel.
  • parallel processing either the FPS confirmation unit 160 or the recognition accuracy confirmation unit 170 is configured to make the determination in step S22 shown in FIG. be done.
  • FIG. 10 is a flowchart illustrating an example of processing by the DNN reduction device 100B according to the third embodiment. Note that in FIG. 10, the same numbers are given to the parts that perform the same processing as in FIG. 8, and unless otherwise specified, the description will be omitted as they have the same or similar functions.
  • step S4 The processing from steps S1, S11 to S13, and S2 to S4 is the same as the processing performed by the DNN reduction device 100A according to the second embodiment.
  • the FPS confirmation unit 160 uses the reduced DNN model 40 that has been retrained by the DNN relearning unit 150.
  • the FPS confirmation unit 160 compares the measured calculation speed with a preset target calculation speed, and determines whether the measured calculation speed has achieved the target calculation speed (target FPS). do.
  • the recognition accuracy confirmation unit 170 also compares the measured recognition accuracy with a preset target recognition accuracy, and determines whether the measured recognition accuracy has achieved the target recognition accuracy (S22). .
  • the FPS confirmation unit 160 feeds back the calculation speed comparison result to the parameter setting unit 132.
  • the calculation speed comparison results include, for example, a value of 70% of the target calculation speed.
  • the recognition accuracy confirmation unit 170 feeds back the recognition accuracy comparison result to the parameter setting unit 132.
  • the recognition accuracy comparison results include a value of 80% of the target recognition accuracy.
  • the recognition accuracy of the reduced DNN model 40 is sufficient, so it is possible to re-reduce the trained DNN model 10 and re-learn the reduced DNN model 40. No longer needed.
  • step S22 at least one of the calculation speed measured by the FPS confirmation unit 160 has not achieved the target calculation speed, and the recognition accuracy measured by the recognition accuracy confirmation unit 170 has not achieved the target recognition accuracy. If it is a result (NO in S22), the comparison result is fed back to the parameter setting unit 132.
  • the parameter setting unit 132 modifies the contribution degree parameters of the degree of importance and the number of calculations based on the comparison results fed back from the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 (S23).
  • step S23 if the calculation speed has not achieved the target calculation speed, the parameter setting unit 132 sets the importance contribution parameter to increase and the calculation number contribution parameter to decrease. Furthermore, when the recognition accuracy has not achieved the target recognition accuracy, the parameter setting unit 132 sets the contribution degree parameter of the importance level to decrease and the contribution degree parameter of the number of calculations to increase. In addition, if the calculation speed has not achieved the target calculation speed and the recognition accuracy has not achieved the target recognition accuracy, the parameter setting unit 132 increases the contribution degree parameter of the degree of importance and the contribution of the number of calculations. Set the degree parameter to increase.
  • the parameter setting unit 132 increases the contribution parameter of the degree of importance from 0.5 to 0.6, and increases the contribution parameter of the number of calculations from 0.5 to 0.4. Modify the parameters to reduce them. Note that there is no restriction that the contribution of the degree of importance and the contribution of the number of operations can be added to 1.0.
  • step S23 if the measured calculation speed has achieved the target calculation speed and the measured recognition accuracy has achieved the target recognition accuracy (YES in S23), the DNN relearning unit 150 The rear DNN model 40 is output to the automatic driving ECU 300 of the vehicle 500 (S5). After the process of step S5, the process of the DNN reduction device 100B ends.
  • FIG. 11 is a block diagram showing a configuration example of an automatic driving system 1B including a DNN condensation device 100C according to the fourth embodiment.
  • blocks that perform the same processing as those in FIG. 9 are given the same names and numbers, and unless otherwise specified, descriptions will be omitted as they have the same or similar functions.
  • An automatic driving system 1C includes a DNN reduction device 100C, an automatic driving ECU 300 of a vehicle 500, and a server 550.
  • the external world recognition unit 310 can recognize this object.
  • the weather is clear, the image taken by the camera 200 shows a distant object in front of the vehicle 500, and the external world recognition unit 310 can recognize this object.
  • the weather is rainy, it is difficult to distinguish an object from the background even if it is a short distance from the front of the vehicle 500 in the image taken by the camera 200, and the external world recognition unit 310 may not be able to recognize this object.
  • the driving situation observation unit observes the driving situation of the vehicle in which the reduced multilayer neural network model (reduced DNN model 40) is used, and collects multiple multilayer neural network models (trained DNN model 40).
  • the observation results of the driving situation are output to the server (server 550) that stores the model 10).
  • This driving situation observation section 190 is connected to the server 550, and the external world recognition section 310 and action planning section 330 of the automatic driving ECU 300.
  • Driving situation observation section 190 receives the action plan of vehicle 500 from action planning section 330 of automatic driving ECU 300.
  • the driving situation observation unit 190 then observes the driving situation of the vehicle 500 based on the received action plan. Further, the driving condition observation unit 190 transmits the driving condition observation results representing the observed driving condition of the vehicle 500 to the server 550.
  • the driving situation observation unit 190 outputs it to the external world recognition unit 310.
  • the driving situation observation unit 190 outputs the reduced DNN model 40 that reflects the driving situation of the vehicle 500 to the external world recognition unit 310. You can also do it.
  • the server 550 is, for example, a cloud server, and is capable of transmitting and receiving various data through wireless or wired communication with the DNN reduction device 100C.
  • the server 550 stores a plurality of DNN models in a storage device (not shown).
  • the DNN model stored by server 550 is prepared in advance according to typical driving conditions of vehicle 500.
  • the server 550 selects a DNN model to be transmitted to the model receiving unit 180 based on the received driving situation observation results. Thereafter, server 550 transmits the selected model to model receiving section 180.
  • the DNN model selected by the server 550 and transmitted to the model receiving unit 180 is one learned in advance by a learning device (not shown). Then, server 550 selects a DNN model learned for each driving situation of vehicle 500 based on the driving situation observation results received from driving situation observation section 190. For example, the range of the outside world that the outside world recognition unit 310 should recognize may be different when the vehicle 500 is running and when the vehicle 500 is stopped. Therefore, if the vehicle 500 is stopped, the server 550 selects the DNN model for the stopped state, and if the vehicle 500 is running, selects the DNN model for the running state, and transmits the selected DNN model to the model receiving unit. 180.
  • the model receiving unit receives a multilayer neural network model (trained DNN model 10) suitable for the driving situation, which is selected from the server (server 550) based on the observation results of the driving situation.
  • the model receiving unit is a multilayer neural network model in which the importance calculation unit (importance calculation unit 110) reads the multilayer neural network model (trained DNN model 10) received from the server (server 550). (trained DNN model 10). Therefore, the reduced DNN model 40 is created using the learned DNN model 10 that corresponds to the driving situation of the vehicle 500.
  • a DNN model corresponding to the driving situation of the vehicle 500 is selected by the server 550, and is imported into the DNN reduction device 100C as the learned DNN model 10. Then, the DNN reduction device 100C performs predetermined processing on the learned DNN model 10 that has been imported, creates a reduced DNN model 40, and outputs the reduced DNN model 40 to the automatic driving ECU 300. Therefore, the automatic driving ECU 300 can accurately control the vehicle 500 using the reduced DNN model 40 created according to the driving situation of the vehicle 500.
  • the reduced DNN model 40 generated by the DNN model selected according to the driving situation of the vehicle 500 is used by the automatic driving ECU 300.
  • the reduced DNN model 40 used while the vehicle 500 is running has a large number of calculations
  • the reduced DNN model 40 used while the vehicle 500 is stopped has a small number of calculations. Power consumption can also be reduced.
  • the driving situation observation unit 190 may receive the GPS (Global Positioning System) information received by the vehicle 500 together with the action plan from the action planning unit 330 of the automatic driving ECU 300 to determine the current position of the vehicle 500. If the current position of the vehicle 500 is known, the driving condition observation unit 190 can receive weather information tailored to this current position, and therefore may transmit the weather information to the server 550 together with the driving condition observation results. In this case, the server 550 can select a DNN model according to the weather information.
  • GPS Global Positioning System
  • the model receiving unit 180 holds a plurality of DNN models in advance, and the model receiving unit 180 receives the driving situation observation results from the driving situation observation unit 190. It may also be configured to receive the information. In such a configuration, the model receiving unit 180 may select a DNN model to be used as the trained DNN model 10 in the DNN reduction device 100C based on the driving situation observation results.
  • the driving condition observation unit 190 observes the driving condition of the vehicle 500 (running or stopped) and the surrounding conditions of the vehicle 500 (presence of traffic jams, weather, etc.). Therefore, if the model reception unit 180 is configured to select the DNN model, the driving situation observation unit 190 can directly feed back the driving situation to the model reception unit 180 without going through the server 550. Good too.
  • the driving situation observation unit 190 can also observe the actual driving situation of the vehicle 500 based on information obtained from the actuator 400, sensors, automatic driving ECU 300, and the like.
  • the driving condition observation unit 190 observes the driving condition of the vehicle 500, when the vehicle 500 breaks down, the information detected by each sensor of the vehicle 500 is sent to the automatic driving ECU 300 as the driving condition observation result. You may receive it.
  • a DNN model matching the failure mode of vehicle 500 is selected, and DNN reduction device 100C generates reduced DNN model 40 from the selected DNN model. Therefore, the automatic driving ECU 300 can perform automatic driving processing using the reduced DNN model 40 generated according to the failure mode.
  • the server 500 determines the quality of the DNN model selected before the vehicle 500 breaks down after the fact, and determines by itself or asks the user to determine under what driving conditions the DNN model could have been appropriately selected. You can entrust it to others. Then, the server 500 can select a DNN model in which failure of the vehicle 500 is unlikely to occur, and transmit the DNN model to the model receiving unit 180.
  • the DNN reduction device has been described as an example of an arithmetic device that reduces a DNN.
  • the arithmetic device according to the present invention may be applied to a device that reduces a multilayer neural network other than a DNN.

Abstract

This computation device comprises: an importance-degree calculation unit that uses a weighting coefficient set for a channel of a multilayer neural network model which has channels made up of a plurality of neurons per each of an input layer, an intermediate layer, and an output layer to calculate a degree of importance of the channel; a target contraction rate setting unit that sets a target contraction rate in the entirety of the multilayer neural network model; a per-layer contraction rate calculation unit that calculates a contraction rate of each layer of the multilayer neural network model on the basis of the degree of importance and the target contraction rate; a contraction unit that contracts each layer to match the contraction rates calculated by the per-layer contraction rate calculation unit, and generates a post-contraction multilayer neural network model; and a retraining unit that retrains the post-contraction multilayer neural network model.

Description

演算装置及び演算方法Arithmetic device and method
 本発明は、演算装置及び演算方法に関する。 The present invention relates to an arithmetic device and an arithmetic method.
 近年、機械学習を用いた物体認識や行動予測を車両の自動運転に適用する技術が進展している。また、物体認識等に適用される機械学習手法としてディープ・ニューラル・ネットワーク(Deep Neural Network 以下、「DNN」と略称する)を用いたDNNモデルが知られている。DNNモデルは多くの層で構成されるため、多層ニューラルネットワークの一例として用いられる。 In recent years, there has been progress in technology that uses machine learning to apply object recognition and behavior prediction to autonomous vehicle driving. Furthermore, a DNN model using a deep neural network (hereinafter abbreviated as "DNN") is known as a machine learning method applied to object recognition and the like. Since the DNN model is composed of many layers, it is used as an example of a multilayer neural network.
 自動運転システムでは、DNNモデルを用いて車両周辺の物体を認識したり(「周辺認識」と呼ぶ)、自動操舵、自動速度制御を行ったりすることで、目的地まで車両を制御する。そこで、DNNモデルは、画像から物体の特徴を習得する学習処理と、学習処理による学習結果を基に、画像から物体を抽出する推論処理とに用いられる。 Automated driving systems use DNN models to recognize objects around the vehicle (referred to as "surrounding recognition"), perform automatic steering, and perform automatic speed control to control the vehicle to its destination. Therefore, the DNN model is used in a learning process for learning the features of an object from an image, and an inference process for extracting an object from an image based on the learning results of the learning process.
 一般的にDNNモデルを使った自動運転システムが車両の自動運転を制御する際には、まずカメラから外界の画像を取得し、DNNモデルで使用可能なフォーマットに画像が変換される。推論処理においては、フォーマットが変換された画像を入力画像として用い、予め学習処理が行われたDNNモデルを使って、入力画像から物体を抽出する。その後、自動運転システムは、物体の抽出結果から車両の外界を表す周辺地図を作成し、周辺地図を基に車両の行動計画を立て、行動計画に基づいて車両を制御する。 Generally, when an automatic driving system using a DNN model controls automatic driving of a vehicle, it first acquires an image of the outside world from a camera, and converts the image into a format that can be used by the DNN model. In the inference process, an image whose format has been converted is used as an input image, and an object is extracted from the input image using a DNN model that has undergone learning processing in advance. Thereafter, the automatic driving system creates a surrounding map representing the outside world of the vehicle from the object extraction results, creates a behavior plan for the vehicle based on the surrounding map, and controls the vehicle based on the action plan.
 周辺地図として、例えば、車両前方が撮影された画像に基づいて、この画像に映る物体が車両である、又は人である等の物体の種類が分かるようにした地図が想定される。ただし、周辺地図の作成には、車両前方に限らず、車両後方が撮影された画像、車両側方が撮影された画像が用いられてもよい。また、周辺地図の作成に際して、カメラで周囲を撮影した画像と、LiDAR(Light Detection and Ranging)、Radar等のセンサ類から取得した情報とが組み合わせて用いられてもよい。 The surrounding map may be, for example, a map in which the type of object shown in the image, such as a vehicle or a person, can be determined based on an image taken in front of the vehicle. However, to create the surrounding map, images not only taken of the front of the vehicle but also images taken of the rear of the vehicle and images taken of the sides of the vehicle may be used. Furthermore, when creating a surrounding map, an image taken of the surrounding area by a camera and information obtained from sensors such as LiDAR (Light Detection and Ranging) and Radar may be used in combination.
 特許文献1及び2には、ニューラルネットワークを用いた各種のモデルについて説明されている。
 特許文献1には、「入力値が与えられたときに出力値を決定するための第1の結合情報群と、入力値として与えられた所定のデータに対する影響度が所定値を上回る複数の結合情報である第2の結合情報群とに基づき、間引き部が第1の結合情報群から少なくとも1つの結合情報を削除することで作成される第3の結合情報群を含むニューラルネットワーク」について記載されている。
Patent Documents 1 and 2 describe various models using neural networks.
Patent Document 1 describes, "a first combination information group for determining an output value when an input value is given, and a plurality of combinations whose degree of influence on predetermined data given as an input value exceeds a predetermined value. a neural network including a third group of connected information created by a thinning unit deleting at least one piece of connected information from a first group of connected information based on a second group of connected information that is information. ing.
 特許文献2では、「チャネル/フィルタ毎の削除した際の影響度が考慮されたコスト関数による学習を行ってスケーリング係数を求め、少なくともスケーリング係数に基づいてチャネル/フィルタを削除した際の影響度を考慮して削除対象を決定することにより、効率的にモデル圧縮を行う」と記載されている。 In Patent Document 2, ``learning is performed using a cost function that takes into consideration the degree of influence when deleting each channel/filter, and a scaling coefficient is obtained, and at least the degree of influence when deleting a channel/filter is calculated based on the scaling coefficient. By taking this into account and deciding what to delete, we can efficiently compress the model."
特開2020-42496号公報JP2020-42496A 特開2021-108039号公報JP 2021-108039 Publication
 自動運転システムで用いられるDNNモデルは、乗算と加算で構成される畳み込み演算が繰り返し実行されるため、演算数が非常に多い。特に自動運転では、自動運転システムが非常に短い時間内で行動計画を更新し続ける必要があることから、DNNモデルによる物体認識には高速な演算が求められる。そのため、車載可能な自動運転ECU(Electronic Control Unit:電子制御装置)にDNNモデルを実装する際には、演算数の削減が必要である。そこで、縮約を用いてDNNモデルを簡素化することで演算数を削減することが可能となる。DNNモデルを縮約する方法には、各種の方法があるが、本明細書では、縮約の1つである重み係数やニューロンを間引く処理(プルーニング)を用いるものとして説明する。 The DNN model used in automatic driving systems has a very large number of operations because convolution operations consisting of multiplication and addition are repeatedly executed. Particularly in automatic driving, since the automatic driving system needs to continually update its action plan within a very short period of time, object recognition using a DNN model requires high-speed calculations. Therefore, when implementing a DNN model in an in-vehicle autonomous driving ECU (Electronic Control Unit), it is necessary to reduce the number of calculations. Therefore, by simplifying the DNN model using reduction, it is possible to reduce the number of operations. There are various methods for reducing the DNN model, but in this specification, one of the reduction methods will be described as one that uses weighting coefficients and processing to thin out neurons (pruning).
 従来は、DNNモデルを縮約する際に、全層に一律の縮約率を決定して縮約していた。しかし、DNNモデルの全層の縮約が行われると、物体の認識精度の向上に寄与する層についても縮約が行われることとなり、認識精度が大きく低下していた。 Conventionally, when reducing a DNN model, a uniform reduction rate was determined for all layers. However, when all layers of the DNN model are reduced, layers that contribute to improving object recognition accuracy are also reduced, resulting in a significant decrease in recognition accuracy.
 このため、DNNモデルの各層の縮約率を決定する方法が検討されていた。この方法では、始めに全層のニューロンを、精度劣化が起きにくいと予想される範囲で一律に削除した後、ある一層のニューロンだけを大きく削除したDNNモデルに学習を行わせ、認識精度の劣化を求める。そして、ニューロンを大きく削除する層を順番に変え、認識精度の劣化を比較した後、認識精度の劣化を抑えることができる層だけを削除していた。しかし、この処理では、何度も学習が必要であるので、縮約後のDNNモデルを得るまでに必要な工数がかなり多くなっていた。 For this reason, methods for determining the reduction rate of each layer of the DNN model have been studied. In this method, neurons in all layers are first uniformly deleted to the extent that it is expected that accuracy deterioration is unlikely to occur, and then a DNN model in which only neurons in a certain layer are significantly deleted is trained, resulting in deterioration in recognition accuracy. seek. Then, after sequentially changing the layers in which neurons were deleted significantly and comparing the deterioration in recognition accuracy, only the layers that could suppress the deterioration in recognition accuracy were deleted. However, since this process requires learning many times, the number of man-hours required to obtain the reduced DNN model is quite large.
 特許文献1に示した技術を用いてDNNモデルを縮約すると、認識精度の劣化が大きくなっていた。また、特許文献2に記載される技術では、様々なパターンで設定された縮約率に基づいて縮約されたDNNモデルを用いて再学習を繰り返すことから、DNNモデルを縮約する工数が非常に多くなっていた。 When the DNN model was reduced using the technology shown in Patent Document 1, the recognition accuracy deteriorated significantly. Furthermore, in the technology described in Patent Document 2, relearning is repeated using a DNN model reduced based on reduction rates set in various patterns, so the man-hours required to reduce the DNN model are extremely large. The number of cases was increasing.
 本発明はこのような状況に鑑みて成されたものであり、多層ニューラルネットワークの縮約の工数を削減可能とすることを目的とする。 The present invention has been made in view of this situation, and it is an object of the present invention to make it possible to reduce the number of man-hours required for reduction of a multilayer neural network.
 本発明に係る演算装置は、複数のニューロンで構成されるチャンネルを入力層、中間層及び出力層ごとに有する多層ニューラルネットワークモデルのチャンネルに設定される重み係数を用いて、チャンネルの重要度を算出する重要度算出部と、多層ニューラルネットワークモデルの全体での目標縮約率を設定する目標縮約率設定部と、重要度及び目標縮約率とに基づいて、多層ニューラルネットワークモデルの各層の縮約率を算出する各層縮約率算出部と、各層縮約率算出部で算出された縮約率に合わせて各層を縮約して、縮約後の多層ニューラルネットワークモデルを生成する縮約部と、縮約後の多層ニューラルネットワークモデルの再学習を行う再学習部と、を備える。 The arithmetic device according to the present invention calculates the importance of a channel using a weighting coefficient set for a channel of a multilayer neural network model that has channels each composed of a plurality of neurons in an input layer, a middle layer, and an output layer. an importance calculation unit that sets a target reduction rate for the entire multilayer neural network model; a target reduction rate setting unit that sets a target reduction rate for the entire multilayer neural network model; and a reduction rate calculation unit that sets a target reduction rate for the entire multilayer neural network model. A reduction rate calculation unit for each layer that calculates the reduction rate, and a reduction unit that reduces each layer according to the reduction rate calculated by the reduction rate calculation unit for each layer and generates a multilayer neural network model after reduction. and a relearning unit that retrains the reduced multilayer neural network model.
 本発明によれば、多層ニューラルネットワークの縮約の工数を削減可能となる。 According to the present invention, it is possible to reduce the number of man-hours required for reduction of a multilayer neural network.
本発明の第1の実施形態に係る自動運転システムの全体構成例を示すブロック図である。1 is a block diagram showing an example of the overall configuration of an automatic driving system according to a first embodiment of the present invention. 本発明の第1の実施形態に係る計算機のハードウェア構成例を示すブロック図である。1 is a block diagram showing an example of a hardware configuration of a computer according to a first embodiment of the present invention. FIG. 本発明の第1の実施形態に係るDNN縮約装置の処理の例を示すフローチャートである。3 is a flowchart illustrating an example of processing of the DNN reduction device according to the first embodiment of the present invention. 本発明の第1の実施形態に係る学習済みDNNモデルを簡略化して示す図である。FIG. 2 is a simplified diagram showing a trained DNN model according to the first embodiment of the present invention. 本発明の第1の実施形態に係る畳み込みニューラルネットワークの基本形を示す図である。1 is a diagram showing a basic form of a convolutional neural network according to a first embodiment of the present invention. FIG. 本発明の第1の実施形態に係る縮約後DNNモデルの例を示す図である。FIG. 3 is a diagram illustrating an example of a reduced DNN model according to the first embodiment of the present invention. 本発明の第2の実施形態に係るDNN縮約装置を備える自動運転システムの構成例を示すブロック図である。It is a block diagram showing an example of composition of an automatic driving system provided with a DNN condensation device concerning a 2nd embodiment of the present invention. 本発明の第2の実施形態に係るDNN縮約装置の処理の例を示すフローチャートである。It is a flow chart which shows an example of processing of the DNN condensation device concerning a 2nd embodiment of the present invention. 本発明の第3の実施形態に係るDNN縮約装置を備える自動運転システムの構成例を示すブロック図である。It is a block diagram showing an example of composition of an automatic driving system provided with a DNN condensation device concerning a 3rd embodiment of the present invention. 本発明の第3の実施形態に係るDNN縮約装置の処理の例を示すフローチャートである。It is a flow chart which shows an example of processing of the DNN condensation device concerning a 3rd embodiment of the present invention. 本発明の第4の実施形態に係るDNN縮約装置を備える自動運転システムの構成例を示すブロック図である。It is a block diagram showing an example of composition of an automatic driving system provided with a DNN condensation device concerning a 4th embodiment of the present invention.
 以下、本発明を実施するための形態について、添付図面を参照して説明する。本明細書及び図面において、実質的に同一の機能又は構成を有する構成要素については、同一の符号を付することにより重複する説明を省略する。以下の実施形態では、本発明を車両制御、例えば、先進運転支援システム(ADAS:Advanced Driver Assistance System)や自動運転(AD:Autonomous Driving)向けの車載ECUが通信可能な演算装置に適用した例について説明する。 Hereinafter, embodiments for carrying out the present invention will be described with reference to the accompanying drawings. In this specification and the drawings, components having substantially the same functions or configurations are designated by the same reference numerals and redundant explanations will be omitted. In the following embodiments, an example will be described in which the present invention is applied to a computing device that can communicate with an in-vehicle ECU for vehicle control, for example, an advanced driver assistance system (ADAS) or an autonomous driving (AD). explain.
[第1の実施形態]
<自動運転システムの全体構成>
 始めに、本発明の第1の実施形態に係るDNN縮約装置100を用いた自動運転システム1の構成例について、図1を参照して説明する。
 図1は、第1の実施形態に係る自動運転システムの全体構成例を示すブロック図である。
[First embodiment]
<Overall configuration of automatic driving system>
First, a configuration example of an automatic driving system 1 using a DNN condensation device 100 according to a first embodiment of the present invention will be described with reference to FIG. 1.
FIG. 1 is a block diagram showing an example of the overall configuration of an automatic driving system according to a first embodiment.
 自動運転システム1は、DNN縮約装置100と、車両500に搭載される自動運転ECU300とで構成され、車両500周辺認識や自動操舵を制御し、自動速度制御によって目的地まで車両500の自動運転を制御する。車両500には、カメラ200、アクチュエータ400も搭載される。自動運転ECU300は、DNN縮約装置100が、学習済みDNNモデル10から縮約した縮約後DNNモデル40を用いて、車両500の自動運転を制御する。 The automatic driving system 1 is composed of a DNN reduction device 100 and an automatic driving ECU 300 installed in the vehicle 500, and controls the recognition of the surroundings of the vehicle 500 and automatic steering, and automatically drives the vehicle 500 to the destination by automatic speed control. control. The vehicle 500 is also equipped with a camera 200 and an actuator 400. Automatic driving ECU 300 controls automatic driving of vehicle 500 using contracted DNN model 40 contracted from trained DNN model 10 by DNN reduction device 100 .
 カメラ200は、可視光線、赤外線により車両500の外界を撮影可能な単眼カメラ又はステレオカメラの一例である。カメラ200は、外界を撮影した画像を外界情報として自動運転ECU300に出力する。 The camera 200 is an example of a monocular camera or a stereo camera that can photograph the outside world of the vehicle 500 using visible light and infrared rays. Camera 200 outputs an image of the outside world to automatic driving ECU 300 as outside world information.
 アクチュエータ400は、自動運転ECU300の制御により駆動する装置であり、アクセル、ブレーキ、ステアリング等の各部の動作を行う。 The actuator 400 is a device that is driven under the control of the automatic driving ECU 300, and operates various parts such as an accelerator, a brake, and a steering wheel.
 始めに、自動運転ECU300の内部構成例及び動作例について説明する。
 自動運転ECU300は、外界認識部310、リスク予測部320、行動計画部330を備える。図1に示す自動運転ECU300の各機能部は、車両500の自動運転に必要な主要部であり、自動運転に必要な他の機能部については説明及び図示を省略する。
First, an example of the internal configuration and operation of the automatic driving ECU 300 will be described.
The automatic driving ECU 300 includes an external world recognition section 310, a risk prediction section 320, and an action planning section 330. Each functional part of automatic driving ECU 300 shown in FIG. 1 is a main part necessary for automatic driving of vehicle 500, and description and illustration of other functional parts necessary for automatic driving will be omitted.
 外界認識部310は、カメラ200から取得した外界情報に基づいて外界の物体を認識する。外界認識部310が認識した物体は、物体認識結果としてリスク予測部320に出力される。外界認識部310は、外界の認識処理に際して、後述するDNN再学習部150から出力される縮約後DNNモデル40を用いる。 The external world recognition unit 310 recognizes objects in the external world based on external world information acquired from the camera 200. The object recognized by the external world recognition unit 310 is output to the risk prediction unit 320 as an object recognition result. The external world recognition unit 310 uses a reduced DNN model 40 output from the DNN relearning unit 150, which will be described later, when performing external world recognition processing.
 リスク予測部320は、外界認識部310から入力される物体認識結果を用いて、現在の外界の状況から考えられるリスクを予測する。リスク予測部320が予測したリスクはリスク予測結果として行動計画部330に出力される。 The risk prediction unit 320 uses the object recognition results input from the external world recognition unit 310 to predict possible risks based on the current external world situation. The risk predicted by the risk prediction unit 320 is output to the action planning unit 330 as a risk prediction result.
 行動計画部330は、リスク予測部320から入力されるリスク予測結果に基づいて、車両500の進行方向や進行速度等を含む行動計画を生成する。行動計画部330が生成した行動計画は、アクチュエータ400に出力される。アクチュエータ400は、行動計画に従って車両500の各部位を駆動することで車両500の自動運転が実現される。 The action planning unit 330 generates an action plan including the traveling direction and traveling speed of the vehicle 500 based on the risk prediction results input from the risk predicting unit 320. The action plan generated by the action planning unit 330 is output to the actuator 400. The actuator 400 realizes automatic driving of the vehicle 500 by driving each part of the vehicle 500 according to the action plan.
 次に、DNN縮約装置100の内部構成例について説明する。
 DNN縮約装置100は、車両500とは離れた場所に設置されるクラウドサーバに設けられることを想定する。自動運転ECU300は、自動運転ECU300が起動する度に、DNN縮約装置100から縮約後DNNモデル40をダウンロードする形態としている。クラウドサーバにDNN縮約装置100を設けることで、学習済みDNNモデル10の縮約処理等の負荷をクラウドサーバに担わせることができる。
Next, an example of the internal configuration of the DNN reduction device 100 will be described.
It is assumed that the DNN reduction device 100 is installed in a cloud server installed at a location away from the vehicle 500. The automatic driving ECU 300 is configured to download the reduced DNN model 40 from the DNN reduction device 100 every time the automatic driving ECU 300 is started. By providing the DNN reduction device 100 in the cloud server, the load of reduction processing of the learned DNN model 10, etc. can be shouldered by the cloud server.
 DNN縮約装置100は、学習済みDNNモデル10の縮約処理を行う装置である。学習済みDNNモデル10の縮約処理には、多量の演算処理が必要とされる。このDNN縮約装置100は、重要度算出部110、目標縮約率設定部120、縮約条件設定部130、DNN縮約部140、DNN再学習部150を備える。以下の図中で、実線で囲む矩形は各種の処理の主体を表し、一点鎖線で囲む矩形は各種のデータ又は情報を表す。 The DNN reduction device 100 is a device that performs reduction processing on the trained DNN model 10. Reduction processing of the learned DNN model 10 requires a large amount of calculation processing. This DNN reduction device 100 includes an importance calculation section 110, a target reduction rate setting section 120, a reduction condition setting section 130, a DNN reduction section 140, and a DNN relearning section 150. In the diagrams below, rectangles surrounded by solid lines represent subjects of various types of processing, and rectangles surrounded by dashed-dotted lines represent various types of data or information.
 重要度算出部110と目標縮約率設定部120は、各層縮約率算出部131に接続される。
 重要度算出部(重要度算出部110)は、複数のニューロンで構成されるチャンネルを入力層、中間層及び出力層ごとに有する多層ニューラルネットワークモデル(学習済みDNNモデル10)のチャンネルに設定される各chの重み係数20を用いて、チャンネルの重要度を算出する。この多層ニューラルネットワークモデルは、ディープ・ニューラル・ネットワークモデルであり、学習済みDNNモデル10として用いられる。このため、重要度算出部110は、学習済みDNNモデル10から各チャンネル(以下、「ch」と略称する)の重み係数20を取り出す。そして、重要度算出部110は、各chの重み係数20を用いて、各chの重要度を算出する。重要度は、学習済みDNNモデル10の各chによる認識精度への影響を表す指標である。重要度算出部110により算出された各chの重要度は、各層縮約率算出部131に出力される。
The importance calculation unit 110 and the target reduction rate setting unit 120 are connected to each layer reduction rate calculation unit 131.
The importance calculation unit (importance calculation unit 110) is set to a channel of a multilayer neural network model (trained DNN model 10), which has a channel composed of a plurality of neurons for each input layer, intermediate layer, and output layer. The importance of the channel is calculated using the weighting coefficient 20 for each channel. This multilayer neural network model is a deep neural network model and is used as the trained DNN model 10. Therefore, the importance calculation unit 110 extracts the weighting coefficient 20 of each channel (hereinafter abbreviated as “ch”) from the learned DNN model 10. Then, the importance calculation unit 110 calculates the importance of each channel using the weighting coefficient 20 of each channel. The degree of importance is an index representing the influence of each channel of the trained DNN model 10 on recognition accuracy. The importance of each channel calculated by the importance calculation unit 110 is output to each layer reduction rate calculation unit 131.
 ここで、学習済みDNNモデル10におけるchについて、図4と図5を参照して説明する。
 図4は、学習済みDNNモデル10の模式図である。
 学習済みDNNモデル10は、多層ニューラルネットワークの一例であり、入力層、複数の中間層、出力層で構成される。学習済みDNNモデル10の各層は、複数のニューロンを含むニューラルネットワークで構成される。中間層のある層のニューロンには、前層の複数のニューロンと、後層の複数のニューロンとが接続される。
Here, channels in the trained DNN model 10 will be explained with reference to FIGS. 4 and 5.
FIG. 4 is a schematic diagram of the trained DNN model 10.
The trained DNN model 10 is an example of a multilayer neural network, and is composed of an input layer, a plurality of intermediate layers, and an output layer. Each layer of the trained DNN model 10 is composed of a neural network including a plurality of neurons. A neuron in a certain layer of the intermediate layer is connected to a plurality of neurons in the front layer and a plurality of neurons in the rear layer.
 図5は、畳み込みニューラルネットワークの基本形を示す図である。
 入力された画像データ(数字の「7」が記載されている)は、所定の大きさに分割されて、入力層に取り込まれる。ある層のニューロンの値は、前層の複数のニューロンの値をフィルタにより畳み込まれ、フィルタごとに複数の畳み込み層に取り込まれる。そして、各畳み込み層に対してプーリング処理が行われ、プーリング層が生成される。ここで、プーリング層の一セルをニューロンと呼び、プーリング層における1枚ずつのニューロンのセットをチャンネル(ch)と呼ぶ。プーリング層の出力は全結合層にまとめられる。そして、全結合層に接続される出力層にて、「0」~「9」までの判定確率が出力される。出力層の上から8番目の黒丸は、判定された数字が「7」である確率が最も高いことを表す。なお、図4に示す学習済みDNNモデル10では、中間層の各層に、畳み込み層とプーリング層の組が複数存在している。
FIG. 5 is a diagram showing the basic form of a convolutional neural network.
The input image data (indicated by the number "7") is divided into predetermined sizes and taken into the input layer. The value of a neuron in a certain layer is convolved with the values of a plurality of neurons in a previous layer by a filter, and is taken into a plurality of convolution layers for each filter. Then, pooling processing is performed on each convolutional layer to generate a pooling layer. Here, one cell in the pooling layer is called a neuron, and a set of each neuron in the pooling layer is called a channel (ch). The outputs of the pooling layer are combined into a fully connected layer. Then, the output layer connected to the fully connected layer outputs determination probabilities from "0" to "9". The eighth black circle from the top of the output layer indicates that the determined number has the highest probability of being "7". Note that in the trained DNN model 10 shown in FIG. 4, each intermediate layer includes a plurality of sets of convolution layers and pooling layers.
 図1に戻って説明を続ける。目標縮約率設定部(目標縮約率設定部120)は、多層ニューラルネットワークモデル(学習済みDNNモデル10)の全体での目標縮約率を設定する。例えば、目標縮約率設定部120は、学習済みDNNモデル10の各層ごとではなく、学習済みDNNモデル10の全体で何%のchを削減するかを設定する。そこで、目標縮約率設定部120は、ユーザーにより事前に入力された目標縮約率30に基づいて目標縮約率を設定する。目標縮約率設定部120により設定された目標縮約率は、各層縮約率算出部131に出力される。 Returning to FIG. 1, the explanation will continue. A target reduction rate setting unit (target reduction rate setting unit 120) sets a target reduction rate for the entire multilayer neural network model (trained DNN model 10). For example, the target reduction rate setting unit 120 sets what percentage of channels to reduce in the entire trained DNN model 10, not for each layer of the trained DNN model 10. Therefore, the target reduction rate setting unit 120 sets a target reduction rate based on the target reduction rate 30 inputted in advance by the user. The target reduction rate set by the target reduction rate setting unit 120 is output to each layer reduction rate calculation unit 131.
 縮約条件設定部130は、重み係数20や演算数等の条件からDNNを縮約する条件を設定する。この縮約条件設定部130は、各層縮約率算出部131を備える。 The reduction condition setting unit 130 sets conditions for reducing the DNN from conditions such as the weighting coefficient 20 and the number of operations. The reduction condition setting unit 130 includes a reduction rate calculation unit 131 for each layer.
 各層縮約率算出部(各層縮約率算出部131)は、重要度と、目標縮約率とに基づいて、多層ニューラルネットワークモデル(学習済みDNNモデル10)の各層の縮約率を算出する。この各層縮約率算出部131は、DNN縮約部140に接続される。各層縮約率算出部131は、重要度算出部110により算出された重要度と、目標縮約率設定部120により設定された学習済みDNNモデル10全体の縮約率とに基づいて、学習済みDNNモデル10が目標縮約率となるように各層の縮約率を算出する。例えば、各層縮約率算出部131は、各chの重要度と、設定された目標縮約率とを入力として、各層の縮約率を算出する。各層縮約率算出部131により算出された各層の縮約率は、DNN縮約部140に出力される。 Each layer reduction rate calculation unit (each layer reduction rate calculation unit 131) calculates the reduction rate of each layer of the multilayer neural network model (trained DNN model 10) based on the importance level and the target reduction rate. . This layer reduction rate calculation section 131 is connected to the DNN reduction section 140. Each layer reduction rate calculation unit 131 calculates the learned DNN model based on the importance calculated by the importance calculation unit 110 and the reduction rate of the entire trained DNN model 10 set by the target reduction rate setting unit 120 The reduction rate of each layer is calculated so that the DNN model 10 reaches the target reduction rate. For example, each layer reduction rate calculation unit 131 calculates the reduction rate of each layer by inputting the importance of each channel and the set target reduction rate. The reduction rate of each layer calculated by the layer reduction rate calculation unit 131 is output to the DNN reduction unit 140.
 縮約部(DNN縮約部140)は、各層縮約率算出部(各層縮約率算出部131)で算出された縮約率に合わせて各層を縮約して、縮約後の多層ニューラルネットワークモデル(縮約後DNNモデル40)を生成する。このDNN縮約部140は、DNN再学習部150に接続される。DNN縮約部140には、学習済みDNNモデル10と、各層縮約率算出部131により算出された各層の縮約率とが入力される。そして、DNN縮約部140は、各層縮約率算出部131で設定された各層の縮約率に従って学習済みDNNモデル10を縮約する。例えば、学習済みDNNモデル10のある層の縮約率として10%が設定された場合、この層のchを10%削除する縮約が行われる。DNN縮約部140により縮約された学習済みDNNモデル10が縮約後DNNモデル40として、DNN再学習部150に出力される。 The reduction unit (DNN reduction unit 140) reduces each layer according to the reduction rate calculated by the layer reduction rate calculation unit (each layer reduction rate calculation unit 131), and generates a multilayer neural network after reduction. A network model (reduced DNN model 40) is generated. This DNN reduction unit 140 is connected to a DNN relearning unit 150. The trained DNN model 10 and the reduction rate of each layer calculated by the layer reduction rate calculation unit 131 are input to the DNN reduction unit 140 . Then, the DNN reduction unit 140 reduces the learned DNN model 10 according to the reduction rate of each layer set by the layer reduction rate calculation unit 131. For example, if 10% is set as the reduction rate for a certain layer of the trained DNN model 10, reduction is performed to delete 10% of the channels in this layer. The learned DNN model 10 reduced by the DNN reduction unit 140 is output to the DNN relearning unit 150 as the reduced DNN model 40.
 再学習部(DNN再学習部150)は、縮約後の多層ニューラルネットワークモデル(縮約後DNNモデル40)の再学習を行う。このDNN再学習部150は、自動運転ECU300の外界認識部310に接続される。DNN再学習部150には、DNN縮約部140から縮約後DNNモデル40が入力される。ここで、DNN再学習部150に入力される縮約後DNNモデル40は不図示とする。そして、DNN再学習部150は、入力された縮約後DNNモデル40の再学習を行う。例えば、DNN再学習部150は、不図示の学習データを読み込んで、縮約後DNNモデル40の再学習を行い、不図示の評価データを読み込んで、縮約後DNNモデル40を評価する。そして、DNN再学習部150は、縮約後DNNモデル40の物体の認識精度が目的の認識精度以上であることを確認できれば、自動運転ECU300の外界認識部310に縮約後DNNモデル40を出力する。このようにDNN再学習部150が縮約後DNNモデル40の再学習を行う処理は、最小1回で済む。 The relearning unit (DNN relearning unit 150) performs relearning of the reduced multilayer neural network model (reduced DNN model 40). This DNN relearning section 150 is connected to the external world recognition section 310 of the automatic driving ECU 300. The reduced DNN model 40 is input to the DNN relearning unit 150 from the DNN reduction unit 140 . Here, the reduced DNN model 40 input to the DNN relearning unit 150 is not shown. The DNN relearning unit 150 then relearns the input reduced DNN model 40. For example, the DNN relearning unit 150 reads learning data (not shown), retrains the reduced DNN model 40, reads evaluation data (not shown), and evaluates the reduced DNN model 40. Then, if the DNN relearning unit 150 confirms that the object recognition accuracy of the reduced DNN model 40 is higher than the target recognition accuracy, the DNN relearning unit 150 outputs the reduced DNN model 40 to the external world recognition unit 310 of the automatic driving ECU 300. do. In this way, the DNN relearning unit 150 retrains the reduced DNN model 40 at least once.
 なお、DNN縮約装置100は、車両500に車載される形態としてもよい。この場合、車両500が無線ネットワークに接続できない環境(トンネル、地下道路等)にあっても、DNN縮約装置100により生成され、再学習された縮約後DNNモデル40が直ちに外界認識部310に入力される。このため、車両500が無線ネットワークに接続できない環境であっても、外界認識部310が正確に物体を認識することができる。 Note that the DNN reduction device 100 may be mounted on the vehicle 500. In this case, even if the vehicle 500 is in an environment where it cannot connect to a wireless network (such as a tunnel or an underground road), the reduced DNN model 40 generated and retrained by the DNN reduction device 100 is immediately connected to the external world recognition unit 310. is input. Therefore, even in an environment where vehicle 500 cannot connect to a wireless network, external world recognition unit 310 can accurately recognize objects.
<計算機のハードウェア構成>
 次に、DNN縮約装置100を構成する計算機600のハードウェア構成を説明する。
 図2は、計算機600のハードウェア構成例を示すブロック図である。計算機600は、本実施の形態に係るDNN縮約装置100として動作可能なコンピューターとして用いられるハードウェアの一例である。本実施の形態に係るDNN縮約装置100は、計算機600(コンピューター)がプログラムを実行することにより、図1に示した各機能ブロックが連携して行うDNN縮約の演算方法を実現する。
<Computer hardware configuration>
Next, the hardware configuration of the computer 600 that constitutes the DNN reduction device 100 will be explained.
FIG. 2 is a block diagram showing an example of the hardware configuration of the computer 600. Computer 600 is an example of hardware used as a computer that can operate as DNN reduction device 100 according to this embodiment. The DNN reduction device 100 according to the present embodiment realizes a DNN reduction calculation method performed by the functional blocks shown in FIG. 1 in cooperation with each other by having the computer 600 (computer) execute a program.
 計算機600は、バス640にそれぞれ接続されたCPU(Central Processing Unit)610、ROM(Read Only Memory)620、及びRAM(Random Access Memory)630を備える。さらに、計算機600は、不揮発性ストレージ650及びネットワークインターフェイス660を備える。 The computer 600 includes a CPU (Central Processing Unit) 610, a ROM (Read Only Memory) 620, and a RAM (Random Access Memory) 630, each connected to a bus 640. Further, the computer 600 includes a nonvolatile storage 650 and a network interface 660.
 CPU610は、本実施の形態に係る各機能を実現するソフトウェアのプログラムコードをROM620から読み出してRAM630にロードし、実行する。RAM630には、CPU610の演算処理の途中で発生した変数やパラメータ等が一時的に書き込まれ、これらの変数やパラメータ等がCPU610によって適宜読み出される。ただし、CPU610に代えてMPU(Micro Processing Unit)を用いてもよい。CPU610は、DNN縮約装置100が備える各機能部の処理を実現する。 The CPU 610 reads out software program codes that implement each function according to the present embodiment from the ROM 620, loads them into the RAM 630, and executes them. Variables, parameters, etc. generated during the calculation process of the CPU 610 are temporarily written to the RAM 630, and these variables, parameters, etc. are read out by the CPU 610 as appropriate. However, instead of the CPU 610, an MPU (Micro Processing Unit) may be used. The CPU 610 realizes processing of each functional unit included in the DNN reduction device 100.
 不揮発性ストレージ650としては、例えば、HDD(Hard Disk Drive)、SSD(Solid State Drive)、フレキシブルディスク、光ディスク、光磁気ディスク、CD-ROM、CD-R、磁気テープ又は不揮発性のメモリ等が用いられる。この不揮発性ストレージ650には、OS(Operating System)、各種のパラメータの他に、計算機600を機能させるためのプログラムが記録されている。ROM620及び不揮発性ストレージ650は、CPU610が動作するために必要なプログラムやデータ等を記録しており、計算機600によって実行されるプログラムを格納したコンピューター読取可能な非一過性の記憶媒体の一例として用いられる。不揮発性ストレージ650には、学習済みDNNモデル10、縮約後DNNモデル40が保存される。 As the non-volatile storage 650, for example, an HDD (Hard Disk Drive), SSD (Solid State Drive), flexible disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, or non-volatile memory is used. It will be done. In addition to an OS (Operating System) and various parameters, programs for operating the computer 600 are recorded in the nonvolatile storage 650. The ROM 620 and the non-volatile storage 650 record programs and data necessary for the operation of the CPU 610, and serve as an example of a computer-readable non-transitory storage medium that stores programs executed by the computer 600. used. The trained DNN model 10 and the reduced DNN model 40 are stored in the nonvolatile storage 650.
 ネットワークインターフェイス660には、例えば、NIC(Network Interface Card)等が用いられ、NICの端子に接続されたLAN(Local Area Network)、専用線等を介して各種のデータを装置間で送受信することが可能である。DNN縮約装置100は、ネットワークインターフェイス660を介して、縮約後DNNモデル40を自動運転ECU300に送信する。 For example, a NIC (Network Interface Card) is used as the network interface 660, and various data can be sent and received between devices via a LAN (Local Area Network) connected to a terminal of the NIC, a dedicated line, etc. It is possible. DNN reduction device 100 transmits reduced DNN model 40 to automatic driving ECU 300 via network interface 660.
<DNN縮約装置の動作例>
 次に、DNN縮約装置100の動作について、図3を参照して説明する。
 図3は、第1の実施形態に係るDNN縮約装置100の処理の例を示すフローチャートである。
<Example of operation of DNN reduction device>
Next, the operation of the DNN reduction device 100 will be explained with reference to FIG. 3.
FIG. 3 is a flowchart illustrating an example of processing by the DNN reduction device 100 according to the first embodiment.
 上述したようにDNN縮約装置100は、事前に学習した学習済みDNNモデル10を有している。そして、DNN縮約装置100は、学習済みDNNモデル10から各chの重み係数20を取得する。 As described above, the DNN reduction device 100 has the trained DNN model 10 that has been trained in advance. Then, the DNN reduction device 100 obtains the weighting coefficient 20 of each channel from the learned DNN model 10.
 まず、重要度算出部110は、各chの重要度を算出する(S1)。ここで、重要度算出部110によって行われる重要度の算出手順について、図4を参照して説明する。
 図4は、学習済みDNNモデル10を簡略化して示す図である。
First, the importance calculation unit 110 calculates the importance of each channel (S1). Here, the importance calculation procedure performed by the importance calculation unit 110 will be explained with reference to FIG. 4.
FIG. 4 is a simplified diagram of the trained DNN model 10.
 図4に示す学習済みDNNモデル10の中間層の各層には、それぞれ5つのchが含まれる。ここで、図4には、学習済みDNNモデル10における中間層にある1chを領域501として示している。次に、重要度算出部110が領域501に示すchの重要度を算出する手順について説明する。 Each intermediate layer of the trained DNN model 10 shown in FIG. 4 includes five channels. Here, in FIG. 4, 1ch in the middle layer in the trained DNN model 10 is shown as a region 501. Next, a procedure in which the importance calculation unit 110 calculates the importance of the channel shown in the area 501 will be described.
 各chの重要度は、各chの認識精度への影響度を表す。そして、中間層の各層のchのうち、入力層に近い層の重要度の平均値が大きく、出力層に近い層の重要度の平均値が小さくなることが知られている。そして、重要度が大きいchほど、後の処理では削除されにくい。従来は、出力層に近く、重要度が小さい層は、演算数も少なかったので、ほぼ全ての層が削除されることがあった。 The importance of each channel represents the degree of influence of each channel on recognition accuracy. It is known that among the channels of each layer of the intermediate layer, the average value of the importance of the layer near the input layer is large, and the average value of the importance of the layer near the output layer is small. The channel having a higher degree of importance is less likely to be deleted in later processing. Conventionally, layers that were close to the output layer and had low importance required a small number of operations, so almost all layers were sometimes deleted.
 そこで、重要度算出部110は、重み係数20の分散が大きいchや、他のchとは特徴が異なるchは重要度が高くなるように重要度を算出する。例えば、重要度が0.9であるchは分散が大きいと言える。また、他のchの特徴と異なるchは、他のchと異なる特徴量が反映されたものなので、後の処理で削除されると認識精度に影響が及ぶおそれがある。そこで、重要度算出部110は、他のchの特徴と異なるchの重要度を高く算出することで、このchが後の処理で削除されにくくする。 Therefore, the importance calculation unit 110 calculates the importance so that a channel with a large variance of the weighting coefficient 20 or a channel whose characteristics are different from other channels has a high importance. For example, a channel with an importance level of 0.9 can be said to have a large variance. Furthermore, since a channel that differs from the characteristics of other channels reflects a feature amount that is different from that of other channels, recognition accuracy may be affected if it is deleted in later processing. Therefore, the importance calculation unit 110 calculates a high importance of a channel that has characteristics different from those of other channels, thereby making it difficult for this channel to be deleted in later processing.
 重要度算出部(重要度算出部110)は、出力層に近い層から順に、後段のチャンネルの重要度と、後段の各チャンネルの重み係数20に基づいて、後段のチャンネルに接続される前段のチャンネルの重要度を算出する。図4に示す学習済みDNNモデル10では、領域501の後段となるch(すなわち領域501の右側のch)の重要度が、0.6、0.9、0.4、0.2、0.1となっている。そこで、重要度算出部110は、各chの重み係数20をw1、w2、w3、w4、w5とすると、領域501の重要度を以下の式(1)で算出する。 The importance calculation unit (importance calculation unit 110) calculates the priority of the previous stage connected to the subsequent channel, based on the importance of the subsequent channel and the weighting coefficient 20 of each subsequent channel, starting from the layer closest to the output layer. Calculate channel importance. In the trained DNN model 10 shown in FIG. 4, the importance of the channels subsequent to the region 501 (that is, the channels on the right side of the region 501) are 0.6, 0.9, 0.4, 0.2, 0. It is 1. Therefore, the importance calculation unit 110 calculates the importance of the region 501 using the following equation (1), assuming that the weighting coefficients 20 of each channel are w1, w2, w3, w4, and w5.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 通常、各chの重み係数20を演算で使用する時は、重み係数20が正負いずれの値も取るので絶対値は用いない。しかし、式(1)では、重み係数20が正負いずれの場合であっても値が大きくなると、演算への影響が大きく、削除すべきでないchとなるので、絶対値が用いられている。 Normally, when using the weighting coefficient 20 of each channel in calculations, the absolute value is not used because the weighting coefficient 20 takes either a positive or negative value. However, in Equation (1), whether the weighting coefficient 20 is positive or negative, if the value becomes large, the influence on the calculation is large and the channel should not be deleted, so the absolute value is used.
 再び図3に戻って説明を続ける。
 ステップS1の後、目標縮約率設定部120は、ユーザーが予め設定した目標縮約率30を設定する(S2)。目標縮約率30とは、学習済みDNNモデル10を、どの程度の演算数を削減したDNNモデル(縮約後DNNモデル40)にするかを表す指標であり、学習済みDNNモデル10の全体で目標とする縮約率である。
The explanation will be continued by returning to FIG. 3 again.
After step S1, the target reduction rate setting unit 120 sets the target reduction rate 30 set in advance by the user (S2). The target reduction rate 30 is an index indicating how much the number of operations is reduced in the trained DNN model 10 (reduced DNN model 40), This is the target reduction rate.
 次に、各層縮約率算出部(各層縮約率算出部131)は、チャンネルごとに算出される重要度の各層における重要度に基づいて、多層ニューラルネットワークモデル(学習済みDNNモデル10)の全体での目標縮約率に対する各層の目標縮約率を算出する。例えば、各層縮約率算出部131は、重要度算出部110が算出した各chの重要度と、目標縮約率設定部120により設定された目標縮約率30とに基づいて、各層の目標縮約率を算出する(S3)。各層の目標縮約率とは、学習済みDNNモデル10の各層におけるchのうち、どのchをどれだけ削減するかを表す指標であり、従来のような全体の目標縮約率だけを用い部場合に比べて、層ごとに縮約することが可能となる。 Next, each layer reduction rate calculation unit (each layer reduction rate calculation unit 131) calculates the entire multilayer neural network model (trained DNN model 10) based on the importance in each layer of the importance calculated for each channel. Calculate the target reduction rate of each layer with respect to the target reduction rate in . For example, each layer reduction rate calculation unit 131 calculates the target reduction rate of each layer based on the importance of each channel calculated by the importance calculation unit 110 and the target reduction rate 30 set by the target reduction rate setting unit 120. A reduction rate is calculated (S3). The target reduction rate of each layer is an index that indicates which channel is to be reduced and by how much among the channels in each layer of the trained DNN model 10. Compared to , it is possible to contract each layer.
 次に、DNN縮約部140は、入力した学習済みDNNモデル10と、各層縮約率算出部131が算出した各層の目標縮約率とに基づいて、学習済みDNNモデル10の縮約を行う。DNN再学習部150は、縮約された学習済みDNNモデル10を縮約後DNNモデル40として、縮約後DNNモデル40の再学習を行う(S4)。 Next, the DNN reduction unit 140 reduces the trained DNN model 10 based on the input trained DNN model 10 and the target reduction rate of each layer calculated by the layer reduction rate calculation unit 131. . The DNN relearning unit 150 retrains the reduced DNN model 40 using the reduced trained DNN model 10 as the reduced DNN model 40 (S4).
 次に、DNN再学習部150は、再学習した縮約後DNNモデル40を車両500の自動運転ECU300に出力する(S5)。ステップS5の処理後、DNN縮約装置100の処理は終了する。 Next, the DNN relearning unit 150 outputs the relearned reduced DNN model 40 to the automatic driving ECU 300 of the vehicle 500 (S5). After the process of step S5, the process of the DNN reduction device 100 ends.
 ここで、図4に示す学習済みDNNモデル10が縮約される様子について説明する。
 図6は、縮約後DNNモデル40の例を示す図である。ここでは、学習済みDNNモデル10における目標縮約率30が40%に設定された場合における縮約処理について説明する。
Here, a description will be given of how the trained DNN model 10 shown in FIG. 4 is reduced.
FIG. 6 is a diagram showing an example of the reduced DNN model 40. Here, a reduction process when the target reduction rate 30 in the trained DNN model 10 is set to 40% will be described.
 なお、説明を簡単にするため、各中間層の演算数が同じであると仮定する。この場合、DNN縮約部140は、中間層に含まれる複数のchのうち、重要度が小さいchから順に削減する。例えば、DNN縮約部140は、図4に示した学習済みDNNモデル10の中間層にある15chから、目標縮約率30が40%となる6ch分を重要度が低い順に削減する。この結果、中間層のch数が9chとなった、図6に示す縮約後DNNモデル40が作成される。この縮約後DNNモデル40は、DNN再学習部150により再学習された後、外界認識部310に出力される。 Note that to simplify the explanation, it is assumed that the number of operations in each intermediate layer is the same. In this case, the DNN reduction unit 140 reduces channels in order of importance from among the plurality of channels included in the intermediate layer. For example, the DNN reduction unit 140 reduces 6 channels whose target reduction rate 30 is 40% from the 15 channels in the middle layer of the learned DNN model 10 shown in FIG. 4 in descending order of importance. As a result, the reduced DNN model 40 shown in FIG. 6 is created in which the number of channels in the middle layer is 9. This reduced DNN model 40 is retrained by the DNN retraining unit 150 and then output to the external world recognition unit 310.
 以上説明した第1の実施形態に係るDNN縮約装置100では、学習済みDNNモデル10のchを目標縮約率30に従い、重要度の低い順にchを削減して、縮約後DNNモデル40を作成している。そして、DNN縮約装置100は、重要度解析で各chの重み係数20から算出した重要度と各層ごとの演算数を用いることで事前に最適な縮約率を求める。このため、DNN縮約装置100は、重要度を用いて学習済みDNNモデル10を縮約することで、縮約後DNNモデル40を用いた物体の認識精度の低下を抑制することができる。また、DNN縮約装置100は、縮約後DNNモデル40を最小1回の再学習を行うだけでよい。このため、従来のようにDNNモデルの再学習を繰り返す必要はなく、学習済みDNNモデル10を縮約する工数を削減可能となる。 In the DNN reduction device 100 according to the first embodiment described above, the channels of the trained DNN model 10 are reduced in descending order of importance according to the target reduction rate 30, and the reduced DNN model 40 is Creating. Then, the DNN reduction device 100 obtains an optimal reduction rate in advance by using the importance calculated from the weighting coefficient 20 of each channel in the importance analysis and the number of operations for each layer. Therefore, the DNN reduction device 100 can suppress a decrease in object recognition accuracy using the reduced DNN model 40 by reducing the trained DNN model 10 using the importance level. Further, the DNN reduction device 100 only needs to relearn the reduced DNN model 40 at least once. Therefore, there is no need to repeat relearning of the DNN model as in the past, and the number of man-hours required to reduce the learned DNN model 10 can be reduced.
 また、縮約前の学習済みDNNモデル10に比べて、縮約後DNNモデル40のch数が削減されている。このため、外界認識部310は、縮約後DNNモデル40を用いた外界認識処理の演算数を低減し、外界認識結果のように必要な情報を素早く得ることができる。 Additionally, the number of channels of the reduced DNN model 40 is reduced compared to the trained DNN model 10 before reduction. Therefore, the external world recognition unit 310 can reduce the number of operations in the external world recognition process using the reduced DNN model 40 and quickly obtain necessary information such as the external world recognition result.
 また、ユーザーが設定した目標縮約率30に従って学習済みDNNモデル10が縮約されるので、ユーザーが意図した縮約率まで学習済みDNNモデル10が縮約される。すなわち、学習済みDNNモデル10が過剰に縮約され過ぎて、縮約後DNNモデル40の認識精度が低下したり、逆に、縮約されずに自動運転ECU300による演算数が多くなったりすることがない。 Furthermore, since the learned DNN model 10 is reduced according to the target reduction rate 30 set by the user, the learned DNN model 10 is reduced to the reduction rate intended by the user. In other words, the trained DNN model 10 may be reduced too much and the recognition accuracy of the reduced DNN model 40 may decrease, or conversely, the number of operations performed by the automatic driving ECU 300 may increase without being reduced. There is no.
 なお、第1の実施形態では外部情報をカメラ200が撮像する画像から取得しているが、これはLidar、Radar、遠赤外線カメラ等の、物体との距離や物体の種類が取得できるセンサを用いてもよく、外部情報を取得する手段はカメラ200に限定されない。また、外部情報を取得可能なセンサは単独で使用してもよいし、複数のセンサを組み合わせて使用してもよい。 Note that in the first embodiment, external information is acquired from the image captured by the camera 200, but this is done using a sensor that can acquire the distance to an object and the type of the object, such as Lidar, Radar, or a far-infrared camera. The means for acquiring external information is not limited to the camera 200. Further, a sensor capable of acquiring external information may be used alone, or a plurality of sensors may be used in combination.
 また、自動運転ECU300は、外界認識部310による外界認識結果、リスク予測部320によるリスク予測結果、及び行動計画部330による行動計画を保存しておいてもよい。そして、DNN縮約装置100は、これらの情報を自動運転ECU300から取得し、改めてDNNモデルを算出し、学習済みDNNモデル10として用いてもよい。 Furthermore, the automatic driving ECU 300 may store the external world recognition result by the external world recognition unit 310, the risk prediction result by the risk prediction unit 320, and the action plan by the action planning unit 330. Then, the DNN reduction device 100 may acquire this information from the automatic driving ECU 300, calculate a DNN model anew, and use it as the learned DNN model 10.
[第2の実施形態]
 図1に示した第1の実施形態に係るDNN縮約装置100の各層縮約率算出部131では、各chの重要度に基づいて各層の縮約率を算出していた。しかし、各chの重要度を用いるだけでは、学習済みDNNモデル10の後半の層(出力層に近い層)の重み係数20が小さく算出されやすいので、後半の層のchの重要度が小さくなって、後半の層のchが縮約の対象になりやすい。ただし、学習済みDNNモデル10の後半の層は、元々演算数が少ないため、縮約の効果を得にくいことが想定される。そこで、各層縮約率算出部131が各層の縮約率を算出する時に、演算数も考慮に入れることとする。この結果、演算数が少ない層ばかりが縮約の対象になることを避けることができる。
[Second embodiment]
The layer reduction rate calculation unit 131 of the DNN reduction device 100 according to the first embodiment shown in FIG. 1 calculates the reduction rate of each layer based on the importance of each channel. However, if only the importance of each channel is used, the weight coefficient 20 of the latter layer (layer close to the output layer) of the trained DNN model 10 is likely to be calculated small, so the importance of the channels in the latter layer becomes small. Therefore, channels in the latter half of the layer are likely to be subject to contraction. However, since the latter layer of the trained DNN model 10 originally has a small number of operations, it is assumed that it is difficult to obtain the effect of reduction. Therefore, when the layer reduction rate calculation unit 131 calculates the reduction rate of each layer, the number of operations is also taken into consideration. As a result, it is possible to avoid reducing only layers with a small number of operations.
 そこで、本発明の第2の実施形態に係る自動運転システムの構成例及び動作例について、図7と図8を参照して説明する。
 図7は、第2の実施形態に係るDNN縮約装置100Aを備える自動運転システム1Aの構成例を示すブロック図である。図7において図1と同じ処理を行う機能ブロックには同じ名称と番号を付与しており、特に説明がない限り、同一又は類似の機能を有するものとして説明を省略する。
Therefore, a configuration example and an operation example of an automatic driving system according to a second embodiment of the present invention will be described with reference to FIGS. 7 and 8.
FIG. 7 is a block diagram showing a configuration example of an automatic driving system 1A including a DNN condensation device 100A according to the second embodiment. In FIG. 7, functional blocks that perform the same processing as those in FIG. 1 are given the same names and numbers, and unless otherwise specified, descriptions will be omitted as they have the same or similar functions.
 図7に示す第2の実施形態に係る自動運転システム1Aは、DNN縮約装置100Aと、自動運転ECU300とで構成される。
 DNN縮約装置100Aが備える縮約条件設定部130Aは、各層縮約率算出部131の他に、パラメータ設定部132を新たに備える。パラメータ設定部132は、各層縮約率算出部131により各層の縮約率が算出される際に寄与するパラメータを設定する。このパラメータを寄与度パラメータとも呼ぶ。
An automatic driving system 1A according to the second embodiment shown in FIG. 7 includes a DNN reduction device 100A and an automatic driving ECU 300.
The reduction condition setting section 130A included in the DNN reduction device 100A additionally includes a parameter setting section 132 in addition to the layer reduction rate calculation section 131. The parameter setting unit 132 sets parameters that contribute when the layer reduction rate calculation unit 131 calculates the reduction rate of each layer. This parameter is also called a contribution parameter.
 パラメータ設定部(パラメータ設定部132)は、重要度と、多層ニューラルネットワークモデル(学習済みDNNモデル10)から抽出される各層の演算数とをパラメータとして設定する。このパラメータ設定部132には、重要度算出部110が算出したchごとの重要度に加えて、学習済みDNNモデル10から抽出される各層の演算数50が入力される。各層の演算数50は、例えば、図4に示した学習済みDNNモデル10の例では、ある層の1つのcnに接続される次層の複数のchの接続線の数である。図4では、簡略化した学習済みDNNモデル10の例であるため、中間層の入力側にある層の1chに対して、次層(中間層の真ん中の層)にある5chが接続される。そして、中間層の入力側にある層の1chと、次層のchとの演算数は「5」である。ある層におけるchごとに次層のchとの演算数が求まるので、各層のchの演算数の合計が各層の演算数50として求まる。 The parameter setting unit (parameter setting unit 132) sets the degree of importance and the number of operations for each layer extracted from the multilayer neural network model (trained DNN model 10) as parameters. In addition to the importance of each channel calculated by the importance calculation unit 110, the number of operations 50 for each layer extracted from the trained DNN model 10 is input to the parameter setting unit 132. For example, in the trained DNN model 10 shown in FIG. 4, the number of operations 50 in each layer is the number of connection lines of a plurality of channels in the next layer connected to one cn in a certain layer. Since FIG. 4 is an example of the simplified trained DNN model 10, 5 channels in the next layer (the middle layer of the intermediate layer) are connected to 1 channel in the layer on the input side of the intermediate layer. The number of operations between channel 1 of the layer on the input side of the intermediate layer and channel of the next layer is "5". Since the number of operations for each channel in a certain layer with respect to the channel in the next layer is determined, the total number of operations for the channels in each layer is determined as the number of operations 50 for each layer.
 そして、パラメータ設定部132は、学習済みDNNモデル10の認識精度、演算速度が、各目標を達成しているか否かによって、重要度と演算数の寄与率を決めるパラメータを設定する。この時、パラメータ設定部(パラメータ設定部132)は、各層縮約率算出部131が縮約率を算出する際に用いる、チャンネルごとに算出される重要度の寄与度と、各層の演算数50の寄与度とをパラメータ(寄与度パラメータ)として設定する。チャンネルごとに算出される重要度の寄与度と、各層の演算数50の寄与度とをパラメータ(寄与度パラメータ)として設定されることで、重要度と各層の演算数50に基づいて学習済みDNNモデル10が縮約される。なお、パラメータの設定は、パラメータの調整と言い換えてもよい。パラメータ設定部132が設定した寄与度パラメータは、各層縮約率算出部131に入力される。 Then, the parameter setting unit 132 sets parameters that determine the degree of importance and the contribution rate of the number of calculations, depending on whether the recognition accuracy and calculation speed of the trained DNN model 10 achieve each goal. At this time, the parameter setting unit (parameter setting unit 132) calculates the degree of contribution of the importance calculated for each channel and the number of calculations 50 for each layer, which are used when each layer reduction rate calculation unit 131 calculates the reduction rate. The contribution degree is set as a parameter (contribution degree parameter). By setting the contribution of the importance calculated for each channel and the contribution of the 50 operations in each layer as parameters (contribution parameters), a learned DNN is created based on the importance and the number of operations 50 in each layer. Model 10 is reduced. Note that parameter setting may also be referred to as parameter adjustment. The contribution parameter set by the parameter setting unit 132 is input to each layer reduction rate calculation unit 131.
 各層縮約率算出部(各層縮約率算出部131)は、パラメータ(寄与度パラメータ)と、目標縮約率とに基づいて、各層の目標縮約率を算出する。例えば、各層縮約率算出部131は、目標縮約率設定部120で決めた学習済みDNNモデル10全体の縮約率、重要度、演算数、寄与度パラメータに基づいて各層の縮約率を算出する。 Each layer reduction rate calculation unit (each layer reduction rate calculation unit 131) calculates the target reduction rate of each layer based on the parameter (contribution parameter) and the target reduction rate. For example, each layer reduction rate calculation unit 131 calculates the reduction rate of each layer based on the reduction rate, importance, number of operations, and contribution parameters of the entire trained DNN model 10 determined by the target reduction rate setting unit 120. calculate.
 図8は、第2の実施形態に係るDNN縮約装置100の処理の例を示すフローチャートである。なお、図8に示す処理において、図3と同じ処理は同じ番号を付与しており、特に説明がない限り同一又は類似の機能を有するものとして説明を省略する。 FIG. 8 is a flowchart illustrating an example of processing by the DNN reduction device 100 according to the second embodiment. In addition, in the process shown in FIG. 8, the same process as in FIG. 3 is given the same number, and the description will be omitted as having the same or similar function unless otherwise specified.
 図3に示したように、DNN縮約装置100は、事前に学習した学習済みDNNモデル10を有している。そして、DNN縮約装置100は、学習済みDNNモデル10から各chの重み係数20を取得する。そして、重要度算出部110は、各chの重み係数20に基づいて、各chの重要度を算出する(S1)。 As shown in FIG. 3, the DNN reduction device 100 has a trained DNN model 10 that has been trained in advance. Then, the DNN reduction device 100 obtains the weighting coefficient 20 of each channel from the learned DNN model 10. Then, the importance calculation unit 110 calculates the importance of each channel based on the weighting coefficient 20 of each channel (S1).
 次に、DNN縮約装置100のパラメータ設定部132は、第1の実施形態に係る各chの重み係数20から算出された各chの重要度に加えて、各層の演算数50を取得する(S11)。 Next, the parameter setting unit 132 of the DNN reduction device 100 obtains the number of operations 50 for each layer in addition to the importance of each channel calculated from the weighting coefficient 20 of each channel according to the first embodiment ( S11).
 次に、パラメータ設定部132は、各chの重要度の寄与度と、各chの演算数に基づいて、学習済みDNNモデル10を縮約する時における、各chの寄与度パラメータを設定する(S12)。そして、パラメータ設定部132は、設定された寄与度パラメータを各層の縮約率を算出する次式(2)に当てはめ、各層の縮約率を算出する(S13)。例えば、パラメータ設定部132は、重要度の寄与度xを0.5、演算数の寄与度yを0.5のように設定する。 Next, the parameter setting unit 132 sets the contribution parameter of each channel when contracting the trained DNN model 10 based on the contribution of the importance of each channel and the number of operations of each channel ( S12). Then, the parameter setting unit 132 applies the set contribution parameter to the following equation (2) for calculating the reduction rate of each layer, and calculates the reduction rate of each layer (S13). For example, the parameter setting unit 132 sets the degree of contribution x of importance to 0.5 and the degree of contribution y of number of operations to 0.5.
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 式(2)における、C(L)は各層の縮約率を表す。P(L)は各層の重要度を表す。xは重要度の寄与度を表す。O(L)は各層の演算数50を表す。yは演算数の寄与度を表す。base_rateは目標縮約率30を表す。 In formula (2), C(L) represents the reduction rate of each layer. P(L) represents the importance of each layer. x represents the degree of contribution of importance. O(L) represents the number of operations 50 in each layer. y represents the degree of contribution of the number of operations. base_rate represents the target reduction rate of 30.
 上述した例では、重要度の寄与度xと、演算数の寄与度yを、それぞれ同じ0.5としたが、重要度の寄与度xを0.3とし、演算数の寄与度yを0.6とする異なる値も想定される。重要度の寄与度xの初期値と、演算数の寄与度yの初期値は、例えば、ユーザーが予め決めておくことが可能である。ステップS13において各層縮約率算出部131により各層の縮約率が算出された以降の処理は、第1の実施の形態に係るDNN縮約装置100における処理と同様である。 In the above example, the contribution x of the importance and the contribution y of the number of operations are both the same 0.5, but the contribution x of the importance is 0.3 and the contribution y of the number of operations is 0. A different value of .6 is also envisaged. For example, the initial value of the contribution degree x of importance and the initial value of the contribution degree y of operation number can be determined in advance by the user. The processing after the reduction ratio of each layer is calculated by the layer reduction ratio calculation unit 131 in step S13 is the same as the processing in the DNN reduction apparatus 100 according to the first embodiment.
 以上説明した第2の実施形態に係る自動運転システム1Aでは、重要度算出部110が重要度解析を用いて解析したchごとの重要度と、学習済みDNNモデル10から抽出される各層の演算数50とを用いて、重要度と演算数の寄与度パラメータが設定される。そして、各層縮約率算出部131は、寄与度パラメータに基づいて、各層の縮約率を算出する。各層縮約率算出部131は、演算数の寄与度パラメータを縮約率の算出に用いることで、演算数が少ない層ばかりが縮約の対象になることを避けることができる。 In the automatic driving system 1A according to the second embodiment described above, the importance of each channel analyzed by the importance calculation unit 110 using importance analysis and the number of operations of each layer extracted from the trained DNN model 10. 50 is used to set the contribution parameter of the importance level and the number of operations. Then, each layer reduction rate calculation unit 131 calculates the reduction rate of each layer based on the contribution parameter. By using the contribution degree parameter of the number of operations to calculate the reduction rate, each layer reduction rate calculation unit 131 can avoid only layers with a small number of operations being targeted for reduction.
 また、各層縮約率算出部131は、重要度の寄与度パラメータを縮約率の算出に用いることで、重要度の高い層が縮約の対象になることを避けることができる。この結果、DNN縮約部140は、学習済みDNNモデル10の重要度が高いchを残し、演算数が大きいchを削減して、学習済みDNNモデル10を目標縮約率30に従って、縮約することが可能となる。この結果、自動運転ECU300では、全体の演算数が大きく削減された縮約後DNNモデル40を用いて行われる外界認識の演算処理を速やかに実行することが可能となる。また、自動運転ECU300では、認識すべき物体を確実に認識して、この物体を避けて車両500の運転を制御することができる。 Furthermore, by using the importance contribution parameter in calculating the reduction rate, each layer reduction rate calculation unit 131 can avoid layers with high importance from becoming reduction targets. As a result, the DNN reduction unit 140 reduces the learned DNN model 10 according to the target reduction rate 30 by leaving the channels with high importance in the trained DNN model 10 and reducing the channels with a large number of operations. becomes possible. As a result, the automatic driving ECU 300 can quickly execute the calculation process for external world recognition using the reduced DNN model 40 in which the total number of calculations is greatly reduced. Moreover, automatic driving ECU 300 can reliably recognize an object to be recognized and control the driving of vehicle 500 while avoiding this object.
[第3の実施形態]
 上述した第1の実施形態に係る方法(図3を参照)を用いて学習済みDNNモデル10を縮約した場合、縮約後DNNモデル40の認識精度が低下することがある。同様に、上述した第2の実施形態に係る方法(図8を参照)を用いて学習済みDNNモデル10を縮約した場合にも、縮約後DNNモデル40の認識精度が低下することがある。そこで、第3の実施形態に係るDNN縮約装置は、縮約後DNNモデル40の認識精度を確認し、認識制度の確認結果から縮約率を調整することで、安全が担保される認識精度を保つようにする。
[Third embodiment]
When the learned DNN model 10 is reduced using the method according to the first embodiment described above (see FIG. 3), the recognition accuracy of the reduced DNN model 40 may decrease. Similarly, even when the learned DNN model 10 is reduced using the method according to the second embodiment (see FIG. 8), the recognition accuracy of the reduced DNN model 40 may decrease. . Therefore, the DNN reduction device according to the third embodiment checks the recognition accuracy of the reduced DNN model 40 and adjusts the reduction rate based on the confirmation result of the recognition system, thereby achieving recognition accuracy that ensures safety. Try to keep it.
 そこで、本発明の第3の実施形態に係る自動運転システムの構成例及び動作例について、図9と図10を参照して説明する。
 図9は、第3の実施形態に係るDNN縮約装置100Bを備える自動運転システム1Bの構成例を示すブロック図である。図9において図7と同じ処理を行うブロックには同じ名称と番号を付与しており、特に説明がない限り、同一又は類似の機能を有するものとして説明を省略する。
Therefore, a configuration example and an operation example of an automatic driving system according to a third embodiment of the present invention will be described with reference to FIGS. 9 and 10.
FIG. 9 is a block diagram showing a configuration example of an automatic driving system 1B including a DNN reduction device 100B according to the third embodiment. In FIG. 9, blocks that perform the same processing as those in FIG. 7 are given the same names and numbers, and unless otherwise explained, they are assumed to have the same or similar functions and will not be described.
 第3の実施形態に係る自動運転システム1Bは、DNN縮約装置100Bと、自動運転ECU300とで構成される。DNN縮約装置100Bは、第2の実施形態に係るDNN縮約装置100Aに対して、新たにFPS(Frames Per Second)確認部160及び認識精度確認部170を追加した構成としている。以下の説明では、fpsを演算速度とも呼ぶ。 An automatic driving system 1B according to the third embodiment includes a DNN reduction device 100B and an automatic driving ECU 300. The DNN reduction device 100B has a configuration in which an FPS (Frames Per Second) confirmation unit 160 and a recognition accuracy confirmation unit 170 are newly added to the DNN reduction device 100A according to the second embodiment. In the following explanation, fps is also referred to as calculation speed.
 DNN再学習部150は、FPS確認部160に接続される。このため、DNN再学習部150が再学習した縮約後DNNモデル40がFPS確認部160に出力される。 The DNN relearning section 150 is connected to the FPS confirmation section 160. Therefore, the reduced DNN model 40 retrained by the DNN relearning unit 150 is output to the FPS confirmation unit 160.
 演算速度確認部(FPS確認部160)は、再学習された縮約後の多層ニューラルネットワークモデル(縮約後DNNモデル40)から演算速度を確認する。このFPS確認部160は、パラメータ設定部132と認識精度確認部170に接続される。FPS確認部160は、DNN再学習部150から入力した縮約後DNNモデル40の演算速度を測定し、縮約後DNNモデル40の演算速度が、目標の演算速度を満たしているか否かを確認する。認識精度確認部170は、例えば、データ量が既知である数十枚の画像を縮約後DNNモデル40に読み込ませ、縮約後DNNモデル40が所定時間内に処理可能な画像の枚数を演算速度として求める。演算速度が速いほど、縮約後DNNモデル40が1秒あたりに処理できる画像の枚数は多い。FPS確認部160による縮約後DNNモデル40の演算速度の確認結果は、パラメータ設定部132に出力される。また、FPS確認部160は、認識精度確認部170に縮約後DNNモデル40を出力する。 The calculation speed checking unit (FPS checking unit 160) checks the calculation speed from the re-learned reduced multilayer neural network model (reduced DNN model 40). This FPS confirmation section 160 is connected to the parameter setting section 132 and the recognition accuracy confirmation section 170. The FPS confirmation unit 160 measures the calculation speed of the reduced DNN model 40 input from the DNN relearning unit 150, and checks whether the calculation speed of the reduced DNN model 40 satisfies the target calculation speed. do. For example, the recognition accuracy confirmation unit 170 causes the reduced DNN model 40 to read several dozen images whose data amount is known, and calculates the number of images that the reduced DNN model 40 can process within a predetermined time. Find it as speed. The faster the calculation speed is, the more images the reduced DNN model 40 can process per second. The result of checking the calculation speed of the reduced DNN model 40 by the FPS checking unit 160 is output to the parameter setting unit 132. Further, the FPS confirmation unit 160 outputs the reduced DNN model 40 to the recognition accuracy confirmation unit 170.
 認識精度確認部(認識精度確認部170)は、再学習された縮約後の多層ニューラルネットワークモデル(縮約後DNNモデル40)の認識精度を確認する。この認識精度確認部170は、パラメータ設定部132と、自動運転ECU300の外界認識部310に接続される。認識精度確認部170は、縮約後DNNモデル40の認識精度を測定し、縮約後DNNモデル40の認識精度が目標の認識精度を満たしているか否かを確認する。認識精度確認部170は、例えば、予め物体が既知である数十枚の画像を縮約後DNNモデル40に読み込ませ、縮約後DNNモデル40が物体を正しく認識できた割合を認識精度として求める。認識精度確認部170による縮約後DNNモデル40の認識精度の確認結果は、パラメータ設定部132に出力される。また、認識精度確認部170は、FPS確認部160によって縮約後DNNモデル40の演算速度が目標の演算速度を満たしていると判定され、かつ、認識精度確認部170によって縮約後DNNモデル40の認識精度が目標の認識精度を満たしていると判定された場合に、自動運転ECU300の外界認識部310に縮約後DNNモデル40を出力する。 The recognition accuracy confirmation unit (recognition accuracy confirmation unit 170) confirms the recognition accuracy of the re-learned reduced multilayer neural network model (reduced DNN model 40). This recognition accuracy confirmation section 170 is connected to the parameter setting section 132 and the external world recognition section 310 of the automatic driving ECU 300. The recognition accuracy confirmation unit 170 measures the recognition accuracy of the reduced DNN model 40 and checks whether the recognition accuracy of the reduced DNN model 40 satisfies the target recognition accuracy. For example, the recognition accuracy confirmation unit 170 causes the reduced DNN model 40 to read several dozen images in which objects are known in advance, and calculates the rate at which the reduced DNN model 40 can correctly recognize the object as the recognition accuracy. . The recognition accuracy confirmation result of the reduced DNN model 40 by the recognition accuracy confirmation unit 170 is output to the parameter setting unit 132. Further, the recognition accuracy confirmation unit 170 determines that the calculation speed of the reduced DNN model 40 satisfies the target calculation speed by the FPS confirmation unit 160, and the recognition accuracy confirmation unit 170 determines that the calculation speed of the reduced DNN model 40 satisfies the target calculation speed. If it is determined that the recognition accuracy meets the target recognition accuracy, the reduced DNN model 40 is output to the external world recognition unit 310 of the automatic driving ECU 300.
 なお、縮約後DNNモデル40の構成が簡単になり過ぎると、縮約後DNNモデル40の演算速度が速過ぎとなるが、認識精度が低下している可能性もある。そこで、DNN縮約装置100Bは、縮約後DNNモデル40の演算速度だけでなく、認識精度についても確認することで、演算速度が速く、認識精度も高い縮約後DNNモデル40が得られたかを確認できるようにしている。 Note that if the configuration of the reduced DNN model 40 becomes too simple, the calculation speed of the reduced DNN model 40 will become too fast, but the recognition accuracy may also decrease. Therefore, the DNN reduction device 100B checks not only the calculation speed of the reduced DNN model 40 but also the recognition accuracy to determine whether the reduced DNN model 40 with high calculation speed and high recognition accuracy has been obtained. This allows you to check.
 また、縮約後DNNモデル40は、実行されるデバイスによって演算速度と認識精度が変わりうる。このため、FPS確認部160と認識精度確認部170では、縮約後DNNモデル40が実行される自動運転ECU300のCPUの種類に合わせて、演算速度及び認識精度が確認される。このため、DNN縮約装置100Bは、自動運転ECU300のCPUごとに最適な演算速度及び認識精度が実現可能な縮約後DNNモデル40を生成することができる。 Furthermore, the calculation speed and recognition accuracy of the reduced DNN model 40 may vary depending on the device on which it is executed. Therefore, the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 confirm the calculation speed and recognition accuracy according to the type of CPU of the automatic driving ECU 300 on which the reduced DNN model 40 is executed. Therefore, the DNN reduction device 100B can generate a reduced DNN model 40 that can achieve optimal calculation speed and recognition accuracy for each CPU of the automatic driving ECU 300.
 そして、パラメータ設定部(パラメータ設定部132)は、確認された演算速度と、目標の演算速度との比較結果、及び確認された認識精度と、目標の認識精度との比較結果とに基づいて、重要度の寄与度と、各層の演算数50の寄与度を決定する。このようにパラメータ設定部132は、フィードバックされた演算速度の比較結果と、認識精度の比較結果に基づいて、縮約後DNNモデル40を生成するための最適なパラメータを設定することが可能となる。 Then, the parameter setting unit (parameter setting unit 132), based on the comparison result between the confirmed calculation speed and the target calculation speed, and the comparison result between the confirmed recognition accuracy and the target recognition accuracy, The degree of contribution of the degree of importance and the degree of contribution of the number of operations of each layer, 50, are determined. In this way, the parameter setting unit 132 is able to set optimal parameters for generating the reduced DNN model 40 based on the fed-back comparison results of calculation speed and recognition accuracy comparison results. .
 なお、図9では、FPS確認部160、認識精度確認部170の順に処理が行われるが、FPS確認部160、認識精度確認部170を並列処理としてもよい。並列処理の場合、FPS確認部160又は認識精度確認部170のいずれかが後述する図10に示すステップS22の判断を行って、外界認識部310に縮約後DNNモデル40を出力するように構成される。 Note that in FIG. 9, processing is performed in the order of the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170, but the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 may be processed in parallel. In the case of parallel processing, either the FPS confirmation unit 160 or the recognition accuracy confirmation unit 170 is configured to make the determination in step S22 shown in FIG. be done.
 次に、DNN縮約装置100Bの動作について説明する。
 図10は、第3の実施形態に係るDNN縮約装置100Bの処理の例を示すフローチャートである。なお、図10において図8と同じ処理となる部分は同じ番号を付与しており、特に説明がない限り同一又は類似の機能を有するものとして説明を省略する。
Next, the operation of the DNN reduction device 100B will be explained.
FIG. 10 is a flowchart illustrating an example of processing by the DNN reduction device 100B according to the third embodiment. Note that in FIG. 10, the same numbers are given to the parts that perform the same processing as in FIG. 8, and unless otherwise specified, the description will be omitted as they have the same or similar functions.
 ステップS1,S11~S13,S2~S4までの処理は、第2の実施形態に係るDNN縮約装置100Aで行われる処理と同じである。
 ステップS4にて学習済みDNNモデル10の縮約かつ再学習が行われた後、FPS確認部160(演算速度確認部の一例)は、DNN再学習部150が再学習した縮約後DNNモデル40の演算速度(FPS)を測定する。また、認識精度確認部170は、DNN再学習部150が再学習したDNNモデルから認識精度を測定する(S21)。
The processing from steps S1, S11 to S13, and S2 to S4 is the same as the processing performed by the DNN reduction device 100A according to the second embodiment.
After the learned DNN model 10 is reduced and retrained in step S4, the FPS confirmation unit 160 (an example of a computation speed confirmation unit) uses the reduced DNN model 40 that has been retrained by the DNN relearning unit 150. Measure the calculation speed (FPS) of Further, the recognition accuracy confirmation unit 170 measures recognition accuracy from the DNN model retrained by the DNN relearning unit 150 (S21).
 次に、FPS確認部160は、測定した演算速度を、予め設定しておいた目標の演算速度と比較し、測定した演算速度が目標の演算速度(目標FPS)を達成したか否かを判定する。また、認識精度確認部170は、測定した認識精度を、予め設定しておいた目標の認識精度と比較し、測定した認識精度が目標の認識精度を達成したか否かを判定する(S22)。 Next, the FPS confirmation unit 160 compares the measured calculation speed with a preset target calculation speed, and determines whether the measured calculation speed has achieved the target calculation speed (target FPS). do. The recognition accuracy confirmation unit 170 also compares the measured recognition accuracy with a preset target recognition accuracy, and determines whether the measured recognition accuracy has achieved the target recognition accuracy (S22). .
 FPS確認部160が測定した演算速度が目標の演算速度を達成していなければ(S22のNO)、FPS確認部160は、演算速度の比較結果をパラメータ設定部132にフィードバックする。演算速度の比較結果には、例えば、目標の演算速度に対して70%という数値が含まれる。また、認識精度確認部170が測定した認識精度が目標の認識精度を達成していなければ(S22のNO)、認識精度確認部170は、認識精度の比較結果をパラメータ設定部132にフィードバックする。認識精度の比較結果には、目標の認識精度に対して80%という数値が含まれる。 If the calculation speed measured by the FPS confirmation unit 160 does not achieve the target calculation speed (NO in S22), the FPS confirmation unit 160 feeds back the calculation speed comparison result to the parameter setting unit 132. The calculation speed comparison results include, for example, a value of 70% of the target calculation speed. Further, if the recognition accuracy measured by the recognition accuracy confirmation unit 170 does not achieve the target recognition accuracy (NO in S22), the recognition accuracy confirmation unit 170 feeds back the recognition accuracy comparison result to the parameter setting unit 132. The recognition accuracy comparison results include a value of 80% of the target recognition accuracy.
 ここで、認識精度確認部170が測定する認識精度は、例えば、正解が分かっているサンプルの画像を縮約後DNNモデル40に入力した場合に、縮約後DNNモデル40がどれだけ正解したかで算出される。例えば、認識精度確認部170は、100枚のサンプル画像を縮約後DNNモデル40に入力した結果、80枚のサンプル画像に対して正解が得られた場合、縮約後DNNモデル40の認識精度を80%であると測定する。なお、目標精度は、ユーザー側が必要とする認識精度で設定される。例えば、目標精度が85%であれば、縮約後DNNモデル40の認識精度が不足しているので、パラメータ設定部132以降の処理で学習済みDNNモデル10の再縮約を行って、縮約後DNNモデル40の再学習することが必要となる。一方、目標精度が75%であれば、縮約後DNNモデル40の認識精度が充足しているので、学習済みDNNモデル10の再縮約と、縮約後DNNモデル40の再学習することが不要となる。 Here, the recognition accuracy measured by the recognition accuracy confirmation unit 170 is, for example, how much the reduced DNN model 40 answered correctly when a sample image for which the correct answer is known is input to the reduced DNN model 40. It is calculated by For example, if correct answers are obtained for 80 sample images as a result of inputting 100 sample images to the reduced DNN model 40, the recognition accuracy confirmation unit 170 determines the recognition accuracy of the reduced DNN model 40. is measured to be 80%. Note that the target accuracy is set to the recognition accuracy required by the user. For example, if the target accuracy is 85%, the recognition accuracy of the reduced DNN model 40 is insufficient, so the learned DNN model 10 is re-reduced in the processing after the parameter setting unit 132, and the reduced DNN model 40 is reduced. It is then necessary to retrain the DNN model 40. On the other hand, if the target accuracy is 75%, the recognition accuracy of the reduced DNN model 40 is sufficient, so it is possible to re-reduce the trained DNN model 10 and re-learn the reduced DNN model 40. No longer needed.
 ステップS22において、FPS確認部160が測定した演算速度が目標の演算速度を達成していない、及び認識精度確認部170が測定した認識精度が目標の認識精度を達成していない、の少なくとも一つの結果であれば(S22のNO)、比較結果がパラメータ設定部132にフィードバックされる。パラメータ設定部132は、FPS確認部160及び認識精度確認部170からフィードバックされた比較結果に基づいて、重要度と演算数の寄与度パラメータを修正する(S23)。 In step S22, at least one of the calculation speed measured by the FPS confirmation unit 160 has not achieved the target calculation speed, and the recognition accuracy measured by the recognition accuracy confirmation unit 170 has not achieved the target recognition accuracy. If it is a result (NO in S22), the comparison result is fed back to the parameter setting unit 132. The parameter setting unit 132 modifies the contribution degree parameters of the degree of importance and the number of calculations based on the comparison results fed back from the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170 (S23).
 ステップS23において、パラメータ設定部132は、演算速度が目標の演算速度を達成していない場合、重要度の寄与度パラメータが増加し、演算数の寄与度パラメータが減少するように設定する。また、パラメータ設定部132は、認識精度が目標の認識精度を達成していない場合、重要度の寄与度パラメータが減少し、演算数の寄与度パラメータが増加するように設定する。また、パラメータ設定部132は、演算速度が目標の演算速度を達成していない、かつ認識精度が目標の認識精度を達成していない場合、重要度の寄与度パラメータが増加し、演算数の寄与度パラメータが増加するように設定する。 In step S23, if the calculation speed has not achieved the target calculation speed, the parameter setting unit 132 sets the importance contribution parameter to increase and the calculation number contribution parameter to decrease. Furthermore, when the recognition accuracy has not achieved the target recognition accuracy, the parameter setting unit 132 sets the contribution degree parameter of the importance level to decrease and the contribution degree parameter of the number of calculations to increase. In addition, if the calculation speed has not achieved the target calculation speed and the recognition accuracy has not achieved the target recognition accuracy, the parameter setting unit 132 increases the contribution degree parameter of the degree of importance and the contribution of the number of calculations. Set the degree parameter to increase.
 一例として、ある縮約後DNNモデル40の演算速度と認識精度を測定した時を想定する。この時、測定された演算速度=200fps、測定された認識精度=60pt(%)であるとする。また、目標の演算速度=220fps、目標の認識精度=50pt(%)であるとする。この時、FPS確認部160は、測定した演算速度と、目標となる演算速度とを比較し、測定した演算速度が目標となる演算速度に達していないと判断する。また、認識精度確認部170は、測定した認識精度と目標となる認識精度を比較し、測定した認識精度が目標となる認識精度を満たしていると判断する。そこで、パラメータ設定部132は、演算速度が目標未達であるため、重要度の寄与度パラメータを0.5から0.6に増加し、演算数の寄与度パラメータを0.5から0.4に減少させるパラメータの修正を行う。なお、重要度の寄与度と、演算数の寄与度は、それぞれ足して1.0になるといった制限は設けられていない。 As an example, assume that the calculation speed and recognition accuracy of a certain reduced DNN model 40 are measured. At this time, it is assumed that the measured calculation speed = 200 fps and the measured recognition accuracy = 60 pt (%). Further, it is assumed that the target calculation speed is 220 fps and the target recognition accuracy is 50 pt (%). At this time, the FPS confirmation unit 160 compares the measured calculation speed and the target calculation speed, and determines that the measured calculation speed has not reached the target calculation speed. The recognition accuracy confirmation unit 170 also compares the measured recognition accuracy with the target recognition accuracy, and determines that the measured recognition accuracy satisfies the target recognition accuracy. Therefore, since the calculation speed has not reached the target, the parameter setting unit 132 increases the contribution parameter of the degree of importance from 0.5 to 0.6, and increases the contribution parameter of the number of calculations from 0.5 to 0.4. Modify the parameters to reduce them. Note that there is no restriction that the contribution of the degree of importance and the contribution of the number of operations can be added to 1.0.
 その後、再び各層縮約率算出部131は、DNNモデルの各層の縮約率を算出し、DNN縮約部140は、算出された各層の縮約率に基づいてDNNモデルを縮約する。さらに、DNN再学習部150は、DNNモデルの再学習を行う。そして、再び、ステップS21、S22における演算速度及び認識精度の測定と、測定された演算速度及び認識精度と、目標の演算速度及び目標の認識精度との比較を行う。 Thereafter, the layer reduction rate calculation unit 131 again calculates the reduction rate of each layer of the DNN model, and the DNN reduction unit 140 reduces the DNN model based on the calculated reduction rate of each layer. Further, the DNN relearning unit 150 performs relearning of the DNN model. Then, the calculation speed and recognition accuracy in steps S21 and S22 are measured again, and the measured calculation speed and recognition accuracy are compared with the target calculation speed and target recognition accuracy.
 ステップS23において、測定した演算速度が目標の演算速度を達成し、測定した認識精度が目標の認識精度を達成していれば(S23のYES)、DNN再学習部150は、再学習した縮約後DNNモデル40を車両500の自動運転ECU300に出力する(S5)。ステップS5の処理後、DNN縮約装置100Bの処理は終了する。 In step S23, if the measured calculation speed has achieved the target calculation speed and the measured recognition accuracy has achieved the target recognition accuracy (YES in S23), the DNN relearning unit 150 The rear DNN model 40 is output to the automatic driving ECU 300 of the vehicle 500 (S5). After the process of step S5, the process of the DNN reduction device 100B ends.
 以上説明した第3の実施形態に係る自動運転システム1Bでは、計測した演算速度が目標の演算速度を満たし、計測した認識精度が目標の認識精度を満たす場合に、縮約後DNNモデル40が自動運転ECU300に出力される。このため、自動運転ECU300は、縮約後DNNモデル40を用いて十分な演算速度及び認識精度で外界を認識することができ、処理の無駄を生じさせない。 In the automatic driving system 1B according to the third embodiment described above, when the measured calculation speed satisfies the target calculation speed and the measured recognition accuracy satisfies the target recognition accuracy, the reduced DNN model 40 automatically It is output to the driving ECU 300. Therefore, the automatic driving ECU 300 can recognize the external world with sufficient calculation speed and recognition accuracy using the reduced DNN model 40, and no processing is wasted.
[第4の実施形態]
 第1~第3の実施形態に係るDNN縮約装置では、車両500が置かれている状況や車両500の周囲の状況などを考慮した学習済みDNNモデル10の縮約は行われていない。しかし、車両500の状況に合った縮約後DNNモデル40を生成することが要望されていた。このため、第4の実施形態に係るDNN縮約装置は、車両500の状況に合った縮約後DNNモデル40を生成する。
[Fourth embodiment]
In the DNN reduction devices according to the first to third embodiments, reduction of the trained DNN model 10 is not performed in consideration of the situation where the vehicle 500 is placed, the surrounding situation of the vehicle 500, and the like. However, it has been desired to generate a reduced DNN model 40 suitable for the situation of the vehicle 500. Therefore, the DNN reduction device according to the fourth embodiment generates the reduced DNN model 40 that matches the situation of the vehicle 500.
 そこで、本発明の第4の実施形態に係る自動運転システムの構成例及び動作例について、図11を参照して説明する。
 図11は、第4の実施形態に係るDNN縮約装置100Cを備える自動運転システム1Bの構成例を示すブロック図である。図11において図9と同じ処理を行うブロックには同じ名称と番号を付与しており、特に説明がない限り、同一または類似の機能を有するものとして説明を省略する。
Therefore, a configuration example and an operation example of an automatic driving system according to a fourth embodiment of the present invention will be described with reference to FIG. 11.
FIG. 11 is a block diagram showing a configuration example of an automatic driving system 1B including a DNN condensation device 100C according to the fourth embodiment. In FIG. 11, blocks that perform the same processing as those in FIG. 9 are given the same names and numbers, and unless otherwise specified, descriptions will be omitted as they have the same or similar functions.
 第4の実施形態に係る自動運転システム1Cは、DNN縮約装置100Cと、車両500の自動運転ECU300と、サーバ550とで構成される。 An automatic driving system 1C according to the fourth embodiment includes a DNN reduction device 100C, an automatic driving ECU 300 of a vehicle 500, and a server 550.
 例えば、天候が晴れの時には、カメラ200が撮影した画像は、車両500の前方から遠距離の物体が映り、外界認識部310がこの物体を認識可能である。しかし、天候が雨の時には、カメラ200が撮影した画像には、車両500の前方から近距離の物体であっても背景と識別しづらく、外界認識部310がこの物体を認識できないことがある。 For example, when the weather is clear, the image taken by the camera 200 shows a distant object in front of the vehicle 500, and the external world recognition unit 310 can recognize this object. However, when the weather is rainy, it is difficult to distinguish an object from the background even if it is a short distance from the front of the vehicle 500 in the image taken by the camera 200, and the external world recognition unit 310 may not be able to recognize this object.
 このため、DNN縮約装置100Cは、学習済みDNNモデル10を縮約する際に、車両500の状況(走行中、停車中など)、又は車両500の周辺の状況(渋滞、悪天候など)の情報を得て、縮約前の学習済みDNNモデル10を入れ替えることが可能とする。このDNN縮約装置100Cは、第3の実施形態に係るDNN縮約装置100Bに対して、新たにモデル受信部180、走行状況観測部190を追加した構成とする。 Therefore, when contracting the learned DNN model 10, the DNN reduction device 100C provides information on the situation of the vehicle 500 (running, stopped, etc.) or the situation around the vehicle 500 (traffic jam, bad weather, etc.). It is possible to replace the trained DNN model 10 before reduction. This DNN reduction device 100C has a configuration in which a model reception section 180 and a driving situation observation section 190 are newly added to the DNN reduction device 100B according to the third embodiment.
 走行状況観測部(走行状況観測部190)は、縮約後の多層ニューラルネットワークモデル(縮約後DNNモデル40)が用いられる車両の走行状況を観測し、複数の多層ニューラルネットワークモデル(学習済みDNNモデル10)を保存するサーバ(サーバ550)に対して、走行状況の観測結果を出力する。この走行状況観測部190は、サーバ550と、自動運転ECU300の外界認識部310及び行動計画部330に接続される。走行状況観測部190は、自動運転ECU300の行動計画部330から、車両500の行動計画を受信する。そして、走行状況観測部190は、受信した行動計画に基づいて、車両500の走行状況を観測する。また、走行状況観測部190は、観測した車両500の走行状況を表す走行状況観測結果をサーバ550に送信する。 The driving situation observation unit (driving situation observation unit 190) observes the driving situation of the vehicle in which the reduced multilayer neural network model (reduced DNN model 40) is used, and collects multiple multilayer neural network models (trained DNN model 40). The observation results of the driving situation are output to the server (server 550) that stores the model 10). This driving situation observation section 190 is connected to the server 550, and the external world recognition section 310 and action planning section 330 of the automatic driving ECU 300. Driving situation observation section 190 receives the action plan of vehicle 500 from action planning section 330 of automatic driving ECU 300. The driving situation observation unit 190 then observes the driving situation of the vehicle 500 based on the received action plan. Further, the driving condition observation unit 190 transmits the driving condition observation results representing the observed driving condition of the vehicle 500 to the server 550.
 また、走行状況観測部190は、DNN再学習部150により再学習された縮約後DNNモデル40を、FPS確認部160及び認識精度確認部170を介して受け取ると、外界認識部310に出力する。車両500の走行状況を反映した縮約後DNNモデル40が作成されると、走行状況観測部190は、車両500の走行状況を反映した縮約後DNNモデル40を外界認識部310に出力することもできる。 Further, upon receiving the reduced DNN model 40 retrained by the DNN relearning unit 150 via the FPS confirmation unit 160 and the recognition accuracy confirmation unit 170, the driving situation observation unit 190 outputs it to the external world recognition unit 310. . When the reduced DNN model 40 that reflects the driving situation of the vehicle 500 is created, the driving situation observation unit 190 outputs the reduced DNN model 40 that reflects the driving situation of the vehicle 500 to the external world recognition unit 310. You can also do it.
 サーバ550は、例えば、クラウドサーバであり、DNN縮約装置100Cと無線又は有線通信により、各種のデータを送受信可能である。サーバ550は、不図示のストレージ装置に複数のDNNモデルを保存している。サーバ550が保存するDNNモデルは、車両500の代表的な走行状況に合わせて予め用意されている。 The server 550 is, for example, a cloud server, and is capable of transmitting and receiving various data through wireless or wired communication with the DNN reduction device 100C. The server 550 stores a plurality of DNN models in a storage device (not shown). The DNN model stored by server 550 is prepared in advance according to typical driving conditions of vehicle 500.
 そして、サーバ550は、DNN縮約装置100Cが備える走行状況観測部190から走行状況観測結果を受信すると、受信した走行状況観測結果に基づいてモデル受信部180に送信するDNNモデルを選択する。その後、サーバ550は、選択したモデルをモデル受信部180に送信する。 Then, upon receiving the driving situation observation results from the driving situation observation unit 190 included in the DNN reduction device 100C, the server 550 selects a DNN model to be transmitted to the model receiving unit 180 based on the received driving situation observation results. Thereafter, server 550 transmits the selected model to model receiving section 180.
 サーバ550が選択し、モデル受信部180に送信するDNNモデルは、不図示の学習装置により予め学習されたものが使用される。そして、サーバ550は、走行状況観測部190から受信した走行状況観測結果に基づいて、車両500の走行状況別に学習されたDNNモデルを選択する。例えば、車両500が走行中と停車中では、外界認識部310が認識すべき外界の範囲が異なる場合がある。そこで、サーバ550は、車両500が停車中であれば停車中用のDNNモデルを選択し、車両500が走行中であれば走行中用のDNNモデルを選択し、選択したDNNモデルをモデル受信部180に送信する。 The DNN model selected by the server 550 and transmitted to the model receiving unit 180 is one learned in advance by a learning device (not shown). Then, server 550 selects a DNN model learned for each driving situation of vehicle 500 based on the driving situation observation results received from driving situation observation section 190. For example, the range of the outside world that the outside world recognition unit 310 should recognize may be different when the vehicle 500 is running and when the vehicle 500 is stopped. Therefore, if the vehicle 500 is stopped, the server 550 selects the DNN model for the stopped state, and if the vehicle 500 is running, selects the DNN model for the running state, and transmits the selected DNN model to the model receiving unit. 180.
 モデル受信部(モデル受信部180)は、走行状況の観測結果に基づいてサーバ(サーバ550)から選択される、走行状況に適した多層ニューラルネットワークモデル(学習済みDNNモデル10)を受信する。そして、モデル受信部(モデル受信部180)は、サーバ(サーバ550)から受信した多層ニューラルネットワークモデル(学習済みDNNモデル10)を重要度算出部(重要度算出部110)が読み込む多層ニューラルネットワークモデル(学習済みDNNモデル10)とする。このため、車両500の走行状況に応じた学習済みDNNモデル10を用いて縮約後DNNモデル40が作成されることとなる。 The model receiving unit (model receiving unit 180) receives a multilayer neural network model (trained DNN model 10) suitable for the driving situation, which is selected from the server (server 550) based on the observation results of the driving situation. The model receiving unit (model receiving unit 180) is a multilayer neural network model in which the importance calculation unit (importance calculation unit 110) reads the multilayer neural network model (trained DNN model 10) received from the server (server 550). (trained DNN model 10). Therefore, the reduced DNN model 40 is created using the learned DNN model 10 that corresponds to the driving situation of the vehicle 500.
 以上説明した第4の実施形態に係る自動運転システム1Cでは、車両500の走行状況に応じたDNNモデルがサーバ550により選択され、DNN縮約装置100Cに学習済みDNNモデル10として取り込まれる。そして、DNN縮約装置100Cは、取り込んだ学習済みDNNモデル10に対して所定の処理を行って、縮約後DNNモデル40を作成し、自動運転ECU300に縮約後DNNモデル40を出力する。このため、自動運転ECU300は、車両500の走行状況に合わせて作成された縮約後DNNモデル40を用いて車両500を正確に制御することが可能となる。 In the automatic driving system 1C according to the fourth embodiment described above, a DNN model corresponding to the driving situation of the vehicle 500 is selected by the server 550, and is imported into the DNN reduction device 100C as the learned DNN model 10. Then, the DNN reduction device 100C performs predetermined processing on the learned DNN model 10 that has been imported, creates a reduced DNN model 40, and outputs the reduced DNN model 40 to the automatic driving ECU 300. Therefore, the automatic driving ECU 300 can accurately control the vehicle 500 using the reduced DNN model 40 created according to the driving situation of the vehicle 500.
 また、車両500の走行状況に応じて選択されたDNNモデルにより生成される縮約後DNNモデル40が自動運転ECU300で用いられる。例えば、車両500が走行中に用いられる縮約後DNNモデル40は演算数が多いのに対し、車両500が停車中に用いられる縮約後DNNモデル40は演算数が少ないので、自動運転ECU300の消費電力を削減することもできる。 Further, the reduced DNN model 40 generated by the DNN model selected according to the driving situation of the vehicle 500 is used by the automatic driving ECU 300. For example, the reduced DNN model 40 used while the vehicle 500 is running has a large number of calculations, whereas the reduced DNN model 40 used while the vehicle 500 is stopped has a small number of calculations. Power consumption can also be reduced.
 また、走行状況観測部190は、自動運転ECU300の行動計画部330から行動計画と共に、車両500が受信するGPS(Global Positioning System)情報を受け取って、車両500の現在位置を求めてもよい。走行状況観測部190は、車両500の現在位置が分かれば、この現在位置に合わせた気象情報等を受信可能であるので、サーバ550に走行状況観測結果と共に気象情報を送信してもよい。この場合、サーバ550は、気象情報に合わせてDNNモデルを選択することができる。 Furthermore, the driving situation observation unit 190 may receive the GPS (Global Positioning System) information received by the vehicle 500 together with the action plan from the action planning unit 330 of the automatic driving ECU 300 to determine the current position of the vehicle 500. If the current position of the vehicle 500 is known, the driving condition observation unit 190 can receive weather information tailored to this current position, and therefore may transmit the weather information to the server 550 together with the driving condition observation results. In this case, the server 550 can select a DNN model according to the weather information.
 なお、第4の実施形態に係る自動運転システム1Cの変形例として、モデル受信部180が複数のDNNモデルを予め保持しておき、モデル受信部180が走行状況観測部190から走行状況観測結果を受信する構成としてもよい。このような構成とした場合、モデル受信部180が、走行状況観測結果に基づいて、DNN縮約装置100Cで学習済みDNNモデル10として使用されるDNNモデルを選択してもよい。 In addition, as a modification of the automatic driving system 1C according to the fourth embodiment, the model receiving unit 180 holds a plurality of DNN models in advance, and the model receiving unit 180 receives the driving situation observation results from the driving situation observation unit 190. It may also be configured to receive the information. In such a configuration, the model receiving unit 180 may select a DNN model to be used as the trained DNN model 10 in the DNN reduction device 100C based on the driving situation observation results.
 また、走行状況観測部190は、車両500の走行状況(走行中か停車中)や車両500の周辺状況(渋滞の有無や天候等)を観測している。このため、モデル受信部180がDNNモデルを選択する構成であれば、走行状況観測部190は、走行状況観測部190がサーバ550を介さず、直接、モデル受信部180に走行状況をフィードバックしてもよい。例えば、走行状況観測部190は、アクチュエータ400、センサ、自動運転ECU300等から得られる情報により車両500の実際の走行状況を観測することも可能である。 Additionally, the driving condition observation unit 190 observes the driving condition of the vehicle 500 (running or stopped) and the surrounding conditions of the vehicle 500 (presence of traffic jams, weather, etc.). Therefore, if the model reception unit 180 is configured to select the DNN model, the driving situation observation unit 190 can directly feed back the driving situation to the model reception unit 180 without going through the server 550. Good too. For example, the driving situation observation unit 190 can also observe the actual driving situation of the vehicle 500 based on information obtained from the actuator 400, sensors, automatic driving ECU 300, and the like.
 また、走行状況観測部190は、車両500の走行状況を観測しているので、車両500が故障した場合に、車両500の各センサで検出された情報を走行状況観測結果として、自動運転ECU300から受信してもよい。この場合、車両500の故障モードに合わせたDNNモデルを選択し、DNN縮約装置100Cは、選択されたDNNモデルから縮約後DNNモデル40を生成する。このため、自動運転ECU300は、故障モードに合わせて生成された縮約後DNNモデル40を用いて自動運転の処理を行うことができる。 Furthermore, since the driving condition observation unit 190 observes the driving condition of the vehicle 500, when the vehicle 500 breaks down, the information detected by each sensor of the vehicle 500 is sent to the automatic driving ECU 300 as the driving condition observation result. You may receive it. In this case, a DNN model matching the failure mode of vehicle 500 is selected, and DNN reduction device 100C generates reduced DNN model 40 from the selected DNN model. Therefore, the automatic driving ECU 300 can perform automatic driving processing using the reduced DNN model 40 generated according to the failure mode.
 また、サーバ500は、車両500が故障する前に選択したDNNモデルの良否を事後判断し、どのような走行状況であればDNNモデルを適切に選択できたかを自身で判断したり、ユーザーに判断を委ねたりすることができる。そして、サーバ500は、車両500の故障が発生しにくいDNNモデルを選択して、モデル受信部180にDNNモデルを送信できる。 In addition, the server 500 determines the quality of the DNN model selected before the vehicle 500 breaks down after the fact, and determines by itself or asks the user to determine under what driving conditions the DNN model could have been appropriately selected. You can entrust it to others. Then, the server 500 can select a DNN model in which failure of the vehicle 500 is unlikely to occur, and transmit the DNN model to the model receiving unit 180.
 また、DNN縮約装置100Cは、車両500に車載される形態としてもよい。この場合、車両500の走行状況がリアルタイムで走行状況観測部170により観測される。この結果、車両500の現在の走行状況に合わせたDNNモデルがサーバ550で選択され、DNN縮約装置100Cが、このDNNモデルから縮約後DNNモデル40をリアルタイムで生成することができる。このため、外界認識部310は、車両500の現在の走行状況に合わせた縮約後DNNモデル40をリアルタイムで受信して、外界認識部310が正確に物体を認識することができる。上述したように、モデル受信部180がDNNモデルを選択する構成であれば、走行状況観測部190は、走行状況観測部190がサーバ550を介さず、直接、モデル受信部180に走行状況をフィードバックし、モデル受信部180がDNNモデルを選択してもよい。 Additionally, the DNN reduction device 100C may be mounted on the vehicle 500. In this case, the driving situation of the vehicle 500 is observed in real time by the driving situation observation unit 170. As a result, the server 550 selects a DNN model that matches the current driving situation of the vehicle 500, and the DNN reduction device 100C can generate the reduced DNN model 40 from this DNN model in real time. Therefore, the external world recognition unit 310 can receive the reduced DNN model 40 tailored to the current driving situation of the vehicle 500 in real time, and the external world recognition unit 310 can accurately recognize objects. As described above, if the model receiving unit 180 is configured to select the DNN model, the driving situation observing unit 190 directly feeds back the driving situation to the model receiving unit 180 without going through the server 550. However, the model receiving unit 180 may select the DNN model.
 なお、上述した各実施の形態に係るDNN縮約装置は、DNNを縮約する演算装置の一例として説明した。しかし、DNN以外の多層ニューラルネットワークを縮約する装置に本発明に係る演算装置を適用してもよい。 Note that the DNN reduction device according to each of the embodiments described above has been described as an example of an arithmetic device that reduces a DNN. However, the arithmetic device according to the present invention may be applied to a device that reduces a multilayer neural network other than a DNN.
 また、本発明は上述した各実施形態に限られるものではなく、請求の範囲に記載した本発明の要旨を逸脱しない限りその他種々の応用例、変形例を取り得ることは勿論である。
 例えば、上述した各実施形態は、本発明を分かりやすく説明するために装置及びシステムの構成を詳細かつ具体的に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されない。また、ここで説明した実施形態の構成の一部を他の実施形態の構成に置き換えることは可能であり、さらにはある実施形態の構成に他の実施形態の構成を加えることも可能である。また、各実施形態の構成の一部について、他の構成の追加、削除、置換をすることも可能である。
 また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。
Further, the present invention is not limited to the embodiments described above, and it goes without saying that various other applications and modifications can be made without departing from the gist of the present invention as set forth in the claims.
For example, in each of the embodiments described above, configurations of devices and systems are explained in detail and specifically in order to explain the present invention in an easy-to-understand manner, and the embodiments are not necessarily limited to having all the configurations described. Further, it is possible to replace a part of the configuration of the embodiment described here with the configuration of another embodiment, and furthermore, it is also possible to add the configuration of another embodiment to the configuration of a certain embodiment. Furthermore, it is also possible to add, delete, or replace some of the configurations of each embodiment with other configurations.
Further, the control lines and information lines are shown to be necessary for explanation purposes, and not all control lines and information lines are necessarily shown in the product. In reality, almost all components may be considered to be interconnected.
 1…自動運転システム、10…学習済みDNNモデル、20…各chの重み係数、30…目標縮約率、40…縮約後DNNモデル、50…各層の演算数、100…DNN縮約装置、110…重要度算出部、120…目標縮約率設定部、130…縮約条件設定部、131…層縮約率算出部、132…パラメータ設定部、140…DNN縮約部、150…DNN再学習部、160…FPS確認部、170…認識精度確認部、180…モデル受信部、190…走行状況観測部、300…自動運転ECU、310…外界認識部、320…リスク予測部、330…行動計画部、500…車両 1... Autonomous driving system, 10... Learned DNN model, 20... Weight coefficient of each channel, 30... Target reduction rate, 40... DNN model after reduction, 50... Number of operations in each layer, 100... DNN reduction device, 110...Importance calculation section, 120...Target reduction rate setting section, 130...Reduction condition setting section, 131...Layer reduction rate calculation section, 132...Parameter setting section, 140...DNN reduction section, 150...DNN regeneration Learning section, 160...FPS confirmation section, 170...Recognition accuracy confirmation section, 180...Model reception section, 190...Driving situation observation section, 300...Automatic driving ECU, 310...External world recognition section, 320...Risk prediction section, 330...Action Planning Department, 500...Vehicle

Claims (8)

  1.  複数のニューロンで構成されるチャンネルを入力層、中間層及び出力層ごとに有する多層ニューラルネットワークモデルの前記チャンネルに設定される重み係数を用いて、前記チャンネルの重要度を算出する重要度算出部と、
     前記多層ニューラルネットワークモデルの全体での目標縮約率を設定する目標縮約率設定部と、
     前記重要度及び前記目標縮約率に基づいて、前記多層ニューラルネットワークモデルの各層の縮約率を算出する各層縮約率算出部と、
     前記各層縮約率算出部で算出された前記縮約率に合わせて前記各層を縮約して、縮約後の多層ニューラルネットワークモデルを生成する縮約部と、
     縮約後の多層ニューラルネットワークモデルの再学習を行う再学習部と、を備える
     演算装置。
    an importance calculation unit that calculates the importance of the channel using a weighting coefficient set for the channel of a multilayer neural network model having channels each composed of a plurality of neurons in an input layer, a middle layer, and an output layer; ,
    a target reduction rate setting unit that sets a target reduction rate for the entire multilayer neural network model;
    a layer reduction rate calculation unit that calculates a reduction rate of each layer of the multilayer neural network model based on the importance level and the target reduction rate;
    a reduction unit that reduces each layer according to the reduction rate calculated by the layer reduction rate calculation unit to generate a reduced multilayer neural network model;
    An arithmetic device comprising: a relearning unit that retrains a reduced multilayer neural network model.
  2.  前記重要度算出部は、前記出力層に近い層から順に、後段の前記チャンネルの重要度と、後段の前記チャンネルの重み係数に基づいて、後段の前記チャンネルに接続される前段の前記チャンネルの前記重要度を算出し、
     前記各層縮約率算出部は、前記チャンネルごとに算出される前記重要度の前記各層における重要度に基づいて、前記多層ニューラルネットワークモデルの全体での前記目標縮約率に対する前記各層の目標縮約率を算出する
     請求項1に記載の演算装置。
    The importance calculation unit calculates the importance of the previous channel connected to the subsequent channel, based on the importance of the subsequent channel and the weighting coefficient of the subsequent channel, in order from the layer closest to the output layer. Calculate the importance,
    The layer reduction rate calculation unit calculates a target reduction rate of each layer with respect to the target reduction rate of the entire multilayer neural network model based on the degree of importance in each layer of the degree of importance calculated for each channel. The arithmetic device according to claim 1, which calculates a ratio.
  3.  前記重要度と、前記多層ニューラルネットワークモデルから抽出される前記各層の演算数とをパラメータとして設定するパラメータ設定部を備え、
     前記各層縮約率算出部は、前記パラメータと、前記多層ニューラルネットワークモデルの全体での前記目標縮約率とに基づいて、前記各層の目標縮約率を算出する
     請求項2に記載の演算装置。
    comprising a parameter setting unit that sets the degree of importance and the number of operations for each layer extracted from the multilayer neural network model as parameters;
    The arithmetic device according to claim 2, wherein the layer reduction rate calculation unit calculates the target reduction rate of each layer based on the parameter and the target reduction rate of the entire multilayer neural network model. .
  4.  前記パラメータ設定部は、前記チャンネルごとに算出される前記重要度の寄与度と、前記各層の演算数の寄与度とを前記パラメータとして設定する
     請求項3に記載の演算装置。
    The arithmetic device according to claim 3, wherein the parameter setting unit sets the degree of contribution of the degree of importance calculated for each channel and the degree of contribution of the number of operations of each layer as the parameters.
  5.  再学習された前記縮約後の多層ニューラルネットワークモデルから演算速度を確認する演算速度確認部と、
     再学習された前記縮約後の多層ニューラルネットワークモデルの認識精度を確認する認識精度確認部と、を備え、
     前記パラメータ設定部は、確認された前記演算速度と、目標の演算速度との比較結果、及び確認された前記認識精度と、目標の認識精度との比較結果とに基づいて、前記重要度の寄与度と、前記各層の演算数の寄与度を決定する
     請求項4に記載の演算装置。
    a computation speed confirmation unit that verifies the computation speed from the re-trained reduced multilayer neural network model;
    a recognition accuracy confirmation unit that confirms the recognition accuracy of the re-trained reduced multilayer neural network model,
    The parameter setting unit determines the contribution of the importance level based on a comparison result between the confirmed calculation speed and a target calculation speed, and a comparison result between the confirmed recognition accuracy and the target recognition accuracy. The arithmetic device according to claim 4, wherein the degree of contribution of the number of operations in each layer is determined.
  6.  前記縮約後の多層ニューラルネットワークモデルが用いられる車両の走行状況を観測し、複数の多層ニューラルネットワークモデルを保存するサーバに対して、前記走行状況の観測結果を出力する走行状況観測部と、
     前記走行状況の観測結果に基づいて前記サーバから選択される、前記走行状況に適した前記多層ニューラルネットワークモデルを受信し、前記サーバから受信した前記多層ニューラルネットワークモデルを前記重要度算出部が読み込む前記多層ニューラルネットワークモデルとするモデル受信部と、を備える
     請求項5に記載の演算装置。
    a driving situation observation unit that observes the driving situation of the vehicle in which the reduced multilayer neural network model is used and outputs the observation result of the driving situation to a server that stores a plurality of multilayer neural network models;
    the multilayer neural network model suitable for the driving situation selected from the server based on the observation result of the driving situation, and the importance calculation unit reading the multilayer neural network model received from the server; The arithmetic device according to claim 5, further comprising: a model receiving section that uses a multilayer neural network model.
  7.  前記多層ニューラルネットワークモデルは、ディープ・ニューラル・ネットワークモデルである
     請求項2に記載の演算装置。
    The arithmetic device according to claim 2, wherein the multilayer neural network model is a deep neural network model.
  8.  複数のニューロンで構成されるチャンネルを入力層、中間層及び出力層ごとに有する多層ニューラルネットワークモデルの前記チャンネルに設定される重み係数を用いて、前記チャンネルの重要度を算出する処理と、
     前記多層ニューラルネットワークモデルの全体での目標縮約率を設定する処理と、
     前記重要度及び前記目標縮約率に基づいて、前記多層ニューラルネットワークモデルの各層の縮約率を算出する処理と、
     前記縮約率になるように前記各層を縮約する処理と、
     縮約後の多層ニューラルネットワークモデルで再学習をする処理と、を含む
     演算方法。
    A process of calculating the importance of the channel using a weighting coefficient set for the channel of a multilayer neural network model having a channel composed of a plurality of neurons for each input layer, intermediate layer, and output layer;
    a process of setting a target reduction rate for the entire multilayer neural network model;
    a process of calculating a reduction rate of each layer of the multilayer neural network model based on the importance level and the target reduction rate;
    A process of reducing each of the layers to achieve the reduction rate;
    A calculation method that includes relearning using a reduced multilayer neural network model.
PCT/JP2022/025251 2022-06-24 2022-06-24 Computation device and computation method WO2023248454A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/025251 WO2023248454A1 (en) 2022-06-24 2022-06-24 Computation device and computation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/025251 WO2023248454A1 (en) 2022-06-24 2022-06-24 Computation device and computation method

Publications (1)

Publication Number Publication Date
WO2023248454A1 true WO2023248454A1 (en) 2023-12-28

Family

ID=89379324

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/025251 WO2023248454A1 (en) 2022-06-24 2022-06-24 Computation device and computation method

Country Status (1)

Country Link
WO (1) WO2023248454A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200311552A1 (en) * 2019-03-25 2020-10-01 Samsung Electronics Co., Ltd. Device and method for compressing machine learning model
JP2020190996A (en) * 2019-05-23 2020-11-26 沖電気工業株式会社 Neural network weight reducing device, neural network weight reducing method, and program
WO2021157067A1 (en) * 2020-02-07 2021-08-12 株式会社日立ハイテク Learning processing device and method
CN113837378A (en) * 2021-09-06 2021-12-24 广东工业大学 Convolutional neural network compression method based on agent model and gradient optimization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200311552A1 (en) * 2019-03-25 2020-10-01 Samsung Electronics Co., Ltd. Device and method for compressing machine learning model
JP2020190996A (en) * 2019-05-23 2020-11-26 沖電気工業株式会社 Neural network weight reducing device, neural network weight reducing method, and program
WO2021157067A1 (en) * 2020-02-07 2021-08-12 株式会社日立ハイテク Learning processing device and method
CN113837378A (en) * 2021-09-06 2021-12-24 广东工业大学 Convolutional neural network compression method based on agent model and gradient optimization

Similar Documents

Publication Publication Date Title
CN107697070B (en) Driving behavior prediction method and device and unmanned vehicle
CN111507460B (en) Method and apparatus for detecting parking space in order to provide automatic parking system
CN107491072B (en) Vehicle obstacle avoidance method and device
CN110874564B (en) Method and device for detecting vehicle line by classifying vehicle line post-compensation pixels
JP6931937B2 (en) A learning method and learning device that uses human driving data as training data to perform customized route planning by supporting reinforcement learning.
CN109711557B (en) Driving track prediction method, computer equipment and storage medium
CN110850861A (en) Attention-based hierarchical lane change depth reinforcement learning
CN110850854A (en) Autonomous driver agent and policy server for providing policies to autonomous driver agents
US20230237792A1 (en) Object detection apparatus using an image preprocessing artificial neural network model
US20030007682A1 (en) Image recognizing apparatus and method
JP6941386B2 (en) Methods and devices for providing autonomous driving safety
KR20170140214A (en) Filter specificity as training criterion for neural networks
CN110263628B (en) Obstacle detection method, obstacle detection device, electronic apparatus, and storage medium
US11921817B2 (en) Unsupervised training of a video feature extractor
CN111353599A (en) Correctness preserving optimization for deep neural networks
CN111680730A (en) Method and device for generating geographic fence, computer equipment and storage medium
CN111507152A (en) Method and device for converting automatic driving mode based on built-in independent prediction
US11703874B2 (en) System and method for collection of performance data by a vehicle
US20210213977A1 (en) Nearby Driver Intent Determining Autonomous Driving System
WO2023248454A1 (en) Computation device and computation method
CN112904852B (en) Automatic driving control method and device and electronic equipment
US11860627B2 (en) Image processing apparatus, vehicle, control method for information processing apparatus, storage medium, information processing server, and information processing method for recognizing a target within a captured image
CN114761185A (en) Robot and method for controlling robot
CN112380918A (en) Road vehicle state identification method and device, electronic equipment and storage medium
US20210383202A1 (en) Prediction of future sensory observations of a distance ranging device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22948015

Country of ref document: EP

Kind code of ref document: A1