[go: up one dir, main page]

WO2020044407A1 - Learning device, learning method, and learning program - Google Patents

Learning device, learning method, and learning program Download PDF

Info

Publication number
WO2020044407A1
WO2020044407A1 PCT/JP2018/031585 JP2018031585W WO2020044407A1 WO 2020044407 A1 WO2020044407 A1 WO 2020044407A1 JP 2018031585 W JP2018031585 W JP 2018031585W WO 2020044407 A1 WO2020044407 A1 WO 2020044407A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
learning
weight
inference
storage unit
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2018/031585
Other languages
French (fr)
Japanese (ja)
Inventor
誠也 柴田
芙美代 鷹野
竹中 崇
浩明 井上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to PCT/JP2018/031585 priority Critical patent/WO2020044407A1/en
Publication of WO2020044407A1 publication Critical patent/WO2020044407A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 a learning device, a learning method, and a learning program.
  • the learning data is data used for learning the discriminant model.
  • machine learning for example, parameters of arithmetic expressions and discriminants used in a predetermined learning device are adjusted based on the relationship between input and output indicated by the learning data.
  • the learning device is, for example, a discrimination model that performs discrimination regarding one or a plurality of labels when data is input.
  • Non-Patent Document 1 discloses an example of a learning computation circuit and a learning method for efficiently executing deep learning of a neural network, particularly with low power consumption. Has been described.
  • Non-Patent Document 2 in deep learning in CNN (Convolutional Neural Network), a learning range is divided into a plurality of convolutional layers into a layer in which the weight is fixed and a layer in which the weight is updated (extended function layer). An example of a learning method for shortening the learning time by restricting the learning time is described.
  • Non-Patent Document 3 describes an optimization example of an accelerator design based on an FPGA (Field-Programmable ⁇ Gate ⁇ Array ⁇ ) as an example of a circuit configuration for learning operation in machine learning.
  • FPGA Field-Programmable ⁇ Gate ⁇ Array ⁇
  • FIG. 10 is an explanatory diagram showing an example of a general learning method and a circuit configuration for learning in a neural network including one or more intermediate layers between an input layer and an output layer.
  • the large-scale learning circuit 70 learns the entire neural network as a predetermined discriminant model in order to support a learning algorithm for general use.
  • the speech balloon attached to the large-scale learning circuit 70 shown in FIG. 10 schematically describes the processing direction and the processing range in the learning process of the neural network.
  • a unit 71 corresponding to a neuron in the neural network is represented by an ellipse.
  • the line segment 72 (the line connecting the units 71 shown in FIG. 10) represents the connection between the units 71. Further, an arrow 73 (a rightward thick line arrow shown in FIG. 10) indicates an inference process and a range of the inference process. An arrow 74 (a thick left arrow shown in FIG. 10) indicates a parameter update process and a range of the parameter update process.
  • the parameter update process is an example of a learning process.
  • FIG. 10 shows an example of a feedforward neural network in which the input to each unit 71 is the output of the unit 71 in the preceding layer.
  • the input to each unit 71 may include the output of the unit 71 in the previous layer at the previous time, as in a recurrent neural network.
  • the direction of the inference processing is also considered to be the direction from the input layer to the output layer (forward direction). It is.
  • the input to each unit 71 is not limited to the above example.
  • the inference processing performed in a predetermined order from the input layer is also called “forward propagation”.
  • the direction of the parameter update processing is not particularly limited.
  • the direction of the parameter update process may be a direction (reverse direction) from the output layer to the input layer.
  • the parameter updating process shown in FIG. 10 is an example of a process executed by the back propagation method.
  • the parameter update processing is not limited to the processing executed by the back propagation method.
  • the parameter update processing may be executed by STDP (Spike ⁇ Timing ⁇ Dependent ⁇ Plasticity ⁇ ).
  • model learning methods in deep learning include the following learning methods. First, after inputting learning data to the input layer, an inference process of calculating the output of each unit 71 in the forward direction in each layer up to the output layer is performed (forward propagation: see the arrow 73 shown in FIG. 10).
  • a parameter used to calculate the output of each unit 71 in the layer is determined.
  • a parameter update process for updating is performed (back propagation: see arrow 74 shown in FIG. 10). As shown in FIG. 10, the parameter update processing is performed by following each layer from the output layer to the first layer in the reverse direction. The parameter updating process is performed so that the calculated error is minimized.
  • the output of each unit 71 in all the layers (first to n-th layers) subsequent to the input layer is calculated by the parameter updating process.
  • the parameters used for updating are updated.
  • the parameter to be updated is, for example, the weight of the connection between the units 71 that connects each unit 71 in the layer and the unit 71 in another layer.
  • FIG. 10 shows a large-scale learning circuit 70 that performs the above-described inference processing and parameter updating processing with high calculation accuracy as an example of realizing an arithmetic circuit that performs learning.
  • FIG. 11 is an explanatory diagram showing an example of input / output of the unit 71 and connection with another unit 71 when focusing on one unit 71.
  • FIG. 11A shows an example of input / output of one unit 71.
  • FIG. 11B shows an example of a connection between the units 71 arranged in two layers.
  • f () in Expression (1A) represents an activation function.
  • a in the formula (1B) represents an intercept.
  • w 1 to w 4 in the equation (1B) represent parameters such as weights corresponding to the respective inputs (x 1 to x 4 ).
  • the intercept a in the equation (2B) can be regarded as a coefficient of a constant term having a value of 1 (that is, one of the parameters).
  • the intercept a is omitted.
  • k in the expression (2C) represents an input to each unit 71 in the layer, more specifically, an identifier of another unit 71 that performs the input.
  • L in Equation (2D) represents a layer identifier.
  • w i, k in Expression (2D) represents a parameter of each unit i in the L-th layer. More specifically, w i, k corresponds to the weight of the connection between each unit i and another unit k (connection between units 71).
  • the calculation in which a certain unit 71 calculates the output z from the input x corresponds to the inference processing in the unit 71.
  • parameters for example, weight w
  • the inference process is, for example, a process performed by an operating monitoring system or the like to determine whether an object in an image is a specific object.
  • the calculation for obtaining the parameters of the unit 71 corresponds to the parameter updating process in the unit 71.
  • FIG. 12 shows an example of an inference apparatus that performs inference processing.
  • FIG. 12 is a block diagram illustrating a configuration example of a general inference apparatus.
  • the inference device 80 illustrated in FIG. 12 includes a weight memory 81, a weight load unit 82, and a calculation unit 83.
  • the weight memory 81 has a function of storing the weight matrix W.
  • the weight loading unit 82 has a function of loading the weight matrix W stored in the weight memory 81 from the weight memory 81.
  • the weight loading unit 82 inputs the loaded weight matrix W to the calculation unit 83.
  • the calculation unit 83 has a function of performing the above inference processing using the input weight matrix W.
  • FIG. 13 shows an example of a learning device that performs a parameter updating process.
  • FIG. 13 is a block diagram illustrating a configuration example of a general learning device.
  • the learning device 90 illustrated in FIG. 13 includes a weight memory 91, a weight load unit 92, a calculation unit 93, and a weight storage unit 94.
  • the weight memory 91 has a function of storing the weight matrix W.
  • the weight loading unit 92 has a function of loading the weight matrix W stored in the weight memory 91 from the weight memory 91.
  • the weight load unit 92 inputs the loaded weight matrix W to the calculation unit 93.
  • the calculation unit 93 has a function of performing the above-described parameter update processing using the input weight matrix W.
  • the operation unit 93 inputs the weight matrix W updated in the parameter update process to the weight storage unit 94.
  • the weight storage unit 94 has a function of writing the weight matrix W updated by the calculation unit 93 into the weight memory 91.
  • the weight storage unit 94 updates the weight matrix W stored in the weight memory 91 to the input weight matrix W.
  • the weight storage unit 94 may have a function of temporarily storing the weight matrix W.
  • Non-Patent Documents 1 to 3 do not describe a method of executing inference processing and learning processing in parallel.
  • an object of the present invention is to provide a learning device, a learning method, and a learning program that can solve the above-described problem and can execute inference processing and learning processing in parallel.
  • the learning apparatus is used in an inference process of calculating an output for discrimination data of each unit of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order.
  • a first storage unit for storing the parameters of each unit, and a second storage unit for storing parameters to be updated in a learning process of updating at least a part of the parameters of each unit based on an output of each unit for learning data And characterized in that:
  • the learning method according to the present invention is used in the inference process of calculating the output for the discriminating data of each unit of the discriminating model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order.
  • the parameters of the units are respectively stored in the first storage unit, and the parameters to be updated in the learning process of updating at least a part of the parameters of each unit based on the output of the learning data of each unit are stored in the second storage unit. It is characterized by making it.
  • the learning program according to the present invention is an inference process in which a computer calculates, in a predetermined order, outputs for discrimination data of each unit of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner.
  • Parameters to be updated in a first storage process for storing parameters of each unit to be used in the first storage unit and a learning process for updating at least a part of parameters of each unit based on an output of each unit for learning data. Is stored in the second storage unit.
  • the inference processing and the learning processing can be executed in parallel.
  • FIG. 1 is a block diagram illustrating a configuration example of a first embodiment of a learning device according to the present invention.
  • FIG. 3 is a block diagram illustrating a configuration example of a calculation unit 140.
  • FIG. 4 is a block diagram showing another configuration example of the first embodiment of the learning device according to the present invention. It is a flowchart which shows the operation
  • FIG. 3 is an explanatory diagram illustrating an example of a hardware configuration of a learning device according to the present invention. It is a block diagram showing the outline of the learning device by the present invention.
  • FIG. 3 is an explanatory diagram showing an example of a general learning method and a circuit configuration for learning in a neural network including one or more intermediate layers between an input layer and an output layer.
  • FIG. 7 is an explanatory diagram showing an example of input / output of the unit 71 and coupling with another unit 71 when focusing on one unit 71.
  • It is a block diagram showing an example of composition of a general inference device. It is a block diagram showing an example of composition of a general learning device.
  • FIG. 1 is a block diagram illustrating a configuration example of a first embodiment of a learning device according to the present invention.
  • the learning device 100 includes an inference weight memory 110, an updating weight memory 120, a weight load selection unit 130, a calculation unit 140, a weight storage unit 150, and a weight update control unit 160. , A weight copy unit 170 and a control unit 180.
  • the learning device 100 may have a plurality of weight memories as a solution.
  • the function of each component of the learning device 100 that performs the inference process and the learning process in parallel will be described.
  • the inference weight memory 110 has a function of storing a weight matrix W (parameter group) used for inference processing.
  • the updating weight memory 120 has a function of storing the weight matrix W used for the learning process.
  • the weight load selection unit 130 has a function of loading the weight matrix W from one of the inference weight memory 110 and the updating weight memory 120. When the inference processing is performed, the weight load selection unit 130 loads the weight matrix W from the inference weight memory 110.
  • the weight load selecting unit 130 loads the weight matrix W from the updating weight memory 120.
  • the weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.
  • the operation unit 140 has a function of performing the above inference processing using the weight matrix W loaded from the inference weight memory 110.
  • the arithmetic unit 140 has a function of performing the above-described learning process using the weight matrix W loaded from the updating weight memory 120. That is, since different weight matrices W are used, the arithmetic unit 140 can execute inference processing and learning processing in parallel.
  • the arithmetic unit 140 calculates in a predetermined order the output for the discriminating data of each unit 71 of the discriminating model in which a plurality of layers each composed of one or more units 71 are combined in a layered manner. Execute the process.
  • the inference weight memory 110 stores the weight (weight matrix W) of each unit 71 used in the inference processing.
  • the weight of each unit 71 is a parameter of each unit 71 in the present embodiment.
  • the discrimination model is, for example, a neural network.
  • the arithmetic unit 140 executes a learning process of updating at least a part of the weight of each unit 71 based on the output of each unit 71 for the learning data.
  • the updating weight memory 120 stores the update target weight (weight matrix W) in the learning process.
  • the weight load selector 130 loads the weight from the inference weight memory 110 or the updating weight memory 120.
  • the operation unit 140 performs inference processing or learning processing using the loaded weights.
  • the operation unit 140 inputs the weight matrix W updated in the learning process to the weight storage unit 150.
  • the weight storage unit 150 has a function of writing the weight matrix W updated by the arithmetic unit 140 into the updating weight memory 120.
  • the weight storage unit 150 updates the weight matrix W stored in the updating weight memory 120 to the input weight matrix W.
  • the weight storage unit 150 may have a function of temporarily storing the weight matrix W.
  • the weight storage unit 150 stores the update target weight (weight matrix W) of each unit 71 in the learning process in the updating weight memory 120.
  • the weight storage unit 150 stores the weight matrix W in the updating weight memory 120, so that the updated learning matrix W is used in the next learning process.
  • the arithmetic unit 140 When the learning is completed, the arithmetic unit 140 notifies the weight update control unit 160 that the learning is completed. Upon receiving the notification, the weight update control unit 160 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and copies the weight matrix W stored in the inference weight memory 110. The weight copy unit 170 is instructed to replace the weight matrix W.
  • the weight copy unit 170 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and is copied with the weight matrix W stored in the inference weight memory 110. Replace the weight matrix W.
  • the case where the learning is completed is a case where a learning process including a weight update process using a predetermined number of learning data is repeatedly executed a predetermined number of times.
  • the weight copy unit 170 updates the weight stored in the inference weight memory 110 to the update target weight stored in the updating weight memory 120 corresponding to the weight.
  • the weight copy unit 170 stores the weight (weight matrix W) of each unit 71 used in the inference processing in the inference weight memory 110.
  • the weighted copy unit 170 stores the weight matrix W in the weight memory 110 for inference, so that inference processing after learning is completed uses the learned model.
  • the control unit 180 has a function of controlling the weight load selection unit 130, the calculation unit 140, and the weight update control unit 160.
  • the control unit 180 notifies the weight load selection unit 130 and the calculation unit 140 which of the inference process and the learning process is to be executed based on the type of the input image.
  • control unit 180 When the learning is completed, the control unit 180 notifies the weight update control unit 160 via the arithmetic unit 140 that the learning is completed.
  • FIG. 2 is a block diagram showing a configuration example of the arithmetic unit 140.
  • the arithmetic unit 140 includes an inference weight register 141, an updating weight register 142, an arithmetic unit weight load selection unit 143, an arithmetic unit 144, and an arithmetic unit weight storage unit 145.
  • the learning device 100 includes a plurality of arithmetic units corresponding to each unit 71.
  • the inference weight register 141 has a function of storing the weight w of the unit 71 corresponding to the operation unit 140 in the weight matrix W input from the operation unit 140 and loaded from the inference weight memory 110.
  • the updating weight register 142 has a function of storing the weight w of the unit 71 corresponding to the arithmetic unit 140, of the weight matrix W input from the arithmetic unit 140 and loaded from the updating weight memory 120.
  • the arithmetic unit weight load selection unit 143 has a function of loading the weight w from one of the inference weight register 141 and the updating weight register 142. When the inference processing is performed, the arithmetic unit weight load selector 143 loads the weight w from the inference weight register 141.
  • the arithmetic unit weight load selector 143 loads the weight w from the updating weight register 142.
  • the computing unit weight load selection unit 143 inputs the loaded weight w to the computing unit 144.
  • the arithmetic unit 144 has a function of performing the above-described inference processing operation using the weight w loaded from the inference weight register 141.
  • the arithmetic unit 144 has a function of performing the above-described arithmetic operation for the learning process using the weight w loaded from the updating weight register 142.
  • the arithmetic unit 144 inputs the weight w updated through the operation for the learning process to the arithmetic unit weight storage unit 145.
  • the arithmetic unit weight storage unit 145 has a function of updating the weight w stored in the updating weight register 142 to the input weight w.
  • the arithmetic unit 140 shown in FIG. 2 is an inference weight register 141 that stores a parameter (weight w) of the unit 71 corresponding to the arithmetic unit 140 used in the inference process, and is an update target in the learning process.
  • An updating weight register 142 that stores a parameter (weight w) of the unit 71 corresponding to the arithmetic unit 140.
  • the inference weight register 141 and the updating weight register 142 may store one column or the like of the weight matrix W instead of one weight w.
  • the arithmetic unit 140 includes the inference weight register 141 and the updating weight register 142, the number of times the weight matrix W is read from the inference weight memory 110 and the updating weight memory 120 is reduced. That is, since the power consumed for reading is reduced, the cost for switching between the inference processing and the learning processing is reduced.
  • the configuration of the calculation unit 140 of the present embodiment may be a configuration other than the configuration illustrated in FIG.
  • the arithmetic unit 140 may have only one register that stores the weight w of the unit 71 corresponding to the arithmetic unit 140 in the input weight matrix W.
  • the weight load selecting unit 130 loads the weight matrix W from the inference weight memory 110 or the updating weight memory 120 according to the process to be executed.
  • FIG. 3 is a block diagram showing another configuration example of the first embodiment of the learning device according to the present invention.
  • the learning device 101 illustrated in FIG. 3 includes the components included in the learning device 100 illustrated in FIG. 1 and a fixed-layer weight memory 190.
  • a layer close to the input layer that is, a shallow layer has a feature that the parameter does not largely change even if the parameter update processing is performed a plurality of times.
  • the fixed-layer weight memory 190 When the parameter (weight in this example) used to calculate the output of each unit 71 in some of the first to n-th layers is fixed, the fixed-layer weight memory 190 is fixed. The weight matrix related to the weight is stored. In addition, the inference weight memory 110 and the updating weight memory 120 store weight matrices for weights that are not fixed.
  • the weight load selection unit 130 shown in FIG. 3 loads the weight matrices from the inference weight memory 110 and the fixed-layer weight memory 190, respectively.
  • FIG. 4 is a flowchart illustrating an operation of an inference process and a learning process performed by the learning device 100 according to the first embodiment.
  • an image is input to the control unit 180 of the learning device 100 (Step S101).
  • the control unit 180 determines the type of the input image (Step S102).
  • control unit 180 determines that the process to be executed is a learning process by the weight load selecting unit 130 and the arithmetic unit 140. Is notified (step S103).
  • step S103 the control unit 180 inputs the input learning image to the calculation unit 140.
  • the control unit 180 inputs predetermined input data obtained from the learning image, such as the feature amount of the learning image extracted by the unit 71 of the previous layer, to the arithmetic unit 140.
  • the weight load selector 130 loads the weight matrix W from the updating weight memory 120 (step S104).
  • the weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.
  • the arithmetic unit 140 performs a learning process using the loaded weight matrix W (step S105).
  • the calculation unit 140 inputs the weight matrix W updated in the learning process to the weight storage unit 150.
  • the weight storage unit 150 updates the weight matrix W stored in the updating weight memory 120 to the weight matrix W updated in the learning process (step S106).
  • control unit 180 determines whether the learning has been completed (step S107). If it is determined that the learning has not been completed (No in step S107), the learning device 100 ends the learning process on the input learning image.
  • Step S107 If it is determined that the learning has been completed (Yes in Step S107), the control unit 180 notifies the weight update control unit 160 via the arithmetic unit 140 that the learning has been completed. Next, the weight update control unit 160 activates the weight copy unit 170 (Step S108).
  • the weight copy unit 170 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and the weight matrix W stored in the inference weight memory 110 and the copied weight matrix. W is replaced (step S109). After the replacement, the learning device 100 ends the learning process on the input learning image.
  • control unit 180 determines that the process to be executed is the inference process by the weight load selection unit 130 and the arithmetic unit 140. (Step S110).
  • step S110 the control unit 180 inputs the input determination image to the calculation unit 140.
  • the control unit 180 inputs predetermined input data obtained from the discrimination image, such as the feature amount of the discrimination image extracted by the unit 71 of the previous layer, to the calculation unit 140.
  • the weight load selecting unit 130 loads the weight matrix W from the inference weight memory 110 (Step S111).
  • the weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.
  • the weight load selection unit 130 of the learning device 101 shown in FIG. 3 also loads a weight matrix from the fixed-layer weight memory 190 in step S111.
  • the arithmetic unit 140 performs an inference process using the loaded weight matrix W (step S112). After executing the inference processing, the learning device 100 ends the inference processing on the input determination image. Note that the learning device 100 may collectively execute inference processing on a plurality of determination images.
  • the learning device 100 can execute the inference process and the learning process illustrated in FIG. 4 in parallel. Therefore, the weight load selection unit 130 may load the weight matrix W obtained from the weight memory when the process to be executed is switched.
  • the timing at which the weight load selector 130 loads the weight matrix W is not particularly limited.
  • the learning device 100 of the present embodiment includes an inference weight memory 110 and an updating weight memory 120. Therefore, even while the weight matrix W stored in the updating weight memory 120 is being updated, the calculation unit 140 performs the inference process using the weight matrix W stored in the inference weight memory 110. I can do it.
  • the learning apparatus 100 includes the weight memory 110 for inference and the weight memory 120 during updating, the weight matrix W for inference processing is maintained in a highly reliable state. That is, the learning device 100 can execute the inference process and the learning process in parallel.
  • FIG. 5 is a block diagram illustrating a configuration example of a second embodiment of the learning device according to the present invention.
  • the learning device 200 includes a first weight memory 210, a second weight memory 220, a weight load selector 230, a calculator 240, a weight store selector 250, and a weight update controller 260. And a control unit 270.
  • the learning device 200 may have a plurality of weight memories as a solution.
  • the roles of the plurality of weight memories are not fixed.
  • the learning device 200 has a configuration in which the roles of a plurality of weight memories are interchangeable.
  • the function of each component of the learning device 200 that performs the inference process and the learning process in parallel will be described.
  • the first weight memory 210 and the second weight memory 220 have a function of storing a weight matrix W used for inference processing or learning processing.
  • the weight load selection unit 230 has a function of loading the weight matrix W from one of the first weight memory 210 and the second weight memory 220.
  • the weight load selection unit 230 holds a memory address of a weight memory in which a weight matrix W for inference processing is stored and a memory address of a weight memory in which a weight matrix W for learning processing is stored.
  • the held memory address is a memory address of either the first weight memory 210 or the second weight memory 220.
  • the weight load selection unit 230 loads the weight matrix W for inference processing from either the first weight memory 210 or the second weight memory 220 according to the stored memory address.
  • the weight load selecting unit 230 loads the weight matrix W for learning processing from either the first weight memory 210 or the second weight memory 220.
  • the weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.
  • the operation unit 240 has the same function as the operation unit 140 of the first embodiment. Note that the configuration of the calculation unit 240 of the present embodiment may be the configuration shown in FIG.
  • the weight store selection unit 250 has a function of updating the weight matrix W stored in the first weight memory 210 or the second weight memory 220 with the input weight matrix W.
  • the weight store selection unit 250 holds a memory address of a weight memory in which a weight matrix W for inference processing is stored and a memory address of a weight memory in which a weight matrix W for learning processing is stored.
  • the weight store selection unit 250 updates the weight matrix W stored in the first weight memory 210 or the second weight memory 220 to the input weight matrix W according to the stored memory address.
  • the arithmetic unit 240 When the learning is completed, the arithmetic unit 240 notifies the weight update control unit 260 that the learning has been completed. Upon receiving the notification, the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to exchange the role of the held memory address.
  • the weight update control unit 260 treats the memory address of the weight memory in which the weight matrix W for inference processing is stored as the memory address of the weight memory in which the weight matrix W for learning processing is stored. To instruct.
  • the weight update control unit 260 instructs to treat the memory address of the weight memory storing the weight matrix W for the learning process as the memory address of the weight memory storing the weight matrix W for the inference process. I do.
  • the case where the learning is completed is a case where a learning process including a weight update process using a predetermined number of learning data is repeatedly executed a predetermined number of times.
  • the weight update control unit 260 instructs the weight load selection unit 230 to load the weight used in the inference process from the weight memory in which the weight matrix W for the learning process is stored. I have.
  • the weight update control unit 260 instructs the weight load selection unit 230 to load the update target weight in the learning process from the weight memory storing the weight matrix W for the inference process. are doing. Therefore, the weight copy unit 170 of the first embodiment is unnecessary in the learning device 200 of the present embodiment.
  • weight load selection unit 230 and the weight store selection unit 250 receive from the weight update control unit 260 an instruction to switch the role of the memory address in advance before the learning is completed, and at a predetermined timing such as after the learning is completed, Roles may be switched.
  • the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to change the memory address of the role exchange destination before learning is completed. May be notified in advance.
  • the control unit 270 has the same function as the control unit 180 of the first embodiment.
  • FIG. 6 is a block diagram showing another configuration example of the learning apparatus according to the second embodiment of the present invention.
  • the learning device 201 illustrated in FIG. 6 includes the components included in the learning device 200 illustrated in FIG. 5 and a fixed-layer weight memory 280.
  • the learning device 201 of the present embodiment also does not need to update all parameters (weights in this example) used for calculating the output of each unit 71 in the parameter update processing (learning processing).
  • the fixed layer weight memory 280 stores a weight matrix related to fixed weights. Further, the first weight memory 210 and the second weight memory 220 store weight matrices for weights that are not fixed.
  • FIG. 7 is a flowchart illustrating an operation of an inference process and a learning process performed by the learning device 200 according to the second embodiment.
  • Step S201 an image is input to the control unit 270 of the learning device 200 (Step S201).
  • the control unit 270 determines the type of the input image (Step S202).
  • control unit 270 determines that the process to be executed is a learning process by the weight load selection unit 230 and the arithmetic unit 240. Is notified (step S203).
  • step S203 the control unit 270 inputs the input learning image to the calculation unit 240.
  • the control unit 270 inputs predetermined input data obtained from the learning image, such as the feature amount of the learning image extracted by the unit 71 of the previous layer, to the arithmetic unit 240.
  • the weight load selection unit 230 loads the weight matrix W from the weight memory in which the weight matrix W for the learning process is stored (Step S204).
  • the weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.
  • the arithmetic unit 240 performs a learning process using the loaded weight matrix W (step S205).
  • the calculation unit 240 inputs the weight matrix W updated in the learning process to the weight store selection unit 250.
  • the weight store selection unit 250 updates the weight matrix W for the learning process stored in the weight memory with the weight matrix W updated in the learning process (step S206).
  • control unit 270 determines whether or not the learning has been completed (step S207). If it is determined that the learning has not been completed (No in step S207), the learning device 200 ends the learning process on the input learning image.
  • control unit 270 When it is determined that the learning has been completed (Yes in step S207), the control unit 270 notifies the weight update control unit 260 via the arithmetic unit 240 that the learning has been completed.
  • the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to exchange the role of the stored memory address (step S208).
  • the weight load selector 230 and the weight store selector 250 swap the roles of the stored memory addresses (step S209). After the replacement, the learning device 200 ends the learning process on the input learning image.
  • control unit 270 determines that the process to be executed is the inference process by the weight load selection unit 230 and the arithmetic unit 240. (Step S210).
  • step S210 the control unit 270 inputs the input determination image to the calculation unit 240.
  • the control unit 270 inputs predetermined input data obtained from the discrimination image, such as the feature amount of the discrimination image extracted by the unit 71 of the previous layer, to the calculation unit 240.
  • the weight load selection unit 230 loads the weight matrix W from the weight memory storing the weight matrix W for inference processing (step S211).
  • the weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.
  • the weight load selector 230 of the learning device 201 shown in FIG. 6 also loads the weight matrix from the fixed-layer weight memory 280 in the process of step S211.
  • the calculation unit 240 performs an inference process using the loaded weight matrix W (step S212). After executing the inference processing, the learning device 200 ends the inference processing on the input discriminating image. Note that the learning device 200 may collectively execute inference processing on a plurality of determination images.
  • the learning device 200 can execute the inference process and the learning process illustrated in FIG. 7 in parallel. Therefore, the weight load selection unit 230 may load the weight matrix W obtained from the weight memory when the process to be executed is switched.
  • the timing at which the weight load selector 230 loads the weight matrix W is not particularly limited.
  • the learning device 200 of the present embodiment includes a first weight memory 210 and a second weight memory 220. Therefore, for example, even while the weighting matrix W for learning processing stored in the first weight memory 210 is being updated, the arithmetic unit 240 performs the processing for inference processing stored in the second weight memory 220. Inference processing can be performed using the weight matrix W. That is, the learning device 200 can execute the inference process and the learning process in parallel.
  • the learning device 200 of the present embodiment can update the weight matrix W for inference processing to the learned weight matrix W without using the weight copy unit 170 of the first embodiment. That is, the learning device 200 can use the learned weight matrix W more quickly than in the first embodiment.
  • FIG. 8 is an explanatory diagram showing an example of a hardware configuration of the learning device according to the present invention.
  • the learning device illustrated in FIG. 8 includes a processor 108, a main storage device 102, an auxiliary storage device 103, an interface 104, an output device 105, and an input device 106. Further, the processor 108 may include various arithmetic and processing devices such as the CPU 109 and the GPU 107.
  • the operation of the learning device may be stored in the auxiliary storage device 103 in the form of a program.
  • the CPU 109 reads the program from the auxiliary storage device 103, expands the program in the main storage device 102, and executes a predetermined process in the learning device according to the expanded program.
  • the CPU 109 is an example of an information processing device that operates according to a program.
  • the learning device may include, for example, an MPU (Micro Processing Unit), an MCU (Memory Control Unit), or a GPU (Graphics Processing Unit) in addition to the CPU (Central Processing Unit).
  • FIG. 8 illustrates an example in which the learning apparatus further includes a GPU 107 in addition to the CPU 109.
  • the auxiliary storage device 103 is an example of a non-transitory tangible medium.
  • Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory) connected via the interface 104, A semiconductor memory and the like are included.
  • the distributed learning device stores the distributed program in the main storage.
  • the processing may be developed on the device 102 and a predetermined process may be executed.
  • the program may be for realizing a part of a predetermined process in the learning device. Further, the program may be a difference program for implementing a predetermined process in the learning device, which is used in combination with another program already stored in the auxiliary storage device 103.
  • the interface 104 transmits and receives information to and from other devices.
  • the output device 105 presents information to a user. Further, the input device 106 receives input of information from a user.
  • some elements shown in FIG. 8 can be omitted depending on the processing content in the learning device. For example, if the learning device does not present information to the user, the output device 105 can be omitted. Also, for example, if the learning device does not accept information input from the user, the input device 106 can be omitted.
  • circuitry general-purpose or special-purpose circuits (Circuitry), processors, and the like, and combinations thereof. These may be constituted by a single chip, or may be constituted by a plurality of chips connected via a bus. In addition, some or all of the above-described components may be realized by a combination of the above-described circuit and the like and a program.
  • the plurality of information processing devices or circuits may be centrally arranged or distributed.
  • the information processing device, the circuit, and the like may be realized as a form in which each is connected via a communication network, such as a client and server system or a cloud computing system.
  • FIG. 9 is a block diagram showing an outline of a learning device according to the present invention.
  • the learning apparatus 10 according to the present invention is used in an inference process of calculating an output for each unit of discrimination data of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order.
  • a first storage unit 11 (for example, an inference weight memory 110) that stores parameters of each unit, and an update in a learning process of updating at least a part of parameters of each unit based on an output of each unit with respect to learning data.
  • a second storage unit 12 (for example, an updating weight memory 120) for storing target parameters;
  • the learning device can execute inference processing and learning processing in parallel.
  • the learning device 10 executes a reasoning process or a learning process using the loaded parameters (for example, the weight load selecting unit 130) for loading parameters from the first storage unit 11 or the second storage unit 12. (For example, the operation unit 140).
  • the learning device can execute inference processing and learning processing in parallel.
  • the learning device 10 includes a plurality of execution units corresponding to each unit, and the execution unit is used in the inference processing and stores a parameter of the unit corresponding to the execution unit in a third storage unit (for example, an inference weight).
  • a register 141) and a fourth storage unit (for example, the updating weight register 142) that stores parameters of a unit to be updated in the learning process and corresponding to the execution unit.
  • the learning device can reduce the time for switching between execution of the calculation for the inference process and execution of the calculation for the learning process.
  • the learning device 10 After completing the learning process using the predetermined number of learning data, the learning device 10 stores the parameters stored in the first storage unit 11 in the second storage unit 12 corresponding to the parameters.
  • An update unit for example, a weight copy unit 170 for updating the parameter to be updated may be provided.
  • the learning device can execute the inference process using the learned model.
  • the learning device 10 After completing the learning process using the predetermined number of learning data, the learning device 10 stores the parameters used in the inference process from the second storage unit 12 and the parameters to be updated in the learning process in the first storage unit.
  • An instruction unit for example, a weight update control unit 260 for instructing the load unit to load each from the unit 11 may be provided.
  • the learning device can omit the process of copying the learned model to the inference weight memory.
  • the learning device 10 includes a fifth storage unit (for example, a fixed-layer weight memory 190) that stores the fixed parameters of the parameters of each unit, and the first storage unit 11 and the second storage unit 12 May store unfixed parameters among the parameters of each unit.
  • a fifth storage unit for example, a fixed-layer weight memory 190
  • the learning device can support a discrimination model in which the weight of each unit in some layers is fixed.
  • the discrimination model may be a neural network.
  • the learning device can execute deep learning.
  • Second storage unit 70 Large-scale learning circuit 71 Unit 80 Inference device 81, 91 Weight memory 82, 92 Weight load unit 83, 93, 140, 240 Operation Units 94 and 150 Weight storage unit 102 Main storage device 103 Auxiliary storage device 104 Interface 105 Output device 106 Input device 107 GPU 108 processor 109 CPU 110 Inference weight memory 120 Updating weight memory 130, 230 Weight load selection unit 141 Inference weight register 142 Updating weight register 143 Operation unit weight load selection unit 144 Operation unit 145 Operation unit weight storage unit 160, 260 Weight update control unit 170 Weight copy unit 180, 270 Control unit 190, 280 Fixed layer weight memory 210 First weight memory 220 Second weight memory 250 Weight store selection unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

This learning device 10 comprises: a first storage unit 11 which stores parameters of each unit used in inference processing for calculating in a predetermined order an output for the discrimination data of each unit of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layer shape; and a second storage unit 12 which stores parameters to be updated in the learning processing for updating at least a part of the parameters of each unit on the basis of the output of each unit for learning data.

Description

学習装置、学習方法および学習プログラムLearning device, learning method and learning program

 本発明は、学習装置、学習方法および学習プログラムに関する。 The present invention relates to a learning device, a learning method, and a learning program.

 機械学習の普及が進み、時々刻々と変化する状況に対応するための更なる工夫が求められる。時々刻々と変化する状況に対応するためには、使用される環境で取得される多様な生データを学習用データとして学習に取り入れることが求められる。学習用データは、判別モデルの学習に用いられるデータである。 With the spread of machine learning, further innovations are required to cope with ever-changing situations. In order to cope with a situation that changes from moment to moment, it is necessary to incorporate various raw data acquired in an environment in which it is used into learning as learning data. The learning data is data used for learning the discriminant model.

 学習用データが用いられた学習(機械学習)では、例えば、学習用データが示す入力と出力の関係等に基づいて、所定の学習器で使用される演算式や判別式のパラメタが調整される。学習器は、例えば、データが入力されると、1つまたは複数のラベルに関する判別を行う判別モデルである。 In learning using machine learning data (machine learning), for example, parameters of arithmetic expressions and discriminants used in a predetermined learning device are adjusted based on the relationship between input and output indicated by the learning data. . The learning device is, for example, a discrimination model that performs discrimination regarding one or a plurality of labels when data is input.

 機械学習における演算資源と演算精度の関係として、例えば、非特許文献1には、ニューラルネットワークの深層学習を効率的に、特に低い消費電力で実行するための学習用演算回路および学習方法の例が記載されている。 As a relationship between computational resources and computational accuracy in machine learning, for example, Non-Patent Document 1 discloses an example of a learning computation circuit and a learning method for efficiently executing deep learning of a neural network, particularly with low power consumption. Has been described.

 また、非特許文献2には、CNN(Convolutional Neural Network)における深層学習において、複数ある畳込み層を、重みが固定される層と重みが更新される層(拡張機能層)に分けて学習範囲を制限することによって学習時間の短縮を図る学習方法の例が記載されている。 In Non-Patent Document 2, in deep learning in CNN (Convolutional Neural Network), a learning range is divided into a plurality of convolutional layers into a layer in which the weight is fixed and a layer in which the weight is updated (extended function layer). An example of a learning method for shortening the learning time by restricting the learning time is described.

 また、機械学習における学習演算用の回路構成の例として、非特許文献3には、FPGA(Field-Programmable Gate Array )をベースとしたアクセラレータ設計の最適化例が記載されている。 {Also, Non-Patent Document 3 describes an optimization example of an accelerator design based on an FPGA (Field-Programmable {Gate} Array}) as an example of a circuit configuration for learning operation in machine learning.

 以下、学習方法の概略を説明する。図10は、入力層と出力層との間に1つ以上の中間層を含むニューラルネットワークにおける一般的な学習方法および学習のための回路構成の例を示す説明図である。 Hereafter, the outline of the learning method will be described. FIG. 10 is an explanatory diagram showing an example of a general learning method and a circuit configuration for learning in a neural network including one or more intermediate layers between an input layer and an output layer.

 図10に示す例では、汎用用途の学習アルゴリズムに対応するために、大規模学習回路70が、所定の判別モデルであるニューラルネットワーク全体を学習する。 In the example shown in FIG. 10, the large-scale learning circuit 70 learns the entire neural network as a predetermined discriminant model in order to support a learning algorithm for general use.

 図10に示す大規模学習回路70に付された吹き出しには、ニューラルネットワークの学習過程における処理の方向および処理の範囲が模式的に記載されている。吹き出し内において、ニューラルネットワークにおけるニューロンに相当するユニット71が楕円で表されている。 吹 き The speech balloon attached to the large-scale learning circuit 70 shown in FIG. 10 schematically describes the processing direction and the processing range in the learning process of the neural network. In the balloon, a unit 71 corresponding to a neuron in the neural network is represented by an ellipse.

 また、線分72(図10に示すユニット71間を結ぶ線)は、ユニット71間結合を表す。また、矢印73(図10に示す右向きの太線矢印)は、推論処理および推論処理の範囲を表す。また、矢印74(図10に示す左向きの太線矢印)は、パラメタ更新処理およびパラメタ更新処理の範囲を表す。なお、パラメタ更新処理は、学習処理の例である。 {Circle around (7)} The line segment 72 (the line connecting the units 71 shown in FIG. 10) represents the connection between the units 71. Further, an arrow 73 (a rightward thick line arrow shown in FIG. 10) indicates an inference process and a range of the inference process. An arrow 74 (a thick left arrow shown in FIG. 10) indicates a parameter update process and a range of the parameter update process. The parameter update process is an example of a learning process.

 なお、図10は、各ユニット71への入力が前段の層のユニット71の出力になるフィードフォワード型のニューラルネットワークの例を示す。例えば、時系列情報が保持されている場合、リカレント型のニューラルネットワークのように、各ユニット71への入力に、前の時刻における前段の層のユニット71の出力が含まれてもよい。 FIG. 10 shows an example of a feedforward neural network in which the input to each unit 71 is the output of the unit 71 in the preceding layer. For example, when time-series information is held, the input to each unit 71 may include the output of the unit 71 in the previous layer at the previous time, as in a recurrent neural network.

 なお、各ユニット71への入力に前の時刻における前段の層のユニット71の出力が含まれる場合も、推論処理の方向は、入力層から出力層へと向かう方向(順方向)であるとみなされる。また、各ユニット71への入力は、上記の例に限定されない。 When the input to each unit 71 includes the output of the unit 71 of the previous layer at the previous time, the direction of the inference processing is also considered to be the direction from the input layer to the output layer (forward direction). It is. The input to each unit 71 is not limited to the above example.

 入力層から所定の順番で行われる推論処理は、「順伝搬」とも呼ばれる。一方、パラメタ更新処理の方向は、特に限定されない。例えば、図10に示すパラメタ更新処理のように、パラメタ更新処理の方向は、出力層から入力層へと向かう方向(逆方向)でもよい。 推 The inference processing performed in a predetermined order from the input layer is also called “forward propagation”. On the other hand, the direction of the parameter update processing is not particularly limited. For example, as in the parameter update process shown in FIG. 10, the direction of the parameter update process may be a direction (reverse direction) from the output layer to the input layer.

 なお、図10に示すパラメタ更新処理は、誤差逆伝搬法で実行される処理の例である。しかし、パラメタ更新処理は、誤差逆伝搬法で実行される処理に限定されない。例えば、パラメタ更新処理は、STDP(Spike Timing Dependent Plasticity )で実行されてもよい。 The parameter updating process shown in FIG. 10 is an example of a process executed by the back propagation method. However, the parameter update processing is not limited to the processing executed by the back propagation method. For example, the parameter update processing may be executed by STDP (Spike {Timing} Dependent {Plasticity}).

 ニューラルネットワークに限らず、深層学習におけるモデルの学習方法の例として、次のような学習方法が挙げられる。まず、入力層に学習用データを入力した後、出力層までの各層で順方向に各ユニット71の出力を計算する推論処理を行う(順伝搬:図10に示す矢印73参照)。 限 ら Not limited to neural networks, examples of model learning methods in deep learning include the following learning methods. First, after inputting learning data to the input layer, an inference process of calculating the output of each unit 71 in the forward direction in each layer up to the output layer is performed (forward propagation: see the arrow 73 shown in FIG. 10).

 次いで、出力層からの出力(最終出力)と学習用データが示す入力と出力の関係等とから算出される誤差に基づいて、層内の各ユニット71の出力を計算するために用いられるパラメタを更新するパラメタ更新処理を行う(逆伝搬:図10に示す矢印74参照)。図10に示すように、パラメタ更新処理は、出力層から第1層までの各層を逆方向に辿って行われる。また、パラメタ更新処理は、算出される誤差が最小になるように行われる。 Next, based on an error calculated from an output (final output) from the output layer and a relation between the input and the output indicated by the learning data, a parameter used to calculate the output of each unit 71 in the layer is determined. A parameter update process for updating is performed (back propagation: see arrow 74 shown in FIG. 10). As shown in FIG. 10, the parameter update processing is performed by following each layer from the output layer to the first layer in the reverse direction. The parameter updating process is performed so that the calculated error is minimized.

 図10に示すように、モデル全体が学習対象である場合、パラメタ更新処理で、入力層より後段の全ての層(第1層~第n層)における層内の各ユニット71の出力を計算するために用いられるパラメタが更新される。更新されるパラメタは、例えば、層内の各ユニット71と他の層のユニット71を結合するユニット71間結合の重みである。 As shown in FIG. 10, when the entire model is a learning target, the output of each unit 71 in all the layers (first to n-th layers) subsequent to the input layer is calculated by the parameter updating process. The parameters used for updating are updated. The parameter to be updated is, for example, the weight of the connection between the units 71 that connects each unit 71 in the layer and the unit 71 in another layer.

 上記のようなパラメタ更新処理が、例えば学習用データが変更されながら複数回繰り返し実行されることによって、高い認識率を有する学習済みモデルが生成される。図10は、学習を行う演算回路の実現例として、上記の推論処理とパラメタ更新処理とを高い演算精度で行う大規模学習回路70を示す。 学習 The parameter updating process as described above is repeatedly performed a plurality of times while, for example, the learning data is changed, thereby generating a learned model having a high recognition rate. FIG. 10 shows a large-scale learning circuit 70 that performs the above-described inference processing and parameter updating processing with high calculation accuracy as an example of realizing an arithmetic circuit that performs learning.

 図11は、1つのユニット71に着目したときのユニット71の入出力および他ユニット71との結合の例を示す説明図である。図11(a)は、1つのユニット71の入出力の例を示す。また、図11(b)は、2層に並べられたユニット71間の結合の例を示す。 FIG. 11 is an explanatory diagram showing an example of input / output of the unit 71 and connection with another unit 71 when focusing on one unit 71. FIG. 11A shows an example of input / output of one unit 71. FIG. 11B shows an example of a connection between the units 71 arranged in two layers.

 図11(a)に示すように、1つのユニット71に対して4つの入力(x~x)と1つの出力(z)が与えられた場合、ユニット71の動作は、例えば式(1A)のように表される。 As shown in FIG. 11A, when four inputs (x 1 to x 4 ) and one output (z) are given to one unit 71, the operation of the unit 71 is expressed by, for example, the formula (1A) ).

 z=f(u) ・・・式(1A)
 ただし、u=a+w+w+w+w ・・・式(1B)
z = f (u) Expression (1A)
However, u = a + w 1 x 1 + w 2 x 2 + w 3 x 3 + w 4 x 4 ··· formula (1B)

 なお、式(1A)におけるf()は、活性化関数を表す。また、式(1B)におけるaは、切片を表す。また、式(1B)におけるw~wは、各入力(x~x)に対応した重み等のパラメタを表す。 Note that f () in Expression (1A) represents an activation function. A in the formula (1B) represents an intercept. Further, w 1 to w 4 in the equation (1B) represent parameters such as weights corresponding to the respective inputs (x 1 to x 4 ).

 一方、図11(b)に示すように、2層に並べられた層間で各ユニット71が結合されている場合、後段の層に着目すると、層内の各ユニット71への入力(それぞれx~x)に対する各ユニット71の出力(z~z)は、例えば、次のように表される。 On the other hand, as shown in FIG. 11B, when the units 71 are connected between the layers arranged in two layers, the input to each unit 71 in the layer (x 1 the output of each unit 71 for ~ x 4) (z 1 ~ z 4) , for example, be expressed as follows.

 z=f(u) ・・・式(2A)
 ただし、u=a+wi,1+wi,2+wi,3+wi,4 ・・・式(2B)
z i = f (u i ) Equation (2A)
However, u i = a + w i , 1 x 1 + w i, 2 x 2 + w i, 3 x 3 + w i, 4 x 4 ··· formula (2B)

 なお、式(2A)におけるiは、同一層内のユニット71の識別子(本例ではi=1~3)である。また、式(2B)における切片aを、値1の定数項の係数(すなわち、パラメタの1つ)とみなすことも可能である。 In the expression (2A), i is the identifier of the unit 71 in the same layer (i = 1 to 3 in this example). Further, the intercept a in the equation (2B) can be regarded as a coefficient of a constant term having a value of 1 (that is, one of the parameters).

 以下では、式(2B)を単純化して、
 u=Σ(wi,k*x) ・・・式(2C)
と記す場合がある。なお、式(2C)において、切片aは省略されている。また、式(2C)におけるkは、層における各ユニット71への入力、より具体的には入力を行う他のユニット71の識別子を表す。
In the following, equation (2B) is simplified,
u i = Σ (wi , k * x k ) (2C)
May be written. In addition, in formula (2C), the intercept a is omitted. Further, k in the expression (2C) represents an input to each unit 71 in the layer, more specifically, an identifier of another unit 71 that performs the input.

 また、層における各ユニット71への入力が前段の層の各ユニット71の出力のみである場合、上記の簡略式を、
 u (L)=Σ(wi,k (L)*x (L-1)) ・・・式(2D)
と記すことも可能である。
When the input to each unit 71 in the layer is only the output of each unit 71 in the preceding layer,
u i (L) = Σ (wi , k (L) * x k (L−1) ) Expression (2D)
It is also possible to write

 なお、式(2D)におけるLは、層の識別子を表す。また、式(2D)におけるwi,kは、第L層における各ユニットiのパラメタを表す。より具体的には、wi,kは、各ユニットiと他のユニットkとの結合(ユニット71間結合)の重みに相当する。 Note that L in Equation (2D) represents a layer identifier. In addition, w i, k in Expression (2D) represents a parameter of each unit i in the L-th layer. More specifically, w i, k corresponds to the weight of the connection between each unit i and another unit k (connection between units 71).

 以下、ユニット71を特に区別せず、ユニット71の出力値を決める関数(活性化関数)を簡略化して、z=Σ(w*x)と記す場合がある。 In the following, a function (activation function) for determining an output value of the unit 71 may be simplified as z = Σ (w * x) without distinguishing the unit 71.

 上記の重みの集合は、ベクトル形式で以下のように記載される。 集合 The above set of weights is described in vector form as follows:

 w=[wi,1,wi,2,・・・,wi,k ・・・式(3) w i = [w i, 1 , w i, 2, ···, w i, k] T ··· formula (3)

 式(3)を、重みベクトルと呼ぶ。また、ある層の入力の集合である入力ベクトルx=[x,x,・・・,x、重みベクトルを横に連結した重み行列をWとすると、出力ベクトルzはf(Wx)で表される。なお、出力ベクトルzと活性化関数との間に、以下の関係が成り立つ。 Equation (3) is called a weight vector. Further, if an input vector x = [x 1 , x 2 ,..., X k ] T , which is a set of inputs of a certain layer, and a weight matrix in which weight vectors are horizontally connected is W, the output vector z is f ( represented by W T x). Note that the following relationship holds between the output vector z and the activation function.

 z=f(u)=[f(u),f(u),・・・,f(u)] ・・・式(4) z = f (u) = [ f (u 1), f (u 2), ···, f (u n)] ··· Equation (4)

 上記の例において、あるユニット71が入力xから出力zを求める計算が、ユニット71における推論処理に相当する。推論処理においてパラメタ(例えば、重みw)は固定される。推論処理は、例えば、運用中の監視システム等で、画像中の物体が特定の物体であるか否かを判定するために実行される処理である。一方、ユニット71のパラメタを求める計算が、ユニット71におけるパラメタ更新処理に相当する。 In the above example, the calculation in which a certain unit 71 calculates the output z from the input x corresponds to the inference processing in the unit 71. In the inference processing, parameters (for example, weight w) are fixed. The inference process is, for example, a process performed by an operating monitoring system or the like to determine whether an object in an image is a specific object. On the other hand, the calculation for obtaining the parameters of the unit 71 corresponds to the parameter updating process in the unit 71.

 図12に、推論処理を行う推論装置の例を示す。図12は、一般的な推論装置の構成例を示すブロック図である。図12に示す推論装置80は、重みメモリ81と、重みロード部82と、演算部83とを備える。 FIG. 12 shows an example of an inference apparatus that performs inference processing. FIG. 12 is a block diagram illustrating a configuration example of a general inference apparatus. The inference device 80 illustrated in FIG. 12 includes a weight memory 81, a weight load unit 82, and a calculation unit 83.

 重みメモリ81は、重み行列Wを記憶する機能を有する。重みロード部82は、重みメモリ81に記憶されている重み行列Wを重みメモリ81からロードする機能を有する。 The weight memory 81 has a function of storing the weight matrix W. The weight loading unit 82 has a function of loading the weight matrix W stored in the weight memory 81 from the weight memory 81.

 重みロード部82は、ロードされた重み行列Wを演算部83に入力する。演算部83は、入力された重み行列Wを用いて、上記の推論処理を行う機能を有する。 The weight loading unit 82 inputs the loaded weight matrix W to the calculation unit 83. The calculation unit 83 has a function of performing the above inference processing using the input weight matrix W.

 次に、図13に、パラメタ更新処理を行う学習装置の例を示す。図13は、一般的な学習装置の構成例を示すブロック図である。図13に示す学習装置90は、重みメモリ91と、重みロード部92と、演算部93と、重みストア部94とを備える。 Next, FIG. 13 shows an example of a learning device that performs a parameter updating process. FIG. 13 is a block diagram illustrating a configuration example of a general learning device. The learning device 90 illustrated in FIG. 13 includes a weight memory 91, a weight load unit 92, a calculation unit 93, and a weight storage unit 94.

 重みメモリ91は、重み行列Wを記憶する機能を有する。重みロード部92は、重みメモリ91に記憶されている重み行列Wを重みメモリ91からロードする機能を有する。 The weight memory 91 has a function of storing the weight matrix W. The weight loading unit 92 has a function of loading the weight matrix W stored in the weight memory 91 from the weight memory 91.

 重みロード部92は、ロードされた重み行列Wを演算部93に入力する。演算部93は、入力された重み行列Wを用いて、上記のパラメタ更新処理を行う機能を有する。 The weight load unit 92 inputs the loaded weight matrix W to the calculation unit 93. The calculation unit 93 has a function of performing the above-described parameter update processing using the input weight matrix W.

 演算部93は、パラメタ更新処理で更新された重み行列Wを、重みストア部94に入力する。重みストア部94は、演算部93により更新された重み行列Wを重みメモリ91に書き込む機能を有する。 The operation unit 93 inputs the weight matrix W updated in the parameter update process to the weight storage unit 94. The weight storage unit 94 has a function of writing the weight matrix W updated by the calculation unit 93 into the weight memory 91.

 具体的には、重みストア部94は、重みメモリ91に記憶されている重み行列Wを、入力された重み行列Wに更新する。なお、重み行列Wの書き込みにあたり、重みストア部94は、重み行列Wを一時的に保存する機能を有してもよい。 Specifically, the weight storage unit 94 updates the weight matrix W stored in the weight memory 91 to the input weight matrix W. In writing the weight matrix W, the weight storage unit 94 may have a function of temporarily storing the weight matrix W.

Y.H.Chen, et.al., "Eyeriss: an Energy-Efficient Reconfigurable Accelerator for Deep Convolutional Neural Networks", in IEEE Jornal of Slid-State Circuits, vol.52, no.1, Jan. 2017, pp.127-138.YHChen, et.al., "Eyeriss: an Energy-Efficient Reconfigurable Accelerator Deep Convolutional Neural Networks '', in IEEE Jornal of Slid-State Circuits, vol.52, no.1, anJan. 2017, pp.127-138 . Wei. Liu, et.al., "SSD: Single shot MultiBox Detector", arXiv:1512.02325v5, Dec. 2016.Wei. Liu, et.al., “SSD: Single shot MultiBox Detector”, arXiv: 1512.02325v5, Dec. 2016. Chen Zhang, et.al., "Optimizing FPGA-based Accelerator Design for Deep convolutional Neural Networks", In ACM FPGA 2015, pp.160-170.Chen Zhang, et.al., "Optimizing FPGA-based Accelerator Design for Deep convolutional Neural Networks", In ACM FPGA 2015, pp. 160-170.

 上記の推論処理と学習処理を並列に実行可能な学習装置を設計することを考える。学習装置が重み行列Wを記憶する重みメモリを1つしか有していない場合、学習装置は、推論処理と学習処理を並列に実行できない。 を Consider designing a learning device that can execute the above inference processing and learning processing in parallel. When the learning device has only one weight memory that stores the weight matrix W, the learning device cannot execute the inference process and the learning process in parallel.

 その理由を以下に説明する。重みメモリが1つしか存在しないと、重み行列Wが保存される箇所が学習装置に1つしか無い。よって、学習装置が推論処理に更新中の重み行列Wを使用する可能性がある。 理由 The reasons are explained below. If there is only one weight memory, the learning device has only one place where the weight matrix W is stored. Therefore, there is a possibility that the learning device uses the updated weight matrix W for the inference processing.

 上記のように推論処理では通常固定のパラメタが利用されるため、学習装置が推論処理において更新中の重み行列Wを使用すると、正常な推論処理が実行されなくなる。非特許文献1~3には、推論処理と学習処理を並列に実行する方法が記載されていない。 た め Since the inference processing normally uses fixed parameters in the inference processing, if the learning apparatus uses the updating weight matrix W in the inference processing, normal inference processing is not executed. Non-Patent Documents 1 to 3 do not describe a method of executing inference processing and learning processing in parallel.

[発明の目的]
 そこで、本発明は、上述した課題を解決する、推論処理と学習処理を並列に実行できる学習装置、学習方法および学習プログラムを提供することを目的とする。
[Object of the invention]
Therefore, an object of the present invention is to provide a learning device, a learning method, and a learning program that can solve the above-described problem and can execute inference processing and learning processing in parallel.

 本発明による学習装置は、1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる各ユニットのパラメタをそれぞれ記憶する第1記憶部と、各ユニットの学習用データに対する出力に基づいて各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ記憶する第2記憶部とを備えることを特徴とする。 The learning apparatus according to the present invention is used in an inference process of calculating an output for discrimination data of each unit of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order. A first storage unit for storing the parameters of each unit, and a second storage unit for storing parameters to be updated in a learning process of updating at least a part of the parameters of each unit based on an output of each unit for learning data And characterized in that:

 本発明による学習方法は、1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる各ユニットのパラメタをそれぞれ第1記憶部に記憶させ、各ユニットの学習用データに対する出力に基づいて各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ第2記憶部に記憶させることを特徴とする。 The learning method according to the present invention is used in the inference process of calculating the output for the discriminating data of each unit of the discriminating model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order. The parameters of the units are respectively stored in the first storage unit, and the parameters to be updated in the learning process of updating at least a part of the parameters of each unit based on the output of the learning data of each unit are stored in the second storage unit. It is characterized by making it.

 本発明による学習プログラムは、コンピュータに、1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる各ユニットのパラメタをそれぞれ第1記憶部に記憶させる第1記憶処理、および各ユニットの学習用データに対する出力に基づいて各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ第2記憶部に記憶させる第2記憶処理を実行させることを特徴とする。 The learning program according to the present invention is an inference process in which a computer calculates, in a predetermined order, outputs for discrimination data of each unit of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner. Parameters to be updated in a first storage process for storing parameters of each unit to be used in the first storage unit and a learning process for updating at least a part of parameters of each unit based on an output of each unit for learning data. Is stored in the second storage unit.

 本発明によれば、推論処理と学習処理を並列に実行できる。 According to the present invention, the inference processing and the learning processing can be executed in parallel.

本発明による学習装置の第1の実施形態の構成例を示すブロック図である。1 is a block diagram illustrating a configuration example of a first embodiment of a learning device according to the present invention. 演算部140の構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a calculation unit 140. 本発明による学習装置の第1の実施形態の他の構成例を示すブロック図である。FIG. 4 is a block diagram showing another configuration example of the first embodiment of the learning device according to the present invention. 第1の実施形態の学習装置100による推論処理および学習処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the inference process and the learning process by the learning apparatus 100 of 1st Embodiment. 本発明による学習装置の第2の実施形態の構成例を示すブロック図である。It is a block diagram showing an example of composition of a 2nd embodiment of a learning device by the present invention. 本発明による学習装置の第2の実施形態の他の構成例を示すブロック図である。It is a block diagram showing another example of composition of a 2nd embodiment of a learning device by the present invention. 第2の実施形態の学習装置200による推論処理および学習処理の動作を示すフローチャートである。It is a flow chart which shows operation of inference processing and learning processing by learning device 200 of a 2nd embodiment. 本発明による学習装置のハードウェア構成例を示す説明図である。FIG. 3 is an explanatory diagram illustrating an example of a hardware configuration of a learning device according to the present invention. 本発明による学習装置の概要を示すブロック図である。It is a block diagram showing the outline of the learning device by the present invention. 入力層と出力層との間に1つ以上の中間層を含むニューラルネットワークにおける一般的な学習方法および学習のための回路構成の例を示す説明図である。FIG. 3 is an explanatory diagram showing an example of a general learning method and a circuit configuration for learning in a neural network including one or more intermediate layers between an input layer and an output layer. 1つのユニット71に着目したときのユニット71の入出力および他ユニット71との結合の例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of input / output of the unit 71 and coupling with another unit 71 when focusing on one unit 71. 一般的な推論装置の構成例を示すブロック図である。It is a block diagram showing an example of composition of a general inference device. 一般的な学習装置の構成例を示すブロック図である。It is a block diagram showing an example of composition of a general learning device.

実施形態1.
[構成の説明]
 以下、本発明の実施形態を、図面を参照して説明する。図1は、本発明による学習装置の第1の実施形態の構成例を示すブロック図である。
Embodiment 1 FIG.
[Description of configuration]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of a first embodiment of a learning device according to the present invention.

 図1に示すように、学習装置100は、推論用重みメモリ110と、更新中重みメモリ120と、重みロード選択部130と、演算部140と、重みストア部150と、重み更新制御部160と、重みコピー部170と、制御部180とを備える。 As shown in FIG. 1, the learning device 100 includes an inference weight memory 110, an updating weight memory 120, a weight load selection unit 130, a calculation unit 140, a weight storage unit 150, and a weight update control unit 160. , A weight copy unit 170 and a control unit 180.

 なお、各ブロック図に記載されている単方向の矢印は、データが流れる方向を示す。しかし、各矢印が記載されている箇所において双方向にデータが流れる可能性は排除されていない。 単 The unidirectional arrows in each block diagram indicate the direction in which data flows. However, the possibility of data flowing bidirectionally at the location where each arrow is described is not excluded.

 学習装置100が推論処理と学習処理を並列に実行するために、学習装置100が複数の重みメモリを有することが解決手段として考えられる。以下、並列に推論処理と学習処理を実行する学習装置100の各構成要素の機能を説明する。 解決 Since the learning device 100 executes the inference process and the learning process in parallel, the learning device 100 may have a plurality of weight memories as a solution. Hereinafter, the function of each component of the learning device 100 that performs the inference process and the learning process in parallel will be described.

 推論用重みメモリ110は、推論処理に使用される重み行列W(パラメタ群)を記憶する機能を有する。また、更新中重みメモリ120は、学習処理に使用される重み行列Wを記憶する機能を有する。 The inference weight memory 110 has a function of storing a weight matrix W (parameter group) used for inference processing. The updating weight memory 120 has a function of storing the weight matrix W used for the learning process.

 重みロード選択部130は、推論用重みメモリ110と、更新中重みメモリ120とのうちのいずれかから重み行列Wをロードする機能を有する。推論処理が行われる時、重みロード選択部130は、推論用重みメモリ110から重み行列Wをロードする。 The weight load selection unit 130 has a function of loading the weight matrix W from one of the inference weight memory 110 and the updating weight memory 120. When the inference processing is performed, the weight load selection unit 130 loads the weight matrix W from the inference weight memory 110.

 また、学習処理が行われる時、重みロード選択部130は、更新中重みメモリ120から重み行列Wをロードする。重みロード選択部130は、ロードされた重み行列Wを演算部140に入力する。 When the learning process is performed, the weight load selecting unit 130 loads the weight matrix W from the updating weight memory 120. The weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.

 演算部140は、推論用重みメモリ110からロードされた重み行列Wを用いて上記の推論処理を行う機能を有する。また、演算部140は、更新中重みメモリ120からロードされた重み行列Wを用いて上記の学習処理を行う機能を有する。すなわち、異なる重み行列Wを用いるため、演算部140は、推論処理と学習処理を並列に実行できる。 The operation unit 140 has a function of performing the above inference processing using the weight matrix W loaded from the inference weight memory 110. The arithmetic unit 140 has a function of performing the above-described learning process using the weight matrix W loaded from the updating weight memory 120. That is, since different weight matrices W are used, the arithmetic unit 140 can execute inference processing and learning processing in parallel.

 具体的には、演算部140は、1つ以上のユニット71でそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニット71の判別用データに対する出力を所定の順番で計算する推論処理を実行する。 Specifically, the arithmetic unit 140 calculates in a predetermined order the output for the discriminating data of each unit 71 of the discriminating model in which a plurality of layers each composed of one or more units 71 are combined in a layered manner. Execute the process.

 推論用重みメモリ110は、推論処理で用いられる各ユニット71の重み(重み行列W)をそれぞれ記憶している。なお、各ユニット71の重みが、本実施形態における各ユニット71のパラメタである。また、判別モデルは、例えばニューラルネットワークである。 The inference weight memory 110 stores the weight (weight matrix W) of each unit 71 used in the inference processing. The weight of each unit 71 is a parameter of each unit 71 in the present embodiment. The discrimination model is, for example, a neural network.

 また、演算部140は、各ユニット71の学習用データに対する出力に基づいて各ユニット71の重みの少なくとも一部を更新する学習処理を実行する。更新中重みメモリ120は、学習処理における更新対象の重み(重み行列W)をそれぞれ記憶している。 The arithmetic unit 140 executes a learning process of updating at least a part of the weight of each unit 71 based on the output of each unit 71 for the learning data. The updating weight memory 120 stores the update target weight (weight matrix W) in the learning process.

 また、重みロード選択部130は、推論用重みメモリ110または更新中重みメモリ120から重みをロードする。演算部140は、ロードされた重みを用いて推論処理または学習処理を実行する。 {The weight load selector 130 loads the weight from the inference weight memory 110 or the updating weight memory 120. The operation unit 140 performs inference processing or learning processing using the loaded weights.

 演算部140は、学習処理で更新された重み行列Wを、重みストア部150に入力する。重みストア部150は、演算部140により更新された重み行列Wを更新中重みメモリ120に書き込む機能を有する。 The operation unit 140 inputs the weight matrix W updated in the learning process to the weight storage unit 150. The weight storage unit 150 has a function of writing the weight matrix W updated by the arithmetic unit 140 into the updating weight memory 120.

 具体的には、重みストア部150は、更新中重みメモリ120に記憶されている重み行列Wを、入力された重み行列Wに更新する。なお、重み行列Wの書き込みにあたり、重みストア部150は、重み行列Wを一時的に保存する機能を有してもよい。 Specifically, the weight storage unit 150 updates the weight matrix W stored in the updating weight memory 120 to the input weight matrix W. When writing the weight matrix W, the weight storage unit 150 may have a function of temporarily storing the weight matrix W.

 すなわち、重みストア部150は、学習処理における各ユニット71の更新対象の重み(重み行列W)を更新中重みメモリ120に格納する。重みストア部150が重み行列Wを更新中重みメモリ120に格納することによって、次の学習処理では更新された重み行列Wが使用される。 That is, the weight storage unit 150 stores the update target weight (weight matrix W) of each unit 71 in the learning process in the updating weight memory 120. The weight storage unit 150 stores the weight matrix W in the updating weight memory 120, so that the updated learning matrix W is used in the next learning process.

 学習が完了した場合、演算部140は、学習が完了したことを重み更新制御部160に通知する。通知を受けた重み更新制御部160は、更新中重みメモリ120に記憶されている重み行列Wを推論用重みメモリ110にコピーし、推論用重みメモリ110に記憶されていた重み行列Wとコピーされた重み行列Wを置き換えるように、重みコピー部170に指示する。 When the learning is completed, the arithmetic unit 140 notifies the weight update control unit 160 that the learning is completed. Upon receiving the notification, the weight update control unit 160 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and copies the weight matrix W stored in the inference weight memory 110. The weight copy unit 170 is instructed to replace the weight matrix W.

 指示を受けた重みコピー部170は、更新中重みメモリ120に記憶されている重み行列Wを推論用重みメモリ110にコピーし、推論用重みメモリ110に記憶されていた重み行列Wとコピーされた重み行列Wを置き換える。 Upon receiving the instruction, the weight copy unit 170 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and is copied with the weight matrix W stored in the inference weight memory 110. Replace the weight matrix W.

 学習が完了した場合は、例えば所定の数の学習用データが使用された重み更新処理を含む学習処理が、所定の回数繰り返し実行された場合である。学習が完了した場合、重みコピー部170は、推論用重みメモリ110に記憶されている重みを、重みに対応する更新中重みメモリ120に記憶されている更新対象の重みに更新する。 The case where the learning is completed is a case where a learning process including a weight update process using a predetermined number of learning data is repeatedly executed a predetermined number of times. When the learning is completed, the weight copy unit 170 updates the weight stored in the inference weight memory 110 to the update target weight stored in the updating weight memory 120 corresponding to the weight.

 すなわち、重みコピー部170は、推論処理で用いられる各ユニット71の重み(重み行列W)を推論用重みメモリ110に格納する。重みコピー部170が重み行列Wを推論用重みメモリ110に格納することによって、学習が完了した後の推論処理では、学習済みモデルが使用される。 That is, the weight copy unit 170 stores the weight (weight matrix W) of each unit 71 used in the inference processing in the inference weight memory 110. The weighted copy unit 170 stores the weight matrix W in the weight memory 110 for inference, so that inference processing after learning is completed uses the learned model.

 制御部180は、重みロード選択部130、演算部140、および重み更新制御部160を制御する機能を有する。制御部180は、入力された画像の種類に基づいて、推論処理と学習処理のいずれが実行対象であるかを重みロード選択部130と演算部140に通知する。 The control unit 180 has a function of controlling the weight load selection unit 130, the calculation unit 140, and the weight update control unit 160. The control unit 180 notifies the weight load selection unit 130 and the calculation unit 140 which of the inference process and the learning process is to be executed based on the type of the input image.

 また、学習が完了した場合、制御部180は、演算部140を介して学習が完了したことを重み更新制御部160に通知する。 (4) When the learning is completed, the control unit 180 notifies the weight update control unit 160 via the arithmetic unit 140 that the learning is completed.

 図2は、演算部140の構成例を示すブロック図である。図2に示すように、演算部140は、推論用重みレジスタ141と、更新中重みレジスタ142と、演算器用重みロード選択部143と、演算器144と、演算器用重みストア部145とを有する。 FIG. 2 is a block diagram showing a configuration example of the arithmetic unit 140. As shown in FIG. 2, the arithmetic unit 140 includes an inference weight register 141, an updating weight register 142, an arithmetic unit weight load selection unit 143, an arithmetic unit 144, and an arithmetic unit weight storage unit 145.

 演算部140の構成が図2に示す構成である場合、学習装置100は、各ユニット71と対応する複数の演算部を備える。 When the configuration of the arithmetic unit 140 is the configuration illustrated in FIG. 2, the learning device 100 includes a plurality of arithmetic units corresponding to each unit 71.

 推論用重みレジスタ141は、演算部140に入力された、推論用重みメモリ110からロードされた重み行列Wの、演算部140に対応するユニット71の重みwを記憶する機能を有する。 The inference weight register 141 has a function of storing the weight w of the unit 71 corresponding to the operation unit 140 in the weight matrix W input from the operation unit 140 and loaded from the inference weight memory 110.

 更新中重みレジスタ142は、演算部140に入力された、更新中重みメモリ120からロードされた重み行列Wの、演算部140に対応するユニット71の重みwを記憶する機能を有する。 中 The updating weight register 142 has a function of storing the weight w of the unit 71 corresponding to the arithmetic unit 140, of the weight matrix W input from the arithmetic unit 140 and loaded from the updating weight memory 120.

 演算器用重みロード選択部143は、推論用重みレジスタ141と、更新中重みレジスタ142とのうちのいずれかから重みwをロードする機能を有する。推論処理が行われる時、演算器用重みロード選択部143は、推論用重みレジスタ141から重みwをロードする。 The arithmetic unit weight load selection unit 143 has a function of loading the weight w from one of the inference weight register 141 and the updating weight register 142. When the inference processing is performed, the arithmetic unit weight load selector 143 loads the weight w from the inference weight register 141.

 また、学習処理が行われる時、演算器用重みロード選択部143は、更新中重みレジスタ142から重みwをロードする。演算器用重みロード選択部143は、ロードされた重みwを演算器144に入力する。 When the learning process is performed, the arithmetic unit weight load selector 143 loads the weight w from the updating weight register 142. The computing unit weight load selection unit 143 inputs the loaded weight w to the computing unit 144.

 演算器144は、推論用重みレジスタ141からロードされた重みwを用いて上記の推論処理用の演算を行う機能を有する。また、演算器144は、更新中重みレジスタ142からロードされた重みwを用いて上記の学習処理用の演算を行う機能を有する。 The arithmetic unit 144 has a function of performing the above-described inference processing operation using the weight w loaded from the inference weight register 141. The arithmetic unit 144 has a function of performing the above-described arithmetic operation for the learning process using the weight w loaded from the updating weight register 142.

 演算器144は、学習処理用の演算を介して更新された重みwを、演算器用重みストア部145に入力する。演算器用重みストア部145は、更新中重みレジスタ142に記憶されている重みwを、入力された重みwに更新する機能を有する。 The arithmetic unit 144 inputs the weight w updated through the operation for the learning process to the arithmetic unit weight storage unit 145. The arithmetic unit weight storage unit 145 has a function of updating the weight w stored in the updating weight register 142 to the input weight w.

 上述したように、図2に示す演算部140は、推論処理で用いられ演算部140に対応するユニット71のパラメタ(重みw)を記憶する推論用重みレジスタ141と、学習処理における更新対象であり演算部140に対応するユニット71のパラメタ(重みw)を記憶する更新中重みレジスタ142とを有する。 As described above, the arithmetic unit 140 shown in FIG. 2 is an inference weight register 141 that stores a parameter (weight w) of the unit 71 corresponding to the arithmetic unit 140 used in the inference process, and is an update target in the learning process. An updating weight register 142 that stores a parameter (weight w) of the unit 71 corresponding to the arithmetic unit 140.

 なお、推論用重みレジスタ141および更新中重みレジスタ142は、1つの重みwの代わりに、重み行列Wの1列等を記憶してもよい。 Note that the inference weight register 141 and the updating weight register 142 may store one column or the like of the weight matrix W instead of one weight w.

 演算部140が推論用重みレジスタ141と、更新中重みレジスタ142とを有することによって、推論用重みメモリ110および更新中重みメモリ120から重み行列Wが読み出される回数が減る。すなわち、読み出しで消費される電力が減るため、推論処理と学習処理の切り替えに係るコストが削減される。 Since the arithmetic unit 140 includes the inference weight register 141 and the updating weight register 142, the number of times the weight matrix W is read from the inference weight memory 110 and the updating weight memory 120 is reduced. That is, since the power consumed for reading is reduced, the cost for switching between the inference processing and the learning processing is reduced.

 なお、本実施形態の演算部140の構成は、図2に示す構成以外の構成でもよい。例えば、演算部140は、入力された重み行列Wの、演算部140に対応するユニット71の重みwを記憶するレジスタを1つだけ有していてもよい。演算部140がレジスタを1つだけ有する場合、重みロード選択部130は、実行対象の処理に応じて推論用重みメモリ110または更新中重みメモリ120から重み行列Wをロードする。 The configuration of the calculation unit 140 of the present embodiment may be a configuration other than the configuration illustrated in FIG. For example, the arithmetic unit 140 may have only one register that stores the weight w of the unit 71 corresponding to the arithmetic unit 140 in the input weight matrix W. When the arithmetic unit 140 has only one register, the weight load selecting unit 130 loads the weight matrix W from the inference weight memory 110 or the updating weight memory 120 according to the process to be executed.

 図3は、本発明による学習装置の第1の実施形態の他の構成例を示すブロック図である。図3に示す学習装置101は、図1に示す学習装置100が備える各構成要素と、固定層用重みメモリ190とを備える。 FIG. 3 is a block diagram showing another configuration example of the first embodiment of the learning device according to the present invention. The learning device 101 illustrated in FIG. 3 includes the components included in the learning device 100 illustrated in FIG. 1 and a fixed-layer weight memory 190.

 パラメタ更新処理(学習処理)において、各ユニット71の出力を計算するために用いられるパラメタは、全て更新されなくてもよい。例えば、入力層に近い層、すなわち浅い層には、複数回パラメタ更新処理が行われても、パラメタが大きく変化しないという特徴がある。 In the parameter updating process (learning process), all parameters used for calculating the output of each unit 71 do not need to be updated. For example, a layer close to the input layer, that is, a shallow layer has a feature that the parameter does not largely change even if the parameter update processing is performed a plurality of times.

 第1層~第n層のうち一部の層内の各ユニット71の出力を計算するために用いられるパラメタ(本例では重み)が固定される場合、固定層用重みメモリ190は、固定された重みに関する重み行列を記憶する。また、推論用重みメモリ110および更新中重みメモリ120は、固定されていない重みに関する重み行列を記憶する。 When the parameter (weight in this example) used to calculate the output of each unit 71 in some of the first to n-th layers is fixed, the fixed-layer weight memory 190 is fixed. The weight matrix related to the weight is stored. In addition, the inference weight memory 110 and the updating weight memory 120 store weight matrices for weights that are not fixed.

 推論処理が行われる時、図3に示す重みロード選択部130は、推論用重みメモリ110と固定層用重みメモリ190から重み行列をそれぞれロードする。 When the inference process is performed, the weight load selection unit 130 shown in FIG. 3 loads the weight matrices from the inference weight memory 110 and the fixed-layer weight memory 190, respectively.

[動作の説明]
 以下、本実施形態の学習装置100の推論処理および学習処理の動作を図4を参照して説明する。図4は、第1の実施形態の学習装置100による推論処理および学習処理の動作を示すフローチャートである。
[Description of operation]
Hereinafter, the operation of the inference processing and the learning processing of the learning device 100 of the present embodiment will be described with reference to FIG. FIG. 4 is a flowchart illustrating an operation of an inference process and a learning process performed by the learning device 100 according to the first embodiment.

 最初に、学習装置100の制御部180に画像が入力される(ステップS101)。制御部180は、入力された画像の種類を判定する(ステップS102)。 First, an image is input to the control unit 180 of the learning device 100 (Step S101). The control unit 180 determines the type of the input image (Step S102).

 入力された画像が学習用画像であると判定した場合(ステップS102における「学習用画像」)、制御部180は、実行対象の処理が学習処理であることを重みロード選択部130と演算部140に通知する(ステップS103)。 When it is determined that the input image is a learning image (“learning image” in step S102), the control unit 180 determines that the process to be executed is a learning process by the weight load selecting unit 130 and the arithmetic unit 140. Is notified (step S103).

 ステップS103で、制御部180は、入力された学習用画像を演算部140に入力する。または、制御部180は、前層のユニット71により抽出された学習用画像の特徴量等の、学習用画像から得られる所定の入力データを演算部140に入力する。 In step S103, the control unit 180 inputs the input learning image to the calculation unit 140. Alternatively, the control unit 180 inputs predetermined input data obtained from the learning image, such as the feature amount of the learning image extracted by the unit 71 of the previous layer, to the arithmetic unit 140.

 次いで、重みロード選択部130は、更新中重みメモリ120から重み行列Wをロードする(ステップS104)。重みロード選択部130は、ロードされた重み行列Wを演算部140に入力する。 Next, the weight load selector 130 loads the weight matrix W from the updating weight memory 120 (step S104). The weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.

 次いで、演算部140は、ロードされた重み行列Wを用いて学習処理を実行する(ステップS105)。演算部140は、学習処理で更新された重み行列Wを重みストア部150に入力する。 Next, the arithmetic unit 140 performs a learning process using the loaded weight matrix W (step S105). The calculation unit 140 inputs the weight matrix W updated in the learning process to the weight storage unit 150.

 次いで、重みストア部150は、更新中重みメモリ120に記憶されている重み行列Wを、学習処理で更新された重み行列Wに更新する(ステップS106)。 Next, the weight storage unit 150 updates the weight matrix W stored in the updating weight memory 120 to the weight matrix W updated in the learning process (step S106).

 次いで、制御部180は、学習が完了したか否かを判断する(ステップS107)。学習が完了していないと判断した場合(ステップS107におけるNo)、学習装置100は、入力された学習用画像に対する学習処理を終了する。 Next, the control unit 180 determines whether the learning has been completed (step S107). If it is determined that the learning has not been completed (No in step S107), the learning device 100 ends the learning process on the input learning image.

 学習が完了したと判断した場合(ステップS107におけるYes )、制御部180は、演算部140を介して学習が完了したことを重み更新制御部160に通知する。次いで、重み更新制御部160は、重みコピー部170を起動させる(ステップS108)。 If it is determined that the learning has been completed (Yes in Step S107), the control unit 180 notifies the weight update control unit 160 via the arithmetic unit 140 that the learning has been completed. Next, the weight update control unit 160 activates the weight copy unit 170 (Step S108).

 次いで、重みコピー部170は、更新中重みメモリ120に記憶されている重み行列Wを推論用重みメモリ110にコピーし、推論用重みメモリ110に記憶されていた重み行列Wとコピーされた重み行列Wを置き換える(ステップS109)。置き換えた後、学習装置100は、入力された学習用画像に対する学習処理を終了する。 Next, the weight copy unit 170 copies the weight matrix W stored in the updating weight memory 120 to the inference weight memory 110, and the weight matrix W stored in the inference weight memory 110 and the copied weight matrix. W is replaced (step S109). After the replacement, the learning device 100 ends the learning process on the input learning image.

 入力された画像が判別用画像であると判定した場合(ステップS102における「判別用画像」)、制御部180は、実行対象の処理が推論処理であることを重みロード選択部130と演算部140に通知する(ステップS110)。 When it is determined that the input image is the image for determination (“image for determination” in step S102), the control unit 180 determines that the process to be executed is the inference process by the weight load selection unit 130 and the arithmetic unit 140. (Step S110).

 ステップS110で、制御部180は、入力された判別用画像を演算部140に入力する。または、制御部180は、前層のユニット71により抽出された判別用画像の特徴量等の、判別用画像から得られる所定の入力データを演算部140に入力する。 In step S110, the control unit 180 inputs the input determination image to the calculation unit 140. Alternatively, the control unit 180 inputs predetermined input data obtained from the discrimination image, such as the feature amount of the discrimination image extracted by the unit 71 of the previous layer, to the calculation unit 140.

 次いで、重みロード選択部130は、推論用重みメモリ110から重み行列Wをロードする(ステップS111)。重みロード選択部130は、ロードされた重み行列Wを演算部140に入力する。 Next, the weight load selecting unit 130 loads the weight matrix W from the inference weight memory 110 (Step S111). The weight load selection unit 130 inputs the loaded weight matrix W to the calculation unit 140.

 なお、図3に示す学習装置101の重みロード選択部130は、ステップS111の処理で、固定層用重みメモリ190からも重み行列をロードする。 The weight load selection unit 130 of the learning device 101 shown in FIG. 3 also loads a weight matrix from the fixed-layer weight memory 190 in step S111.

 次いで、演算部140は、ロードされた重み行列Wを用いて推論処理を実行する(ステップS112)。推論処理を実行した後、学習装置100は、入力された判別用画像に対する推論処理を終了する。なお、学習装置100は、複数の判別用画像に対する推論処理をまとめて実行してもよい。 Next, the arithmetic unit 140 performs an inference process using the loaded weight matrix W (step S112). After executing the inference processing, the learning device 100 ends the inference processing on the input determination image. Note that the learning device 100 may collectively execute inference processing on a plurality of determination images.

 また、学習装置100は、図4に示す推論処理と学習処理を並列に実行可能である。よって、重みロード選択部130は、実行対象の処理が切り替えられた時に重みメモリから求められる重み行列Wをロードしてもよい。重みロード選択部130が重み行列Wをロードするタイミングは、特に限定されない。 The learning device 100 can execute the inference process and the learning process illustrated in FIG. 4 in parallel. Therefore, the weight load selection unit 130 may load the weight matrix W obtained from the weight memory when the process to be executed is switched. The timing at which the weight load selector 130 loads the weight matrix W is not particularly limited.

[効果の説明]
 本実施形態の学習装置100は、推論用重みメモリ110と、更新中重みメモリ120とを備える。よって、更新中重みメモリ120に記憶されている重み行列Wが更新されている間であっても、演算部140は、推論用重みメモリ110に記憶されている重み行列Wを用いて推論処理を実行できる。
[Explanation of effects]
The learning device 100 of the present embodiment includes an inference weight memory 110 and an updating weight memory 120. Therefore, even while the weight matrix W stored in the updating weight memory 120 is being updated, the calculation unit 140 performs the inference process using the weight matrix W stored in the inference weight memory 110. I can do it.

 学習装置100が推論用重みメモリ110と更新中重みメモリ120とを備えることによって、推論処理用の重み行列Wが、信頼性の高い状態に保たれる。すなわち、学習装置100は、推論処理と学習処理を並列に実行できる。 Since the learning apparatus 100 includes the weight memory 110 for inference and the weight memory 120 during updating, the weight matrix W for inference processing is maintained in a highly reliable state. That is, the learning device 100 can execute the inference process and the learning process in parallel.

 また、演算部140の構成が図2に示す構成である場合、読み出しで消費される電力が減るため、推論処理と学習処理の切り替えに係るコストが削減される。 (2) In the case where the configuration of the arithmetic unit 140 is the configuration shown in FIG. 2, the power consumed for reading is reduced, so that the cost for switching between the inference process and the learning process is reduced.

実施形態2.
[構成の説明]
 次に、本発明による学習装置の第2の実施形態を、図面を参照して説明する。図5は、本発明による学習装置の第2の実施形態の構成例を示すブロック図である。
Embodiment 2. FIG.
[Description of configuration]
Next, a second embodiment of the learning device according to the present invention will be described with reference to the drawings. FIG. 5 is a block diagram illustrating a configuration example of a second embodiment of the learning device according to the present invention.

 図5に示すように、学習装置200は、第1重みメモリ210と、第2重みメモリ220と、重みロード選択部230と、演算部240と、重みストア選択部250と、重み更新制御部260と、制御部270とを備える。 As shown in FIG. 5, the learning device 200 includes a first weight memory 210, a second weight memory 220, a weight load selector 230, a calculator 240, a weight store selector 250, and a weight update controller 260. And a control unit 270.

 第1の実施形態と同様に、学習装置200が推論処理と学習処理を並列に実行するために、学習装置200が複数の重みメモリを有することが解決手段として考えられる。本実施形態の学習装置200では、複数の重みメモリの役割が固定されていない。 同 様 Similar to the first embodiment, in order for the learning device 200 to execute the inference process and the learning process in parallel, the learning device 200 may have a plurality of weight memories as a solution. In the learning device 200 of the present embodiment, the roles of the plurality of weight memories are not fixed.

 すなわち、学習装置200は、複数の重みメモリの役割が入れ替え可能な構成をとる。以下、並列に推論処理と学習処理を実行する学習装置200の各構成要素の機能を説明する。 {That is, the learning device 200 has a configuration in which the roles of a plurality of weight memories are interchangeable. Hereinafter, the function of each component of the learning device 200 that performs the inference process and the learning process in parallel will be described.

 第1重みメモリ210および第2重みメモリ220は、推論処理または学習処理に使用される重み行列Wを記憶する機能を有する。 The first weight memory 210 and the second weight memory 220 have a function of storing a weight matrix W used for inference processing or learning processing.

 重みロード選択部230は、第1重みメモリ210と、第2重みメモリ220とのうちのいずれかから重み行列Wをロードする機能を有する。 The weight load selection unit 230 has a function of loading the weight matrix W from one of the first weight memory 210 and the second weight memory 220.

 重みロード選択部230は、推論処理用の重み行列Wが記憶されている重みメモリのメモリアドレスと、学習処理用の重み行列Wが記憶されている重みメモリのメモリアドレスをそれぞれ保持している。なお、保持されているメモリアドレスは、第1重みメモリ210または第2重みメモリ220のいずれかのメモリアドレスである。 The weight load selection unit 230 holds a memory address of a weight memory in which a weight matrix W for inference processing is stored and a memory address of a weight memory in which a weight matrix W for learning processing is stored. The held memory address is a memory address of either the first weight memory 210 or the second weight memory 220.

 保持されているメモリアドレスに従って、重みロード選択部230は、推論処理用の重み行列Wを第1重みメモリ210と、第2重みメモリ220とのうちのいずれかからロードする。 The weight load selection unit 230 loads the weight matrix W for inference processing from either the first weight memory 210 or the second weight memory 220 according to the stored memory address.

 同様に、保持されているメモリアドレスに従って、重みロード選択部230は、学習処理用の重み行列Wを第1重みメモリ210と、第2重みメモリ220とのうちのいずれかからロードする。重みロード選択部230は、ロードされた重み行列Wを演算部240に入力する。 Similarly, according to the stored memory address, the weight load selecting unit 230 loads the weight matrix W for learning processing from either the first weight memory 210 or the second weight memory 220. The weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.

 演算部240は、第1の実施形態の演算部140と同様の機能を有する。なお、本実施形態の演算部240の構成が、図2に示す構成でもよい。 The operation unit 240 has the same function as the operation unit 140 of the first embodiment. Note that the configuration of the calculation unit 240 of the present embodiment may be the configuration shown in FIG.

 重みストア選択部250は、第1重みメモリ210または第2重みメモリ220に記憶されている重み行列Wを、入力された重み行列Wに更新する機能を有する。 The weight store selection unit 250 has a function of updating the weight matrix W stored in the first weight memory 210 or the second weight memory 220 with the input weight matrix W.

 重みストア選択部250は、推論処理用の重み行列Wが記憶されている重みメモリのメモリアドレスと、学習処理用の重み行列Wが記憶されている重みメモリのメモリアドレスをそれぞれ保持している。 The weight store selection unit 250 holds a memory address of a weight memory in which a weight matrix W for inference processing is stored and a memory address of a weight memory in which a weight matrix W for learning processing is stored.

 保持されているメモリアドレスに従って、重みストア選択部250は、第1重みメモリ210または第2重みメモリ220に記憶されている重み行列Wを、入力された重み行列Wに更新する。 The weight store selection unit 250 updates the weight matrix W stored in the first weight memory 210 or the second weight memory 220 to the input weight matrix W according to the stored memory address.

 学習が完了した場合、演算部240は、学習が完了したことを重み更新制御部260に通知する。通知を受けた重み更新制御部260は、重みロード選択部230と重みストア選択部250に、保持されているメモリアドレスの役割を入れ替えるように指示する。 When the learning is completed, the arithmetic unit 240 notifies the weight update control unit 260 that the learning has been completed. Upon receiving the notification, the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to exchange the role of the held memory address.

 具体的には、重み更新制御部260は、推論処理用の重み行列Wが記憶されている重みメモリのメモリアドレスを、学習処理用の重み行列Wが記憶されている重みメモリのメモリアドレスとして扱うように指示する。 Specifically, the weight update control unit 260 treats the memory address of the weight memory in which the weight matrix W for inference processing is stored as the memory address of the weight memory in which the weight matrix W for learning processing is stored. To instruct.

 同時に、重み更新制御部260は、学習処理用の重み行列Wが記憶されている重みメモリのメモリアドレスを、推論処理用の重み行列Wが記憶されている重みメモリのメモリアドレスとして扱うように指示する。 At the same time, the weight update control unit 260 instructs to treat the memory address of the weight memory storing the weight matrix W for the learning process as the memory address of the weight memory storing the weight matrix W for the inference process. I do.

 学習が完了した場合は、例えば所定の数の学習用データが使用された重み更新処理を含む学習処理が、所定の回数繰り返し実行された場合である。換言すると学習が完了した場合、重み更新制御部260は、推論処理で用いられる重みを学習処理用の重み行列Wが記憶されている重みメモリからロードするように重みロード選択部230に指示している。 The case where the learning is completed is a case where a learning process including a weight update process using a predetermined number of learning data is repeatedly executed a predetermined number of times. In other words, when the learning is completed, the weight update control unit 260 instructs the weight load selection unit 230 to load the weight used in the inference process from the weight memory in which the weight matrix W for the learning process is stored. I have.

 同様に、学習が完了した場合、重み更新制御部260は、学習処理における更新対象の重みを推論処理用の重み行列Wが記憶されている重みメモリからロードするように重みロード選択部230に指示している。従って、本実施形態の学習装置200には、第1の実施形態の重みコピー部170が不要になる。 Similarly, when the learning is completed, the weight update control unit 260 instructs the weight load selection unit 230 to load the update target weight in the learning process from the weight memory storing the weight matrix W for the inference process. are doing. Therefore, the weight copy unit 170 of the first embodiment is unnecessary in the learning device 200 of the present embodiment.

 なお、重みロード選択部230と重みストア選択部250は、学習の完了前にメモリアドレスの役割の入れ替え指示を予め重み更新制御部260から受け取り、学習の完了後等の所定のタイミングでメモリアドレスの役割を入れ替えてもよい。 Note that the weight load selection unit 230 and the weight store selection unit 250 receive from the weight update control unit 260 an instruction to switch the role of the memory address in advance before the learning is completed, and at a predetermined timing such as after the learning is completed, Roles may be switched.

 重みロード選択部230と重みストア選択部250が予め指示を受け取る場合、重み更新制御部260は、重みロード選択部230と重みストア選択部250に、役割の入れ替え先のメモリアドレスを学習の完了前に予め通知してもよい。 When the weight load selection unit 230 and the weight store selection unit 250 receive an instruction in advance, the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to change the memory address of the role exchange destination before learning is completed. May be notified in advance.

 制御部270は、第1の実施形態の制御部180と同様の機能を有する。 The control unit 270 has the same function as the control unit 180 of the first embodiment.

 図6は、本発明による学習装置の第2の実施形態の他の構成例を示すブロック図である。図6に示す学習装置201は、図5に示す学習装置200が備える各構成要素と、固定層用重みメモリ280とを備える。 FIG. 6 is a block diagram showing another configuration example of the learning apparatus according to the second embodiment of the present invention. The learning device 201 illustrated in FIG. 6 includes the components included in the learning device 200 illustrated in FIG. 5 and a fixed-layer weight memory 280.

 本実施形態の学習装置201も、パラメタ更新処理(学習処理)において各ユニット71の出力を計算するために用いられるパラメタ(本例では重み)を全て更新しなくてもよい。固定層用重みメモリ280は、固定された重みに関する重み行列を記憶する。また、第1重みメモリ210および第2重みメモリ220は、固定されていない重みに関する重み行列を記憶する。 学習 The learning device 201 of the present embodiment also does not need to update all parameters (weights in this example) used for calculating the output of each unit 71 in the parameter update processing (learning processing). The fixed layer weight memory 280 stores a weight matrix related to fixed weights. Further, the first weight memory 210 and the second weight memory 220 store weight matrices for weights that are not fixed.

[動作の説明]
 以下、本実施形態の学習装置200の推論処理および学習処理の動作を図7を参照して説明する。図7は、第2の実施形態の学習装置200による推論処理および学習処理の動作を示すフローチャートである。
[Description of operation]
Hereinafter, the operation of the inference processing and the learning processing of the learning device 200 of the present embodiment will be described with reference to FIG. FIG. 7 is a flowchart illustrating an operation of an inference process and a learning process performed by the learning device 200 according to the second embodiment.

 最初に、学習装置200の制御部270に画像が入力される(ステップS201)。制御部270は、入力された画像の種類を判定する(ステップS202)。 First, an image is input to the control unit 270 of the learning device 200 (Step S201). The control unit 270 determines the type of the input image (Step S202).

 入力された画像が学習用画像であると判定した場合(ステップS202における「学習用画像」)、制御部270は、実行対象の処理が学習処理であることを重みロード選択部230と演算部240に通知する(ステップS203)。 When determining that the input image is a learning image (“learning image” in step S202), the control unit 270 determines that the process to be executed is a learning process by the weight load selection unit 230 and the arithmetic unit 240. Is notified (step S203).

 ステップS203で、制御部270は、入力された学習用画像を演算部240に入力する。または、制御部270は、前層のユニット71により抽出された学習用画像の特徴量等の、学習用画像から得られる所定の入力データを演算部240に入力する。 In step S203, the control unit 270 inputs the input learning image to the calculation unit 240. Alternatively, the control unit 270 inputs predetermined input data obtained from the learning image, such as the feature amount of the learning image extracted by the unit 71 of the previous layer, to the arithmetic unit 240.

 次いで、重みロード選択部230は、学習処理用の重み行列Wが記憶されている重みメモリから重み行列Wをロードする(ステップS204)。重みロード選択部230は、ロードされた重み行列Wを演算部240に入力する。 Next, the weight load selection unit 230 loads the weight matrix W from the weight memory in which the weight matrix W for the learning process is stored (Step S204). The weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.

 次いで、演算部240は、ロードされた重み行列Wを用いて学習処理を実行する(ステップS205)。演算部240は、学習処理で更新された重み行列Wを重みストア選択部250に入力する。 Next, the arithmetic unit 240 performs a learning process using the loaded weight matrix W (step S205). The calculation unit 240 inputs the weight matrix W updated in the learning process to the weight store selection unit 250.

 次いで、重みストア選択部250は、学習処理で更新された重み行列Wで、重みメモリに記憶されている学習処理用の重み行列Wを更新する(ステップS206)。 Next, the weight store selection unit 250 updates the weight matrix W for the learning process stored in the weight memory with the weight matrix W updated in the learning process (step S206).

 次いで、制御部270は、学習が完了したか否かを判断する(ステップS207)。学習が完了していないと判断した場合(ステップS207におけるNo)、学習装置200は、入力された学習用画像に対する学習処理を終了する。 Next, the control unit 270 determines whether or not the learning has been completed (step S207). If it is determined that the learning has not been completed (No in step S207), the learning device 200 ends the learning process on the input learning image.

 学習が完了したと判断した場合(ステップS207におけるYes )、制御部270は、演算部240を介して学習が完了したことを重み更新制御部260に通知する。 When it is determined that the learning has been completed (Yes in step S207), the control unit 270 notifies the weight update control unit 260 via the arithmetic unit 240 that the learning has been completed.

 次いで、重み更新制御部260は、重みロード選択部230と重みストア選択部250に、保持されているメモリアドレスの役割を入れ替えるように指示する(ステップS208)。 Next, the weight update control unit 260 instructs the weight load selection unit 230 and the weight store selection unit 250 to exchange the role of the stored memory address (step S208).

 次いで、重みロード選択部230と重みストア選択部250は、保持されているメモリアドレスの役割を入れ替える(ステップS209)。入れ替えた後、学習装置200は、入力された学習用画像に対する学習処理を終了する。 Next, the weight load selector 230 and the weight store selector 250 swap the roles of the stored memory addresses (step S209). After the replacement, the learning device 200 ends the learning process on the input learning image.

 入力された画像が判別用画像であると判定した場合(ステップS202における「判別用画像」)、制御部270は、実行対象の処理が推論処理であることを重みロード選択部230と演算部240に通知する(ステップS210)。 When it is determined that the input image is the image for determination (“image for determination” in step S202), the control unit 270 determines that the process to be executed is the inference process by the weight load selection unit 230 and the arithmetic unit 240. (Step S210).

 ステップS210で、制御部270は、入力された判別用画像を演算部240に入力する。または、制御部270は、前層のユニット71により抽出された判別用画像の特徴量等の、判別用画像から得られる所定の入力データを演算部240に入力する。 In step S210, the control unit 270 inputs the input determination image to the calculation unit 240. Alternatively, the control unit 270 inputs predetermined input data obtained from the discrimination image, such as the feature amount of the discrimination image extracted by the unit 71 of the previous layer, to the calculation unit 240.

 次いで、重みロード選択部230は、推論処理用の重み行列Wが記憶されている重みメモリから重み行列Wをロードする(ステップS211)。重みロード選択部230は、ロードされた重み行列Wを演算部240に入力する。 Next, the weight load selection unit 230 loads the weight matrix W from the weight memory storing the weight matrix W for inference processing (step S211). The weight load selection unit 230 inputs the loaded weight matrix W to the calculation unit 240.

 なお、図6に示す学習装置201の重みロード選択部230は、ステップS211の処理で、固定層用重みメモリ280からも重み行列をロードする。 The weight load selector 230 of the learning device 201 shown in FIG. 6 also loads the weight matrix from the fixed-layer weight memory 280 in the process of step S211.

 次いで、演算部240は、ロードされた重み行列Wを用いて推論処理を実行する(ステップS212)。推論処理を実行した後、学習装置200は、入力された判別用画像に対する推論処理を終了する。なお、学習装置200は、複数の判別用画像に対する推論処理をまとめて実行してもよい。 Next, the calculation unit 240 performs an inference process using the loaded weight matrix W (step S212). After executing the inference processing, the learning device 200 ends the inference processing on the input discriminating image. Note that the learning device 200 may collectively execute inference processing on a plurality of determination images.

 また、学習装置200は、図7に示す推論処理と学習処理を並列に実行可能である。よって、重みロード選択部230は、実行対象の処理が切り替えられた時に重みメモリから求められる重み行列Wをロードしてもよい。重みロード選択部230が重み行列Wをロードするタイミングは、特に限定されない。 The learning device 200 can execute the inference process and the learning process illustrated in FIG. 7 in parallel. Therefore, the weight load selection unit 230 may load the weight matrix W obtained from the weight memory when the process to be executed is switched. The timing at which the weight load selector 230 loads the weight matrix W is not particularly limited.

[効果の説明]
 本実施形態の学習装置200は、第1重みメモリ210と、第2重みメモリ220とを備える。よって、例えば第1重みメモリ210に記憶されている学習処理用の重み行列Wが更新されている間であっても、演算部240は、第2重みメモリ220に記憶されている推論処理用の重み行列Wを用いて推論処理を実行できる。すなわち、学習装置200は、推論処理と学習処理を並列に実行できる。
[Explanation of effects]
The learning device 200 of the present embodiment includes a first weight memory 210 and a second weight memory 220. Therefore, for example, even while the weighting matrix W for learning processing stored in the first weight memory 210 is being updated, the arithmetic unit 240 performs the processing for inference processing stored in the second weight memory 220. Inference processing can be performed using the weight matrix W. That is, the learning device 200 can execute the inference process and the learning process in parallel.

 また、本実施形態の学習装置200は、第1の実施形態の重みコピー部170を使用せずに、推論処理用の重み行列Wを学習済みの重み行列Wに更新できる。すなわち、第1の実施形態に比べて、学習装置200は、より迅速に学習済みの重み行列Wを使用できる。 The learning device 200 of the present embodiment can update the weight matrix W for inference processing to the learned weight matrix W without using the weight copy unit 170 of the first embodiment. That is, the learning device 200 can use the learned weight matrix W more quickly than in the first embodiment.

 以下、各実施形態の学習装置のハードウェア構成の具体例を説明する。図8は、本発明による学習装置のハードウェア構成例を示す説明図である。 Hereinafter, specific examples of the hardware configuration of the learning device of each embodiment will be described. FIG. 8 is an explanatory diagram showing an example of a hardware configuration of the learning device according to the present invention.

 図8に示す学習装置は、プロセッサ108と、主記憶装置102と、補助記憶装置103と、インタフェース104と、出力デバイス105と、入力デバイス106とを備える。また、プロセッサ108は、CPU109や、GPU107等の各種演算・処理装置を含んでいてもよい。 The learning device illustrated in FIG. 8 includes a processor 108, a main storage device 102, an auxiliary storage device 103, an interface 104, an output device 105, and an input device 106. Further, the processor 108 may include various arithmetic and processing devices such as the CPU 109 and the GPU 107.

 図8に示すように実装される場合、学習装置の動作は、プログラムの形式で補助記憶装置103に記憶されていてもよい。プログラムが補助記憶装置103に記憶される場合、CPU109は、プログラムを補助記憶装置103から読み出して主記憶装置102に展開し、展開されたプログラムに従って学習装置における所定の処理を実行する。 When implemented as shown in FIG. 8, the operation of the learning device may be stored in the auxiliary storage device 103 in the form of a program. When the program is stored in the auxiliary storage device 103, the CPU 109 reads the program from the auxiliary storage device 103, expands the program in the main storage device 102, and executes a predetermined process in the learning device according to the expanded program.

 なお、CPU109は、プログラムに従って動作する情報処理装置の一例である。学習装置は、CPU(Central Processing Unit )以外にも、例えば、MPU(Micro Processing Unit )やMCU(Memory Control Unit )やGPU(Graphics Processing Unit)を備えていてもよい。図8には、学習装置がCPU109に加えて、GPU107をさらに備える例が記載されている。 The CPU 109 is an example of an information processing device that operates according to a program. The learning device may include, for example, an MPU (Micro Processing Unit), an MCU (Memory Control Unit), or a GPU (Graphics Processing Unit) in addition to the CPU (Central Processing Unit). FIG. 8 illustrates an example in which the learning apparatus further includes a GPU 107 in addition to the CPU 109.

 補助記憶装置103は、一時的でない有形の媒体の一例である。一時的でない有形の媒体の他の例として、インタフェース104を介して接続される磁気ディスク、光磁気ディスク、CD-ROM(Compact Disk Read Only Memory )、DVD-ROM(Digital Versatile Disk Read Only Memory )、半導体メモリ等が挙げられる。 The auxiliary storage device 103 is an example of a non-transitory tangible medium. Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory) connected via the interface 104, A semiconductor memory and the like are included.

 また、補助記憶装置103に記憶される対象のプログラムが補助記憶装置103に記憶される代わりに通信回線によって学習装置に配信される場合、配信を受けた学習装置は、配信されたプログラムを主記憶装置102に展開し、所定の処理を実行してもよい。 When the target program stored in the auxiliary storage device 103 is distributed to the learning device through a communication line instead of being stored in the auxiliary storage device 103, the distributed learning device stores the distributed program in the main storage. The processing may be developed on the device 102 and a predetermined process may be executed.

 また、プログラムは、学習装置における所定の処理の一部を実現するためのものでもよい。さらに、プログラムは、補助記憶装置103に既に記憶されている他のプログラムと組み合わせられて使用される、学習装置における所定の処理を実現するための差分プログラムでもよい。 The program may be for realizing a part of a predetermined process in the learning device. Further, the program may be a difference program for implementing a predetermined process in the learning device, which is used in combination with another program already stored in the auxiliary storage device 103.

 インタフェース104は、他の装置との間で情報の送受信を行う。また、出力デバイス105は、ユーザに情報を提示する。また、入力デバイス106は、ユーザからの情報の入力を受け付ける。 The interface 104 transmits and receives information to and from other devices. The output device 105 presents information to a user. Further, the input device 106 receives input of information from a user.

 また、学習装置における処理内容によっては、図8に示す一部の要素は省略可能である。例えば、学習装置がユーザに情報を提示しないのであれば、出力デバイス105は省略可能である。また、例えば、学習装置がユーザから情報入力を受け付けないのであれば、入力デバイス106は省略可能である。 Also, some elements shown in FIG. 8 can be omitted depending on the processing content in the learning device. For example, if the learning device does not present information to the user, the output device 105 can be omitted. Also, for example, if the learning device does not accept information input from the user, the input device 106 can be omitted.

 また、上記の各構成要素の一部または全部は、汎用または専用の回路(Circuitry )、プロセッサ等やこれらの組み合わせによって実現される。これらは単一のチップによって構成されてもよいし、バスを介して接続される複数のチップによって構成されてもよい。また、上記の各構成要素の一部または全部は、上述した回路等とプログラムとの組み合わせによって実現されてもよい。 {Some or all of the above components are realized by general-purpose or special-purpose circuits (Circuitry), processors, and the like, and combinations thereof. These may be constituted by a single chip, or may be constituted by a plurality of chips connected via a bus. In addition, some or all of the above-described components may be realized by a combination of the above-described circuit and the like and a program.

 上記の各構成要素の一部または全部が複数の情報処理装置や回路等により実現される場合には、複数の情報処理装置や回路等は、集中配置されてもよいし、分散配置されてもよい。例えば、情報処理装置や回路等は、クライアントアンドサーバシステム、クラウドコンピューティングシステム等、各々が通信ネットワークを介して接続される形態として実現されてもよい。 When some or all of the above-described components are realized by a plurality of information processing devices or circuits, the plurality of information processing devices or circuits may be centrally arranged or distributed. Good. For example, the information processing device, the circuit, and the like may be realized as a form in which each is connected via a communication network, such as a client and server system or a cloud computing system.

 次に、本発明の概要を説明する。図9は、本発明による学習装置の概要を示すブロック図である。本発明による学習装置10は、1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる各ユニットのパラメタをそれぞれ記憶する第1記憶部11(例えば、推論用重みメモリ110)と、各ユニットの学習用データに対する出力に基づいて各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ記憶する第2記憶部12(例えば、更新中重みメモリ120)とを備える。 Next, the outline of the present invention will be described. FIG. 9 is a block diagram showing an outline of a learning device according to the present invention. The learning apparatus 10 according to the present invention is used in an inference process of calculating an output for each unit of discrimination data of a discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order. A first storage unit 11 (for example, an inference weight memory 110) that stores parameters of each unit, and an update in a learning process of updating at least a part of parameters of each unit based on an output of each unit with respect to learning data. A second storage unit 12 (for example, an updating weight memory 120) for storing target parameters;

 そのような構成により、学習装置は、推論処理と学習処理を並列に実行できる。 に よ り With such a configuration, the learning device can execute inference processing and learning processing in parallel.

 また、学習装置10は、第1記憶部11または第2記憶部12からパラメタをロードするロード部(例えば、重みロード選択部130)と、ロードされたパラメタを用いて推論処理または学習処理を実行する実行部(例えば、演算部140)とを備えてもよい。 Further, the learning device 10 executes a reasoning process or a learning process using the loaded parameters (for example, the weight load selecting unit 130) for loading parameters from the first storage unit 11 or the second storage unit 12. (For example, the operation unit 140).

 そのような構成により、学習装置は、推論処理と学習処理を並列に実行できる。 に よ り With such a configuration, the learning device can execute inference processing and learning processing in parallel.

 また、学習装置10は、各ユニットと対応する複数の実行部を備え、実行部は、推論処理で用いられその実行部に対応するユニットのパラメタを記憶する第3記憶部(例えば、推論用重みレジスタ141)と、学習処理における更新対象でありその実行部に対応するユニットのパラメタを記憶する第4記憶部(例えば、更新中重みレジスタ142)とを含んでもよい。 Further, the learning device 10 includes a plurality of execution units corresponding to each unit, and the execution unit is used in the inference processing and stores a parameter of the unit corresponding to the execution unit in a third storage unit (for example, an inference weight). A register 141) and a fourth storage unit (for example, the updating weight register 142) that stores parameters of a unit to be updated in the learning process and corresponding to the execution unit.

 そのような構成により、学習装置は、推論処理用の演算の実行と学習処理用の演算の実行とを切り替える時間を短縮できる。 With such a configuration, the learning device can reduce the time for switching between execution of the calculation for the inference process and execution of the calculation for the learning process.

 また、学習装置10は、所定の数の学習用データが使用された学習処理が完了した後、第1記憶部11に記憶されているパラメタを、パラメタに対応する第2記憶部12に記憶されている更新対象のパラメタに更新する更新部(例えば、重みコピー部170)を備えてもよい。 After completing the learning process using the predetermined number of learning data, the learning device 10 stores the parameters stored in the first storage unit 11 in the second storage unit 12 corresponding to the parameters. An update unit (for example, a weight copy unit 170) for updating the parameter to be updated may be provided.

 そのような構成により、学習装置は、学習済みモデルを用いて推論処理を実行できる。 に よ り With such a configuration, the learning device can execute the inference process using the learned model.

 また、学習装置10は、所定の数の学習用データが使用された学習処理が完了した後、推論処理で用いられるパラメタを第2記憶部12から、学習処理における更新対象のパラメタを第1記憶部11からそれぞれロードするようにロード部に指示する指示部(例えば、重み更新制御部260)を備えてもよい。 After completing the learning process using the predetermined number of learning data, the learning device 10 stores the parameters used in the inference process from the second storage unit 12 and the parameters to be updated in the learning process in the first storage unit. An instruction unit (for example, a weight update control unit 260) for instructing the load unit to load each from the unit 11 may be provided.

 そのような構成により、学習装置は、学習済みモデルを推論用重みメモリにコピーする処理を省略できる。 With such a configuration, the learning device can omit the process of copying the learned model to the inference weight memory.

 また、学習装置10は、各ユニットのパラメタのうち固定されているパラメタをそれぞれ記憶する第5記憶部(例えば、固定層用重みメモリ190)を備え、第1記憶部11と第2記憶部12は、各ユニットのパラメタのうち固定されていないパラメタをそれぞれ記憶してもよい。 Further, the learning device 10 includes a fifth storage unit (for example, a fixed-layer weight memory 190) that stores the fixed parameters of the parameters of each unit, and the first storage unit 11 and the second storage unit 12 May store unfixed parameters among the parameters of each unit.

 そのような構成により、学習装置は、一部の層内の各ユニットの重みが固定されている判別モデルに対応できる。 に よ り With such a configuration, the learning device can support a discrimination model in which the weight of each unit in some layers is fixed.

 また、判別モデルは、ニューラルネットワークでもよい。 判別 The discrimination model may be a neural network.

 そのような構成により、学習装置は、深層学習を実行できる。 学習 With such a configuration, the learning device can execute deep learning.

 以上、実施形態および実施例を参照して本願発明を説明したが、本願発明は上記実施形態および実施例に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described with reference to the exemplary embodiments and examples, the present invention is not limited to the exemplary embodiments and examples. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

10、100、101、200、201 学習装置
11 第1記憶部
12 第2記憶部
70 大規模学習回路
71 ユニット
80 推論装置
81、91 重みメモリ
82、92 重みロード部
83、93、140、240 演算部
94、150 重みストア部
102 主記憶装置
103 補助記憶装置
104 インタフェース
105 出力デバイス
106 入力デバイス
107 GPU
108 プロセッサ
109 CPU
110 推論用重みメモリ
120 更新中重みメモリ
130、230 重みロード選択部
141 推論用重みレジスタ
142 更新中重みレジスタ
143 演算器用重みロード選択部
144 演算器
145 演算器用重みストア部
160、260 重み更新制御部
170 重みコピー部
180、270 制御部
190、280 固定層用重みメモリ
210 第1重みメモリ
220 第2重みメモリ
250 重みストア選択部
10, 100, 101, 200, 201 Learning device 11 First storage unit 12 Second storage unit 70 Large-scale learning circuit 71 Unit 80 Inference device 81, 91 Weight memory 82, 92 Weight load unit 83, 93, 140, 240 Operation Units 94 and 150 Weight storage unit 102 Main storage device 103 Auxiliary storage device 104 Interface 105 Output device 106 Input device 107 GPU
108 processor 109 CPU
110 Inference weight memory 120 Updating weight memory 130, 230 Weight load selection unit 141 Inference weight register 142 Updating weight register 143 Operation unit weight load selection unit 144 Operation unit 145 Operation unit weight storage unit 160, 260 Weight update control unit 170 Weight copy unit 180, 270 Control unit 190, 280 Fixed layer weight memory 210 First weight memory 220 Second weight memory 250 Weight store selection unit

Claims (10)

 1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる前記各ユニットのパラメタをそれぞれ記憶する第1記憶部と、
 前記各ユニットの学習用データに対する出力に基づいて前記各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ記憶する第2記憶部とを備える
 ことを特徴とする学習装置。
The parameters of the respective units used in the inference processing for calculating the output of each unit of the discrimination model of the discrimination model composed of one or more units in layers in a predetermined order are calculated. A first storage unit,
A learning device, comprising: a second storage unit that stores a parameter to be updated in a learning process of updating at least a part of a parameter of each unit based on an output of the unit for learning data.
 第1記憶部または第2記憶部からパラメタをロードするロード部と、
 ロードされたパラメタを用いて推論処理または学習処理を実行する実行部とを備える
 請求項1記載の学習装置。
A loading unit that loads a parameter from the first storage unit or the second storage unit;
The learning device according to claim 1, further comprising: an execution unit configured to execute an inference process or a learning process using the loaded parameters.
 各ユニットと対応する複数の実行部を備え、
 実行部は、推論処理で用いられ当該実行部に対応するユニットのパラメタを記憶する第3記憶部と、学習処理における更新対象であり当該実行部に対応するユニットのパラメタを記憶する第4記憶部とを含む
 請求項2記載の学習装置。
It has multiple execution units corresponding to each unit,
The execution unit is a third storage unit that is used in the inference process and stores a parameter of a unit corresponding to the execution unit, and a fourth storage unit that is an update target in the learning process and stores a parameter of the unit corresponding to the execution unit. The learning device according to claim 2, comprising:
 所定の数の学習用データが使用された学習処理が完了した後、第1記憶部に記憶されているパラメタを、前記パラメタに対応する第2記憶部に記憶されている更新対象のパラメタに更新する更新部を備える
 請求項1から請求項3のうちのいずれか1項に記載の学習装置。
After the learning process using the predetermined number of learning data is completed, the parameter stored in the first storage unit is updated to the parameter to be updated stored in the second storage unit corresponding to the parameter. The learning device according to any one of claims 1 to 3, further comprising an updating unit that performs the updating.
 所定の数の学習用データが使用された学習処理が完了した後、推論処理で用いられるパラメタを第2記憶部から、学習処理における更新対象のパラメタを第1記憶部からそれぞれロードするようにロード部に指示する指示部を備える
 請求項2または請求項3記載の学習装置。
After the learning process using a predetermined number of learning data is completed, the parameters used in the inference process are loaded from the second storage unit, and the parameters to be updated in the learning process are loaded from the first storage unit. The learning device according to claim 2, further comprising an instruction unit that instructs the unit.
 各ユニットのパラメタのうち固定されているパラメタをそれぞれ記憶する第5記憶部を備え、
 第1記憶部と第2記憶部は、前記各ユニットのパラメタのうち固定されていないパラメタをそれぞれ記憶する
 請求項1から請求項5のうちのいずれか1項に記載の学習装置。
A fifth storage unit for storing a fixed parameter among the parameters of each unit,
The learning device according to any one of claims 1 to 5, wherein the first storage unit and the second storage unit store parameters that are not fixed among the parameters of each unit.
 1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる前記各ユニットのパラメタをそれぞれ第1記憶部に記憶させ、
 前記各ユニットの学習用データに対する出力に基づいて前記各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ第2記憶部に記憶させる
 ことを特徴とする学習方法。
The parameters of each unit used in the inference processing for calculating the output for the discrimination data of each unit of the discrimination model of the discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order are respectively described as follows. 1 Store in the storage unit,
A learning method, wherein a parameter to be updated in a learning process of updating at least a part of a parameter of each unit based on an output of each unit for learning data is stored in a second storage unit.
 第1記憶部または第2記憶部からパラメタをロードし、
 ロードされたパラメタを用いて推論処理または学習処理を実行する
 請求項7記載の学習方法。
Loading parameters from the first storage unit or the second storage unit,
The learning method according to claim 7, wherein inference processing or learning processing is performed using the loaded parameters.
 コンピュータに、
 1つ以上のユニットでそれぞれ構成された複数の層が層状に結合された判別モデルの各ユニットの判別用データに対する出力を所定の順番で計算する推論処理で用いられる前記各ユニットのパラメタをそれぞれ第1記憶部に記憶させる第1記憶処理、および
 前記各ユニットの学習用データに対する出力に基づいて前記各ユニットのパラメタの少なくとも一部を更新する学習処理における更新対象のパラメタをそれぞれ第2記憶部に記憶させる第2記憶処理
 を実行させるための学習プログラム。
On the computer,
The parameters of each unit used in the inference processing for calculating the output for the discrimination data of each unit of the discrimination model of the discrimination model in which a plurality of layers each composed of one or more units are combined in a layered manner in a predetermined order are respectively described as follows. A first storage process to be stored in the first storage unit; and a parameter to be updated in the learning process of updating at least a part of the parameter of each unit based on the output of the unit for learning data, to the second storage unit. A learning program for executing a second storage process for storing.
 コンピュータに、
 第1記憶部または第2記憶部からパラメタをロードするロード処理、および
 ロードされたパラメタが用いられる推論処理または学習処理を実行させる
 請求項9記載の学習プログラム。
On the computer,
The learning program according to claim 9, wherein the learning program is configured to execute a loading process of loading a parameter from the first storage unit or the second storage unit, and an inference process or a learning process using the loaded parameter.
PCT/JP2018/031585 2018-08-27 2018-08-27 Learning device, learning method, and learning program Ceased WO2020044407A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/031585 WO2020044407A1 (en) 2018-08-27 2018-08-27 Learning device, learning method, and learning program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/031585 WO2020044407A1 (en) 2018-08-27 2018-08-27 Learning device, learning method, and learning program

Publications (1)

Publication Number Publication Date
WO2020044407A1 true WO2020044407A1 (en) 2020-03-05

Family

ID=69642753

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/031585 Ceased WO2020044407A1 (en) 2018-08-27 2018-08-27 Learning device, learning method, and learning program

Country Status (1)

Country Link
WO (1) WO2020044407A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05274455A (en) * 1992-03-27 1993-10-22 Toshiba Corp Neural network device
JPH1091604A (en) * 1996-09-10 1998-04-10 Toshiba Corp Function learning device
US20180053086A1 (en) * 2016-08-22 2018-02-22 Kneron Inc. Artificial neuron and controlling method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05274455A (en) * 1992-03-27 1993-10-22 Toshiba Corp Neural network device
JPH1091604A (en) * 1996-09-10 1998-04-10 Toshiba Corp Function learning device
US20180053086A1 (en) * 2016-08-22 2018-02-22 Kneron Inc. Artificial neuron and controlling method thereof

Similar Documents

Publication Publication Date Title
KR102175044B1 (en) Apparatus and method for running artificial neural network reverse training
JP6605259B2 (en) Neural network structure expansion method, dimension reduction method, and apparatus using the method
US20170308788A1 (en) Event-driven universal neural network circuit
KR102655950B1 (en) High speed processing method of neural network and apparatus using thereof
US20210201110A1 (en) Methods and systems for performing inference with a neural network
KR20190113555A (en) Neuromorphic accelerator multitasking
US20250111217A1 (en) Data layout conscious processing in memory architecture for executing neural network model
US11593002B2 (en) Artificial neural networks in memory
CN116029336A (en) Memory efficient neural network training
US11620525B2 (en) Dropout for accelerated deep learning in heterogeneous architectures
JP2023174889A (en) learning device
CN112465105B (en) Computer-readable recording medium recording a learning program and a learning method
EP4180978A1 (en) Neural network training system with acceleration and neural network training method thereof
KR102765759B1 (en) Method and apparatus for quantizing deep neural network
CN119046015B (en) Electronic device, method and medium for neural network model training processing
EP4052188B1 (en) Neural network instruction streaming
US11704562B1 (en) Architecture for virtual instructions
WO2020044407A1 (en) Learning device, learning method, and learning program
CN118780324B (en) Balanced propagation optimization method and system based on deep convolutional neural network
US12333625B2 (en) Neural network training with acceleration
US20230196124A1 (en) Runtime predictors for neural network computation reduction
KR20230155760A (en) Quantum Circuit Simulation Hardware
WO2020049637A1 (en) Learning device
TWI899509B (en) Neural network training system with acceleration and neural network training method thereof
CN117313881B (en) Quantum circuit classification method and device and electronic equipment

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: 18931895

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18931895

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP