Neural network, operation method, and program

文档序号:90959 发布日期:2021-10-08 浏览:33次 中文

阅读说明:本技术 神经网络、运算方法以及程序 (Neural network, operation method, and program ) 是由 P·穆鲁甘 刘进 K·苏布拉玛尼安 S·P·林 上田功 于 2020-10-29 设计创作,主要内容包括:本公开的神经网络具备:输入层(10),被输入输入信息;多个块(111),用于提取输入信息的特征量;以及输出层(12),输出提取出的特征量,多个块(111)分别包含:残差块,由1个以上的第一卷积层和跨越1个以上的第一卷积层的连接即跳过连接的组合构成;以及连接块,所述连接块至少具有第二卷积层,且将1个以上的第一卷积层的输出和跳过连接的输出平均化。(The disclosed neural network is provided with: an input layer (10) to which input information is input; a plurality of blocks (111) for extracting a feature amount of input information; and an output layer (12) that outputs the extracted feature values, wherein each of the plurality of blocks (111) includes: a residual block composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning 1 or more first convolution layers; and a connection block having at least a second convolution layer and averaging outputs of the 1 or more first convolution layers and outputs of the skip connection.)

1. A neural network, comprising:

an input layer to which input information is input;

a plurality of blocks for extracting a feature quantity of the input information; and

an output layer for outputting the extracted feature quantity,

the plurality of blocks respectively include:

a residual block composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and

and a connection block having at least a second convolution layer and averaging outputs of the 1 or more first convolution layers and outputs of the skip connection.

2. The neural network of claim 1,

the connecting block is provided with:

a second convolution layer to which an output of the 1 or more first convolution layers and an output of the skip connection are input;

a first output layer to which an output of the second convolution layer is input;

a weighting layer that gives a weight stored in advance to an output of the first output layer; and

and a third convolutional layer to which an output of the weighting layer is input.

3. The neural network of claim 1,

each of the plurality of blocks outputting an output of the skip connection in addition to an output of the connection block,

the connecting block is provided with:

a second convolution layer to which an output of the 1 or more first convolution layers and an output of the skip connection are input;

a first output layer to which an output of the second convolution layer is input;

a weighting layer that gives a weight stored in advance to an output of the first output layer;

a direct connection connecting the first output layer and the weighted layer; and

a third convolutional layer, to which the output of the weighted layer and the output of the direct connection are input.

4. The neural network of claim 2 or 3,

the first output layer outputs a value obtained by using a flexible maximum function for the output of the second convolutional layer that is input.

5. An arithmetic method for calculating a plurality of blocks in a neural network, the neural network comprising: an input layer to which input information is input; the plurality of blocks are used for extracting the characteristic quantity of the input information; and an output layer that outputs the extracted feature amount, wherein the operation method includes:

inputting first information into a residual block that constitutes the block and is composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and

and inputting the feature amount of the first information extracted from the 1 or more first convolution layers and the first information output from the skip connection to a connection block having at least a second convolution layer, the connection block constituting the block, and averaging the feature amount of the first information and the first information.

6. A program for executing an arithmetic method for a plurality of blocks in a neural network including an input layer to which input information is input, the plurality of blocks for extracting a feature amount of the input information, and an output layer that outputs the extracted feature amount, wherein the program causes a computer to execute:

inputting first information into a residual block that constitutes the block and is composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and

and inputting the feature amount of the first information extracted from the 1 or more first convolution layers and the first information output from the skip connection to a connection block having at least a second convolution layer, the connection block constituting the block, and averaging the feature amount of the first information and the first information.

Technical Field

The present disclosure relates to a neural network, an arithmetic method, and a program.

Background

In recent years, DL (Deep Learning) models using Convolutional Network (CNN) have been used to exhibit excellent performance for many visual problems such as image classification, object detection, and object recognition.

On the other hand, it is also known that the performance can be improved by deepening the hierarchy of the DL model. However, in the DL model in which the hierarchy is simply deepened, there is a problem in that gradient disappearance (vanising) or gradient divergence (expanding) occurs.

In order to solve this problem, a CNN model incorporating a Residual Network (ResNet) such as Residual Learning (Residual Learning) has been proposed (see, for example, non-patent document 1). In ResNet, the above problem is solved by learning a residual f (x) ═ h (x) -x obtained by subtracting an input x from an output h (x), and a network structure of 152 layers depth is realized. In addition, in ResNet disclosed in non-patent document 1, a network structure is provided by stacking a residual block configured by a combination of a skip connection (skip connect) which bypasses an input to a certain layer and inputs to a layer extending deep into the layer and a convolutional layer. The skip connection used in ResNet is also referred to as local residual skip connection (local skip connection).

Documents of the prior art

Non-patent document

Non-patent document 1: he, K., Zhang, X., Ren, S.and Sun, J.,2016.Deep residual learning for image recognition. in Proceedings of the IEEE conference on computer vision and pattern recognition (pp.770-778).

Disclosure of Invention

Problems to be solved by the invention

However, the model (network model) having a network structure of ResNet disclosed in non-patent document 1 is composed of deep layers, and requires enormous parameters and computation amounts (FLOPs). In addition, resources of mobile terminals such as smartphones and tablet computers, home appliances such as televisions, and hardware platforms such as industrial devices are limited, and the amount of computation and the model size that can be mounted are limited. That is, it is difficult to install ResNet disclosed in non-patent document 1 on a hardware platform such as a mobile terminal, which has limited resources, and use it.

The present disclosure has been made in view of the above circumstances, and an object thereof is to provide a neural network, an arithmetic method, and a program that can further reduce the model size and the amount of arithmetic operations while maintaining accuracy.

Means for solving the problems

In order to solve the above problem, a neural network according to one aspect of the present disclosure includes: an input layer to which input information is input; a plurality of blocks for extracting a feature quantity of the input information; and an output layer that outputs the extracted feature amount, the plurality of blocks each including: a residual block composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and a connection block having at least a second convolution layer and averaging outputs of the 1 or more first convolution layers and outputs of the skip connections.

The general or specific aspects can be realized by a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or any combination of a system, a method, an integrated circuit, a computer program, and a recording medium.

Effects of the invention

According to the present disclosure, a neural network or the like can be realized that can further reduce the model size and the amount of computation while maintaining accuracy.

Drawings

Fig. 1 is a block diagram showing an example of the configuration of an arithmetic device according to an embodiment.

Fig. 2 is a diagram showing an example of a hardware configuration of a computer in which the functions of the arithmetic device according to the embodiment are realized by software.

Fig. 3 is a diagram showing a configuration of a neural network according to an embodiment.

Fig. 4A is a conceptual diagram for explaining a network structure of the blocks shown in fig. 3.

Fig. 4B is a diagram conceptually showing the calculation performed on the convolutional layer shown in fig. 4A.

Fig. 4C is a diagram conceptually showing a specific structure of the connection block shown in fig. 4A.

Fig. 5 is a diagram showing a specific embodiment of the network structure of the block shown in fig. 4A.

Fig. 6 is a diagram showing another specific embodiment of the network structure of the block shown in fig. 4A.

Fig. 7 is a diagram conceptually showing an example of the installation of the network configuration of the equivalent ResNet 10.

Fig. 8 is a diagram conceptually showing an example of installation of the neural network according to the embodiment.

Fig. 9A is a diagram conceptually showing an example of the network configuration of the ResNet 34.

Fig. 9B is a diagram conceptually showing an example of the network configuration of the equivalent ResNet 18.

Fig. 10 is a flowchart showing an outline of the operation of the arithmetic device according to the embodiment.

Fig. 11 is a diagram showing an outline of a database of the embodiment.

FIG. 12 is a graph showing the experimental results of the examples.

Detailed Description

A neural network according to one embodiment of the present disclosure includes: an input layer to which input information is input; a plurality of blocks for extracting a feature quantity of the input information; and an output layer that outputs the extracted feature amount, the plurality of blocks each including: a residual block composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and a connection block having at least a second convolution layer and averaging outputs of the 1 or more first convolution layers and outputs of the skip connections.

According to this configuration, it is possible to realize a neural network capable of further reducing the model size and the amount of computation while maintaining the accuracy.

Here, for example, the connection block may include: a second convolution layer to which an output of the 1 or more first convolution layers and an output of the skip connection are input; a first output layer to which an output of the second convolution layer is input; a weighting layer that gives a weight stored in advance to an output of the first output layer; and a third convolutional layer to which an output of the weighting layer is input.

According to this configuration, the number of blocks required to maintain accuracy can be reduced, and thus the model size and the amount of computation can be reduced.

For example, each of the plurality of blocks may output the output of the skip connection in addition to the output of the connection block, and the connection block may include: a second convolution layer to which an output of the 1 or more first convolution layers and an output of the skip connection are input; a first output layer to which an output of the second convolution layer is input; a weighting layer that gives a weight stored in advance to an output of the first output layer; a direct connection connecting the first output layer and the weighted layer; and a third convolutional layer to which an output of the weighted layer and an output of the direct connection are input.

According to this configuration, not only the number of blocks required to maintain accuracy can be reduced, but also the output gradient of the connection block can be prevented from exploding or diverging due to the direct connection (short connection), and thus the model size and the amount of computation can be further reduced while maintaining accuracy.

Here, for example, the first output layer outputs a value obtained by using a flexible maximum function (Softmax function) for the input output of the second convolutional layer.

In addition, an arithmetic method according to an aspect of the present disclosure is an arithmetic method for a plurality of blocks in a neural network, the neural network including: an input layer to which input information is input; the plurality of blocks are used for extracting the characteristic quantity of the input information; and an output layer that outputs the extracted feature amount, wherein the operation method includes: inputting first information into a residual block that constitutes the block and is composed of a combination of 1 or more first convolution layers and a skip connection that is a connection spanning the 1 or more first convolution layers; and inputting the feature amount of the first information extracted from the 1 or more first convolution layers and the first information output by the skip connection to a connection block, and averaging the feature amount of the first information and the first information, wherein the connection block is a connection block that constitutes the block and has at least a second convolution layer.

The embodiments described below all show a specific example of the present disclosure. Therefore, the numerical values, shapes, materials, constituent elements, arrangement of constituent elements, connection modes, and the like shown in the following embodiments are examples, and are not intended to limit the present disclosure. Further, among the components in the following embodiments, components that are not described in independent claims showing an implementation of one embodiment of the present disclosure will be described as arbitrary components. The embodiments of the present disclosure are not limited to the existing independent technical solutions, and may be expressed by other independent technical solutions.

(embodiment mode)

Hereinafter, embodiments will be described with reference to the drawings.

[1. computing device 1]

Fig. 1 is a block diagram showing an example of the configuration of an arithmetic device 1 according to the present embodiment.

The arithmetic device 1 is realized by a computer or the like using a learned NN (Neural Networks), and is configured by an input unit 2, a processing unit 3, and an output unit 4 as shown in fig. 1. When input information is input, the arithmetic device 1 outputs a feature quantity extracted from the input information as an arithmetic result. The input information is information used for visual problems such as images and videos.

The input unit 2 acquires input information and inputs the acquired input information to the processing unit 3. In the present embodiment, the input unit 2 inputs the acquired input information to the processing unit 3.

The processing unit 3 extracts a feature amount from the input information by using the neural network of the present embodiment. In the present embodiment, the processing unit 3 extracts a feature amount from input information using the learned neural network 3 a. The learned neural network 3a is stored in a storage unit (not shown) included in the processing unit 3. The learned neural network 3a may be stored in the cloud or may be used by the processing unit 3 via a communication network such as the internet. The structure of the neural network 3a will be described later.

The output unit 4 outputs the feature amount extracted by the processing unit 3 as a calculation result.

[1-1. hardware configuration ]

Fig. 2 is a diagram showing an example of a hardware configuration of a computer 1000 that realizes the functions of the arithmetic device 1 according to the present embodiment by software.

As shown in fig. 2, the computer 1000 is a computer including an input device 1001, an output device 1002, a CPU1003, an internal memory 1004, a RAM1005, a reading device 1007, a transmission/reception device 1008, and a bus 1009. The input device 1001, the output device 1002, the CPU1003, the internal memory 1004, the RAM1005, the reading device 1007, and the transmission/reception device 1008 are connected by a bus 1009.

The input device 1001 is a device serving as a user interface such as an input button, a touch panel, or a touch panel display, and receives a user operation. In addition to receiving a touch operation by a user, the input device 1001 may receive an operation by voice or a remote operation by a remote controller or the like.

The built-in memory 1004 is a flash memory or the like. The internal memory 1004 may store at least one of a program for realizing the function of the arithmetic device 1 and an Application program (Application) using the functional configuration of the arithmetic device 1 in advance. The internal memory 1004 may store the learned neural network 3 a.

The RAM1005 is a Random Access Memory (Random Access Memory) and is used for storing data and the like when a program or an application is executed.

The reading device 1007 reads information from a recording medium such as a USB (Universal Serial Bus) memory. The reading device 1007 reads the program, the neural network 3a, and the application program from the recording medium on which the program and the application program are recorded as described above, and stores the read program, the neural network, and the application program in the internal memory 1004.

The transmission/reception device 1008 is a communication circuit for performing communication by wireless or wired communication. The transmission/reception device 1008 may communicate with a server device connected to a network, for example, and download the program, the neural network 3a, and the application program described above from the server device and store them in the internal memory 1004.

The CPU1003 is a Central Processing Unit (Central Processing Unit), copies programs and applications stored in the internal memory 1004 to the RAM1005, and sequentially reads and executes commands included in the programs and applications from the RAM 1005.

[1-2. neural network 3a ]

Fig. 3 is a diagram showing the configuration of the neural network 3a according to the present embodiment.

As shown in fig. 3, the neural network 3a of the present embodiment includes: an input layer 10 to which input information is input; an intermediate layer 11 composed of a plurality of blocks 111 for extracting a feature amount of input information; and an output layer 12 for outputting the extracted feature values. Hereinafter, the neural network 3a according to the present embodiment may be referred to as LVNet. A model of the network structure having block 111 will be described below.

[1-2-1. Block 111]

Fig. 4A is a conceptual diagram for explaining a network structure of the block 111 shown in fig. 3.

The blocks 111 are stacked to constitute a neural network 3 a. As shown in FIG. 4A, the block 111 is composed of a connection block 112 and a block Hi-1The indicated base unit layer (fundamental unit) and skip connection. Further, the block 111 is called a building block (building block) in ResNet.

The basic unit layer is composed of 1 or more first convolution layers. In the example shown in FIG. 4A, H is usedi-1The basic unit layer is expressed by Conv(i-1)Convolutional layer 1111 shown and ConviThe convolutional layer 1112 shown. When the buildup layers 1111 and 1112 are mounted, as shown in fig. 4A, they are composed of a layer for Batch Normalization (BN in the figure), an activation function (ACT in the figure) such as relu, and a buildup layer (Weight in the figure). The operation order is not limited to the order shown in fig. 4A.

Skip connection using Hi-1The basic unit layer bypass, shown as H0The input represented is input to the connection block 112.

The connection block 112 is shown as CB in FIG. 4Ai-1(connection block), will use Hi-1The output of the indicated base unit layer and the output of the skipped connection are averaged.

In addition, with Hi-1The represented base unit layer and the skip connection constitute a residual block.

Fig. 4B is a diagram conceptually showing an operation performed by the convolutional layer shown in fig. 4A. FIG. 4B schematically shows a working H as an examplei-1Conv of the basic Unit layer shown(i-1)The operation performed in (1).

As shown in FIG. 4B, input to Conv(i-1)Is a tensor, which is represented by the following equation:

[ numerical formula 1]

The dimension of the input feature is represented by:

[ numerical formula 2]

w(i-1)Xw(i-1)Xw(n-1)

The kernel size of the kernel (kernel) that is convolved is represented by:

[ numerical formula 3]

b(i-1)Xb(i-1)Xbn

The feature map obtained by convolution operation using the kernel is represented by the following equation:

[ numerical formula 4]

The feature map is Conv(i)Is represented by the following equation:

[ numerical formula 5]

wiXwiXwn

Fig. 4C is a diagram conceptually showing an example of the structure of the connection block 112 shown in fig. 4A.

As shown in FIG. 4C, the connection block 112 is made of Conv(i-1) (CB)Flexible maximum function, Weights Wn CBAnd Conv(i) (CB)And the like.

[1-2-2. detailed modes of Block 111 network Structure ]

A specific mode of the network configuration of the block 111 shown in fig. 4A will be described below with reference to fig. 5.

Fig. 5 is a diagram showing a specific embodiment of the network configuration of block 111 shown in fig. 4A.

The block 111 shown in fig. 5 includes a residual block, a connection block 112A, and an adding unit 113. The block 111 may not include the addition unit 113.

The residual block is composed of a combination of 1 or more first convolution layers and a skip connection which is a connection spanning 1 or more first convolution layers. In the example shown in fig. 5, the residual block is composed of a combination of convolutional layers 1111 and 1112 and a connection spanning convolutional layers 1111 and 1112, that is, a skip connection. Note that the convolutional layer 1111 and the convolutional layer 1112 constitute the basic unit layer described in fig. 4A and 4C.

The connection block 112A is a connection block having at least the second convolution layer, and averages outputs of 1 or more first convolution layers and outputs of skip connections. In the example shown in fig. 5, the connection block 112A is composed of a convolution layer 1121, an output layer 1122, a weight 1123, a weighting layer 1124, an adder 1125, and a convolution layer 1121. In the example shown in fig. 5, since the adder 1125 does not function, the connection block 112A may not include the adder 1125.

The convolutional layer 1121 is an example of a second convolutional layer, and is inputted with the output of 1 or more first convolutional layers and the output of skip connection. The convolution layer 1121 convolves the output of the input 1 or more first convolution layers and the output of the skip connection and outputs the result. In the present embodiment, the buildup layer 1121 is represented by, for example, Conv in FIG. 5(CB)The output of convolutional layer 1112 and the output of skip-connection are input. The convolutional layer 1121 outputs a feature map obtained by convolving the input convolutional layer 1112 output and the skip-connected output to the output layer 1122. In addition, for example, in fig. 4C, the buildup layer 1121 is represented by Conv(i-1) (CB)And are stacked and inputted with Hi-1The output of the basic unit layer and the output H as the skip connection0The input of the representation.

The output layer 1122 is an example of the first output layer, and inputs the output of the second convolution layer. More specifically, the output layer 1122 outputs a value obtained by using the flexible maximum function for the output of the input second convolution layer. In the present embodiment, the output layer 1122 obtains the probability of occurrence of an output from the feature map output from the convolutional layer 1112 using, for example, a flexible maximum function, and outputs the probability to the weighting layer 1124. The output layer 1122 is represented, for example, in FIG. 5 as Softmax, for example, in FIG. 4C as a graph of the probability of occurrence using the flexibility maximum function.

The weight 1123 stores weights (sets of weights) in advance. The weights stored in the weight 1123 can be obtained by learning the connection block 112A using the learning data. Weights 1123 are represented, for example, in FIG. 5 as Weights(CB)Represented, for example, as Weights W in FIG. 4Cn CB

The weighting layer 1124 assigns pre-stored weights to the outputs of the output layer 1122. In the present embodiment, the weighting layer 1124 assigns a weight by multiplying a weight stored in advance in the weight 1123 by the output of the output layer 1122. This makes it possible to perform weighting of outputs dispersed in the residual block, and thus to improve the nonlinearity between the input and the output of the residual block.

Convolutional layerReference numeral 1126 denotes an example of the third convolutional layer, and is input to the output of the weighting layer 1124. In the present embodiment, the convolution layer 1126 outputs a feature map obtained by convolving the output of the weighting layer 1124. The convolution layer 1126 convolves the output of the weighting layer 1124, thereby down-sampling (down sampling) the output of the weighting layer 1124. Furthermore, the convolutional layer 1126 is represented by Conv in fig. 4C, for examplei (CB)

Fig. 6 is a diagram showing another specific embodiment of the network configuration of block 111 shown in fig. 4A. The same elements as those in fig. 4A, 4C, 5 and the like are denoted by the same reference numerals, and detailed description thereof is omitted.

The block 111B shown in fig. 6 is different from the block 111 shown in fig. 5 in that the structure of the connection block 112B and the connection destination of the skip connection are increased. Hereinafter, the differences will be mainly explained.

In addition to the output of the connection block 112B, the block 111B outputs an output of the skip connection. More specifically, in the block 111B, the skip connection is connected not only to the convolution layer 1121 of the connection block 112 across the convolution layer 1111 and the convolution layer 1112 but also to the addition unit 113 of the output destination of the connection block 112B across the connection block 112B. Thus, the input to the skip connection is output to the convolution layer 1121 of the connection block 112 and also to the block 111B next to the block 111B. Therefore, the block 111B also has a function of a residual block, and the nonlinearity between the input and the output of the block 111 can be improved to avoid the gradient loss, so that the accuracy can be further improved.

The connection block 112B is also provided with a direct connection, compared to the connection block 112A shown in fig. 5. Similarly to the connection block 112A, the connection block 112B has at least the second convolution layer, and averages outputs of 1 or more first convolution layers and outputs of skip connections.

The direct connection directly connects the first output layer and the weighting layer. In the present embodiment, the output of the convolution layer 1121, the output layer 1122, and the weighting layer 1124 are directly connected by direct connection, and the output of the convolution layer 1121 is connected to the addition unit 1125.

The addition unit 1125 adds the output of the convolution layer 1121 output via the direct connection and the output of the weighting layer 1124. Thus, the output of the convolution layer 1121 is forcibly nonlinear by the weighting layer 1124, and if it is directly output to the convolution layer 1126, it is possible to avoid gradient explosion or divergence even when gradient explosion or divergence occurs due to instability.

Convolutional layer 1126 is an example of the third convolutional layer, and is input to the output of weighting layer 1124 and the output of the direct connection. In the present embodiment, the convolution layer 1126 outputs a feature map obtained by convolving the output of the adder 1125. The convolution layer 1126 can down-sample the output of the adder 1125 by convolving the output of the adder 1125.

[1-3. example of installation of neural network 3a ]

Next, an example of installation of the neural network 3a will be described.

As described above, the neural network 3a includes the residual blocks in the stacked blocks 111, respectively. Therefore, the neural network 3a can be installed by a network structure using ResNet with a residual block. Further, since the neural network 3a includes the connection blocks 112A and 112B in the stacked blocks 111, the accuracy equivalent to that of ResNet can be maintained even when the neural network is mounted using a network structure in which ResNet is formed of a shallower layer.

Fig. 7 is a diagram conceptually showing an example of the installation of the network configuration of the equivalent ResNet 10. As shown in FIG. 7, the equivalent ResNet10 stack 4 Building blocks shown by Building blocks 1-4. The Building Block is composed of a combination of 2 convolutional layers and skip connection. Therefore, the equivalent ResNet10 is a network structure in which ResNet is formed of shallower layers as disclosed in the above-mentioned non-patent document 1, and has a network structure formed using 10 convolutional layers.

Fig. 8 is a diagram conceptually showing an example of installation of the neural network 3a according to the present embodiment. The neural network 3a shown in fig. 8 is an example of a network structure referred to as LVNet in the above description.

More specifically, the neural network 3a shown in fig. 8 has a network structure in which the above-described connection Block 112B is added to each of the Building blocks 1 to 4 of the equivalent ResNet10 shown in fig. 7.

The example of installation of the neural network 3a according to the present embodiment is not limited to the case shown in fig. 8. The network configuration may be such that the above-described connection Block 112B is added to each of the Building blocks of ResNet34 or equivalent ResNet 18.

Here, the network structure of ResNet34 and equivalent ResNet18 will be described.

Fig. 9A is a diagram conceptually showing an example of the network configuration of the ResNet 34. As shown in fig. 9A, 4 Building blocks represented by Building blocks 1 to 4 are stacked on the ResNet 34. The Building Block is composed of a combination of a plurality of convolutional layers and a plurality of skip connections. The Building Block1 is configured as a 6-layer convolutional layer, the Building Block2 is configured as an 8-layer convolutional layer, the Building Block3 is configured as a 12-layer convolutional layer, and the Building Block4 is configured as a 6-layer convolutional layer. The skip connection is configured as a convolutional layer spanning 2 layers. Therefore, the ResNet34 has a network structure formed using 34 convolutional layers.

Fig. 9B is a diagram conceptually showing an example of the network configuration of the equivalent ResNet 18. As shown in FIG. 9B, the equivalent ResNet18 stack of 4 Building blocks shown by Building blocks 1-4. The Building Block is composed of a combination of 4 convolutional layers and skip-connections spanning 2 convolutional layers. That is, the equivalent ResNet18 is a network structure in which ResNet is formed of a shallower layer as disclosed in the above-mentioned non-patent document 1, and has a network structure formed using 18 convolutional layers.

[2. operation of the arithmetic device 1]

An example of the operation of the arithmetic device 1 configured as described above will be described below.

Fig. 10 is a flowchart showing an outline of the operation of the arithmetic device 1 in the present embodiment. Fig. 10 shows arithmetic processing performed by 1 block 111 of the plurality of blocks 111 constituting the neural network 3 a.

First, the arithmetic device 1 inputs the first information as input information to the residual block of the block 111 constituting the neural network 3a (S10). More specifically, the arithmetic device 1 inputs the first information into a residual block composed of a combination of 1 or more first convolution layers and a skip connection which is a connection spanning 1 or more first convolution layers. Further, in the case where the Block 111 conforms to the Building Block1, the first information is input information. In case Block 111 does not comply with Building Block1, the first information is the output of the first 1 Building Block containing the Building Block of Block 111.

Next, the arithmetic device 1 inputs the feature amount of the first information extracted from the 1 or more first convolution layers of the residual block and the first information output by the skip connection of the residual block to the connection block, and averages the feature amount of the first information and the first information (S11).

[3. effects, etc. ]

According to this embodiment, by adding a connection block to a known residual block such as ResNet, the outputs of the residual blocks can be averaged by performing weighting or the like of the outputs dispersed in the residual blocks, and the nonlinearity between the input and the output of the residual blocks can be improved. Therefore, the number of blocks required to maintain accuracy can be reduced, and thus a neural network in which the model size and the amount of computation can be further reduced while maintaining accuracy can be realized.

In addition, according to this embodiment, the connection block further includes a direct connection, so that it is possible to improve the nonlinearity of the input and output of the block and avoid the gradient loss. Therefore, not only the number of blocks required to maintain accuracy can be reduced, but also explosion or divergence of the output gradient of the connection block by the direct connection can be avoided, and thus the model size and the amount of computation can be further reduced while maintaining accuracy.

Further, since the model size and the calculation amount can be further reduced while maintaining the accuracy, there is an effect that the use in a system of mounting the integrated circuit on the apparatus main body, that is, a so-called edge AI becomes easy.

For example, when a broadcast wave of a television or the like is received and the received broadcast wave is processed, it is necessary to perform a large amount of computation such as image recognition. Therefore, when using a conventional neural network such as ResNet, the conventional neural network is installed on the cloud (so-called cloud AI), and communication via a network such as the internet is necessary. When a conventional neural network is installed in the cloud, a delay occurs in broadcasting based on the communication amount or communication. On the other hand, when the neural network of the present embodiment such as LVNet is used, the neural network of the present embodiment can further reduce the model size and the calculation amount while maintaining the accuracy, and therefore, is suitable for mounting in an integrated circuit and can be installed in an apparatus main body such as a television. Therefore, the neural network according to the present embodiment can reduce the amount of communication even when communication via a network such as the internet is required, and thus can suppress the amount of communication or delay caused by communication.

(examples)

Since the validity of the neural network 3a of the present embodiment used in the arithmetic device 1 is verified, the experimental result thereof will be described as an example.

In the present embodiment, the performance of the neural network 3a used in the arithmetic device 1 is evaluated using the test a and the test B, which are 2 pieces of collected experimental data.

< Experimental data >

Fig. 11 is a diagram showing an outline of the database of the present embodiment.

The database of the present embodiment stores images collected for 4 categories such as animation, sports, music, and others as shown in fig. 11. Other categories include weather, landscape, and dialogue.

The image stored in the database is generated from, for example, 100 ten thousand or more high-resolution images collected using various resources such as YouTube (registered trademark) and Google (registered trademark). The images stored in the database are divided into 96K images as Training data (Training) and 7K images as evaluation data (Validation).

Further, test a is composed of a group of images having a small variance within class (class), and test B is composed of a group of images having a small variance between classes.

< Experimental conditions >

In this experiment, the learning of the target neural network was performed for 8 hours using a GPU (Graphics Processing Unit). The learning in this experiment was performed by the following parameters. That is, the Learning rate (Learning rate) is set to 0.025 and is set to half every 10 epochs (epochs). The learning in this experiment was performed by setting the Batch gradient parameter (Batch gradient parameter) to 0.9 using the momentum (momentum) optimization algorithm (Optimizer).

< Experimental results >

FIG. 12 is a graph showing the experimental results of the examples. More specifically, fig. 12 is a diagram showing the results of an experiment in which the accuracy of the neural network 3a of the present embodiment and the accuracy of the neural network of the comparative example were evaluated using the test a and the test B of the present embodiment. Fig. 12 shows the model size, the amount of computation (complexity of the model), the parameters, and the memory access of the neural network according to the present embodiment and the comparative example. In addition, the neural networks of the comparative examples are ResNet34 and ResNet 18. The ResNet34 corresponds to the ResNet34 shown in fig. 9A, and the ResNet18 corresponds to the equivalent ResNet18 shown in fig. 9B. The neural network 3a of the present embodiment is denoted by LR10_ CB128 and LR10_ CB128_ SH. LR10_ CB128_ SH corresponds to LVNet, a model with the network structure shown in fig. 8. LR10_ CB128 corresponds to a model having a network configuration in which the connection block 112B of the LVNet shown in fig. 8 is changed to the connection block 112A shown in fig. 5.

As shown in fig. 12, it is understood that ResNet34 and ResNet18 of the neural network of the comparative example have the same accuracy as LR10_ CB128 and LR10_ CB128_ SH of the neural network 3a of the present embodiment.

As shown in fig. 12, it is understood that the memory size and the amount of computation (complexity of computation) of the neural network 3a according to the present embodiment are significantly reduced as compared with those of the neural network of the comparative example. Furthermore, LR10_ CB128_ SH, i.e., LVNet, which is a model having a network structure shown in fig. 8, is known to exhibit relatively the highest performance compared to all other neural networks. For example, the model size and the operand (FLOPs) of LR10_ CB128_ SH are 8.2% and 6.3% of the model size and the operand of ResNet 18. That is, it is found that the model size of LR10_ CB128_ SH is reduced by 91.8% and the computation amount (FLOPs) is reduced by 92.2% compared to ResNet 18.

As described above, according to the present embodiment, the neural network 3a capable of further reducing the model size and the amount of computation while maintaining the accuracy equivalent to ResNet can be realized.

(possibilities of other embodiments)

The neural network, the arithmetic device, and the arithmetic method according to one embodiment of the present invention have been described above based on the embodiments, but the present disclosure is not limited to these embodiments. Various modifications that may occur to those skilled in the art to which the present embodiment pertains, or to which components of different embodiments are combined and constructed, are also within the scope of the present disclosure, as long as they do not depart from the spirit of the present disclosure. For example, the following cases are also included in the present disclosure.

(1) Specifically, a part or all of the components constituting the arithmetic device may be a computer system including a microprocessor, a ROM, a RAM, a hard disk unit, a display unit, a keyboard, a mouse, and the like. A computer program is stored in the RAM or hard disk unit. The microprocessor operates according to the computer program, whereby each device realizes its function. Here, the computer program is configured by combining a plurality of instruction codes expressing instructions to the computer in order to realize a predetermined function.

(2) A part or all of the components constituting the arithmetic device may be constituted by 1 system LSI (Large Scale Integration). The system LSI is an ultra-multifunctional LSI manufactured by integrating a plurality of components on 1 chip, and specifically is a computer system including a microprocessor, a ROM, a RAM, and the like. A computer program is stored in the RAM. The system LSI achieves its functions by the microprocessor operating in accordance with the computer program.

(3) Some or all of the components constituting the arithmetic device may be constituted by an IC card or a single module that can be attached to or detached from each device. The IC card or the module is a computer system constituted by a microprocessor, ROM, RAM, and the like. The IC card or the module may include the above-described super multifunctional LSI. The microprocessor operates according to a computer program, whereby the IC card or the module realizes its function. The IC card or the module may also have tamper resistance.

Industrial applicability

The present disclosure can be used in a neural network, a calculation method, and a program, and particularly, in a neural network, a calculation method, and a program that can exhibit excellent performance for visual problems even when installed in a hardware platform with limited resources.

Description of the reference numerals

1 arithmetic device

2 input part

3 treatment section

3a neural network

4 output part

10 input layer

11 intermediate layer

12. 1122 output layer

111. 111B block

112. 112A, 112B connecting block

113. 1125 addition unit

1111. 1112, 1121, 1126 convolution layer

1123 weight

1124 weighting layers

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于产生金字塔层的架构的系统和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!