WO2019095333A1 - Procédé et dispositif de traitement de données - Google Patents
Procédé et dispositif de traitement de données Download PDFInfo
- Publication number
- WO2019095333A1 WO2019095333A1 PCT/CN2017/111752 CN2017111752W WO2019095333A1 WO 2019095333 A1 WO2019095333 A1 WO 2019095333A1 CN 2017111752 W CN2017111752 W CN 2017111752W WO 2019095333 A1 WO2019095333 A1 WO 2019095333A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- layer
- convolution
- convolutional
- output feature
- packet
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
Definitions
- the present application relates to the field of data processing technologies, and in particular, to a data processing method and device.
- CNN Convolutional neural network
- a common method for reducing the amount of calculation in the prior art is to reduce the image resolution of the feature map to the original one by using a pooling layer with a kernel size of k ⁇ k. /k 2 , thereby reducing the amount of calculation by reducing the size of the image input.
- the method of reducing the amount of calculation through the pooling layer is suitable for some data processing scenarios (such as image classification), but it is not suitable for many other data processing scenarios, such as output image resolution when performing data processing such as image enhancement or super-resolution.
- the rate is generally greater than or approximately equal to the resolution of the input image, and using the pooled layer to reduce the amount of computation can result in a large amount of image information being lost.
- the embodiment of the present invention provides a data processing method and device.
- the number of feature layers of a convolutional layer can be compressed by a grouping manner, thereby reducing the amount of calculation.
- an embodiment of the present application provides a data processing method, which is applied to a convolutional neural network, where the convolutional neural network includes a compression layer, the compression layer includes a first convolutional layer and a second convolutional layer, and the second convolution The second number of output feature layers of the layer is smaller than the first number of output feature layers of the first convolutional layer, the compression layer includes n packets, n is an integer greater than 1, and n packets include the i-th packet, i is 1 All positive integers to n.
- the method includes: first, the electronic device acquires a plurality of preset weights corresponding to the i-th packet.
- the electronic device performs a convolution operation according to the plurality of preset weights corresponding to the i-th packet and the output feature layer of the first convolution layer in the i-th packet to obtain a second convolution layer in the i-th packet.
- the output feature layer is the convolution operation according to the plurality of preset weights corresponding to the i-th packet and the output feature layer of the first convolution layer in the i-th packet to obtain a second convolution layer in the i-th packet.
- the compression layer can reduce the number of feature layers, thereby enabling subsequent reduction according to the feature The amount of calculation when the layer performs further data processing is small.
- the compression layer further includes a third convolution layer, and the third quantity of the output feature layers of the third convolution layer is less than or equal to the first quantity and greater than or equal to the second quantity.
- the electronic device performs a convolution operation according to the plurality of preset weights corresponding to the i-th packet and the output feature layer of the first convolution layer in the i-th packet to obtain an output of the second convolution layer in the i-th packet
- the feature layer includes: the electronic device according to the third in the i-th group
- the first preset weight corresponding to the convolutional layer and the output feature layer of the first convolutional layer in the i-th packet are convoluted to obtain an output feature layer of the third convolutional layer in the i-th packet.
- the electronic device performs a convolution operation according to the second preset weight corresponding to the second convolutional layer in the i-th packet and the output feature layer of the third convolutional layer in the i-th packet to obtain the i-th packet.
- the second layer of the output feature layer of the layer is the second layer of the output feature layer of the layer.
- the feature layer for performing feature layer compression may include three or more consecutive convolution layers, and the electronic device may hierarchically compress the number of feature layers by using multiple convolution layers.
- the third quantity is less than the first quantity, and the second quantity is less than the third quantity.
- the phone can gradually compress the number of convolution layers through multiple convolution layers.
- the ratio of the first quantity to the third quantity is less than or equal to the first preset value, and the ratio of the third quantity to the second quantity is less than or equal to the first pre-predetermined Set the value.
- the mobile phone can compress the number of feature layers by compressing a relatively low number of convolutional layers, and avoid using a convolutional layer with a relatively high compression rate to compress the number of feature layers at one time, resulting in serious loss of feature information, thereby preserving in the feature abstraction process. More feature information.
- the fourth quantity of the output feature layer of the second convolution layer in the i-th packet is less than or equal to the third convolution in the i-th packet a fifth number of output feature layers of the layer; a fifth number of output feature layers of the third convolutional layer in the i-th packet, less than or equal to the output feature layer of the first convolutional layer in the i-th packet Six quantities.
- the number of output feature layers of each convolution layer is smaller than the number of output feature layers of the previous convolution layer of the convolution layer, thereby ensuring that the compression layer reaches the compression feature layer.
- the number of output feature layers of the first convolution layer corresponding to each of the n packets is equal, and each of the n packets is respectively The number of output feature layers of the corresponding second convolutional layer is equal.
- the output feature layer of each first convolutional layer of the compression layer corresponds to at least one of the n packets.
- the output feature layer of each first convolutional layer of the compression layer corresponds to one of the n packets.
- the seventh number of convolution layers after the compression layer is greater than the eighth number of convolution layers before the compression layer.
- the compression layer includes a convolutional layer that is the first few convolutional layers of the convolutional neural network.
- an embodiment of the present application provides an electronic device, which is applied to a convolutional neural network, where the convolutional neural network includes a compression layer, the compression layer includes a first convolution layer and a second convolution layer, and the second convolution layer
- the second number of output feature layers is smaller than the first number of output feature layers of the first convolutional layer
- the compression layer includes n packets, n is an integer greater than 1, and n packets include the i-th packet, i is 1 to All positive integers of n
- the electronic device includes: storage a unit, configured to store a plurality of preset weights corresponding to the i-th packet.
- a processing unit configured to acquire, from the storage unit, a plurality of preset weights corresponding to the i-th packet, according to multiple preset weights corresponding to the i-th packet and an output feature layer of the first convolution layer in the i-th packet A convolution operation to obtain an output feature layer of the second convolutional layer in the i-th packet.
- the compression layer further includes a third convolution layer, and the third quantity of the output feature layers of the third convolution layer is less than or equal to the first quantity and greater than or equal to the second quantity.
- the storage unit is configured to store a first preset weight corresponding to the third convolution layer in the i-th packet, and a second preset weight corresponding to the second convolution layer in the i-th packet.
- the processing unit is configured to: obtain, from the storage unit, a first preset weight corresponding to the third convolution layer in the i-th packet, and a second preset weight corresponding to the second convolution layer in the i-th packet; The first predetermined weight corresponding to the third convolutional layer in the i packets and the output feature layer of the first convolutional layer in the i-th packet are convoluted to obtain a third convolution in the i-th packet An output feature layer of the layer; and performing a convolution operation according to a second preset weight corresponding to the second convolutional layer in the ith packet and an output feature layer of the third convolution layer in the i-th packet The output feature layer of the second convolutional layer in i packets.
- the third quantity is less than the first quantity, and the second quantity is less than the third quantity.
- the ratio of the first quantity to the third quantity is less than or equal to the first preset value, and the ratio of the third quantity to the second quantity is less than or equal to the first pre-predetermined Set the value.
- the fourth quantity of the output feature layer of the second convolution layer in the i-th packet is less than or equal to the third convolution in the i-th packet a fifth number of output feature layers of the layer; a fifth number of output feature layers of the third convolutional layer in the i-th packet, less than or equal to the output feature layer of the first convolutional layer in the i-th packet Six quantities.
- the number of output feature layers of the first convolution layer corresponding to each of the n packets is equal, and each of the n packets is respectively The number of output feature layers of the corresponding second convolutional layer is equal.
- the output feature layer of each first convolution layer corresponds to at least one of the n packets.
- the output feature layer of each first convolution layer corresponds to one of the n packets.
- the seventh number of convolution layers after the compression layer is greater than the eighth number of convolution layers before the compression layer.
- an embodiment of the present application provides an electronic device, including: one or more processors and one or more memories.
- One or more memories are coupled to one or more processors, one or more memories for storing computer program code, the computer program code comprising computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs Any one of the data processing methods on the one hand.
- an embodiment of the present application provides a computer storage medium, including computer instructions, when the computer instruction is run on an electronic device, causing the electronic device to perform the data processing method according to any one of the first aspects.
- the embodiment of the present application provides a computer program product, when the computer program product is run on a computer, causing the computer to execute the data processing method according to any one of the first aspects.
- an embodiment of the present application provides a chip, including a processor and a memory, where the memory is used for storing The computer program code, the computer program code comprising computer instructions, when the processor executes the computer instructions, the electronic device performs the data processing method of any of the first aspects.
- FIG. 1 is a schematic structural diagram of a convolutional neural network provided by the prior art
- FIG. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of a convolutional neural network according to an embodiment of the present application.
- FIG. 3b is a schematic structural diagram of another convolutional neural network according to an embodiment of the present disclosure.
- 4a is a schematic structural diagram of another convolutional neural network according to an embodiment of the present application.
- 4b is a schematic structural diagram of another convolutional neural network according to an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a compression layer according to an embodiment of the present application.
- FIG. 5b is a flowchart of a data processing method according to an embodiment of the present application.
- FIG. 6a is a schematic diagram of a feature layer compression according to the prior art
- FIG. 6b is a schematic diagram of another feature layer quantity compression provided by the prior art.
- FIG. 7 is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 7b is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 8 is a schematic structural diagram of another compression layer according to an embodiment of the present application.
- FIG. 8b is a flowchart of another data processing method according to an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 9b is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 10 is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 11a is a schematic structural diagram of another convolutional neural network provided by the prior art.
- FIG. 11b is a schematic diagram of another feature layer quantity compression provided by the prior art.
- FIG. 12 is a schematic structural diagram of another convolutional neural network according to an embodiment of the present application.
- FIG. 12b is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 13 is a schematic diagram of image data processing according to an embodiment of the present application.
- Figure 13b is another effect of processing image data according to an embodiment of the present application.
- FIG. 13c is another image data processing effect diagram provided by an embodiment of the present application.
- FIG. 13 is a schematic diagram of another image data processing effect according to an embodiment of the present application.
- FIG. 14 is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 15 is a schematic structural diagram of another compression layer according to an embodiment of the present disclosure.
- FIG. 16 is a schematic structural diagram of another electronic device according to an embodiment of the present disclosure.
- the method of using the pooling layer to reduce the amount of calculation in the prior art reduces the resolution of the image, and is not suitable for many other scenarios.
- the number of feature layers of the convolution layer can be compressed by grouping. Reduce the amount of calculation without affecting the resolution of the image, so it can be applied to a variety of data processing scenarios.
- PSNR Peak signal to noise ratio
- Convolutional kernel The weight matrix used in convolution, which is the same size as the image area used.
- Receptive field The size of the area on the original input image where the pixel points on the feature layer output by each layer of the convolutional neural network are mapped.
- the data processing device is an electronic device that processes data, voice, and the like by using a convolutional neural network, and may be, for example, a server or a terminal.
- the electronic device when the electronic device is a terminal, the electronic device may specifically be a desktop computer, a portable computer, a personal digital assistant (PDA), a tablet computer, an embedded device, a mobile phone, an intelligent peripheral device (such as a smart watch, a hand). Rings, glasses, etc.), TV set-top boxes, surveillance cameras, etc.
- PDA personal digital assistant
- the electronic device may specifically be a desktop computer, a portable computer, a personal digital assistant (PDA), a tablet computer, an embedded device, a mobile phone, an intelligent peripheral device (such as a smart watch, a hand). Rings, glasses, etc.), TV set-top boxes, surveillance cameras, etc.
- PDA personal digital assistant
- TV set-top boxes surveillance cameras, etc.
- the embodiments of the present application do not limit the specific types of electronic devices.
- FIG. 2 is a schematic diagram showing the hardware structure of the electronic device 200 according to the embodiment of the present application.
- the electronic device 200 can include at least one processor 201, a communication bus 202, and a memory 203.
- the electronic device 200 can also include at least one communication interface 204.
- the processor 201 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU), and a field programmable A field programmable gate array (FPGA), or one or more integrated circuits for controlling the execution of the program of the present application.
- CPU central processing unit
- ASIC application-specific integrated circuit
- GPU graphics processing unit
- FPGA field programmable A field programmable gate array
- Communication bus 202 can include a path for communicating information between the components described above.
- the communication interface 204 uses devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. .
- devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc. .
- RAN radio access network
- WLAN wireless local area networks
- the memory 203 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
- the dynamic storage device can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this.
- the memory can exist independently and be connected to the processor via a bus.
- the memory can also be integrated with the processor.
- the memory 203 is configured to store the application code that implements the solution provided by the embodiment of the present application, and the convolutional neural network model structure, the weight, and the intermediate result of the processor 201 when the solution provided by the embodiment of the present application is used, and
- the processor 201 controls the execution.
- the processor 201 is configured to execute the application code stored in the memory 203 to implement the data processing method provided by the following embodiments of the present application.
- processor 201 may include one or more CPUs, such as CPU0 and CPU1 in FIG.
- the electronic device 200 may include multiple processors, such as the processor 201 and the processor 207 in FIG. Each of these processors can be a single-CPU processor or a multi-core processor.
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
- the electronic device 200 may further include an output device 205 and an input device 206.
- Output device 205 is in communication with processor 201 and can display information in a variety of ways.
- the output device 205 can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. Wait.
- Input device 206 is in communication with processor 201 and can accept user input in a variety of ways.
- input device 206 can be a mouse, keyboard, camera, microphone, touch screen device, or sensing device, and the like.
- Convolutional neural networks can be used to process a variety of data, such as image data, audio data, and the like.
- the convolutional neural network may include a plurality of neural network layers, which may include one of a convolutional layer, a fully connected layer, a pooled layer, a normalized layer, an activation function layer, or an inverted convolutional layer, or Multi-layered.
- the convolution layer can be used for convolution operation according to the convolution kernel to perform feature extraction on the data to be processed; each node of the fully connected layer is connected with all nodes in the previous neural network layer for extracting the front side
- the features are integrated; the pooling layer is used to compress the feature layer by reducing the resolution; the normalized layer can be used to transform the dimensioned expression into a dimensionless expression;
- the activation function layer can be used to add nonlinear factors to the convolutional neural network.
- the convolutional neural network may also include a deconvolution layer that can be used to magnify the resolution of the image features when processing the image data.
- a simple structural schematic of a convolutional neural network can be seen in Figure 3a.
- the pooling layer, the normalization layer, or the activation function layer may also be divided into convolution layers.
- a convolutional neural network model SRCNN
- FSRCNN convolutional neural network model
- Conv(x, y, z) represents a convolution layer in which the number of input feature layers is z, the number of output feature layers is y, and the convolution kernel is small x ⁇ x;
- Deconv(x, y, z, m) denotes an inverse convolution layer in which the number of input feature layers is z, the number of output feature layers is y, the convolution kernel is small x x x, and the convolution lateral step size and the vertical step size are m.
- different neural network layers calculate the input feature layer differently, and the weights are different. These weights determine the calculation coefficients of the neural network layer. These weights can be obtained through training. The structure and weight of the neural network layer determine the dimensions and values of the final output information.
- a feature layer is a data structure in which the data dimension in the convolutional layer is one-dimensional or multi-dimensional.
- the input of the convolutional layer is a first predetermined number (for example, a positive integer p) of the input feature layer
- the output of the convolutional layer is a second predetermined number (for example, a positive integer q) of the output feature layer, the output feature layer and
- the operation in the middle of the input feature layer is to convolve all input feature layers separately for each output feature layer using different weighted convolution kernels.
- the p processed feature layers are obtained, and the p processed feature layers are added and added to the bias to obtain the data of the output feature layer.
- the input feature layer of the next convolutional layer is the output feature layer of the previous convolutional layer. That is, in a convolutional neural network, each output feature layer of the previous convolutional layer is connected to each output feature layer of the latter convolutional layer.
- the parameters affecting the structure of the convolution layer may include the number of input feature layers, the number of output feature layers, the length of the convolution kernel, and the width of the convolution kernel.
- the weight type corresponding to the convolutional layer includes the weight coefficient (the number is the convolution kernel length ⁇ the convolution kernel width) in each convolution kernel, and the offset (the number is 1) corresponding to each convolution kernel, thus convolution
- the formula for calculating the total weight of the layer can be found in Equation 1:
- Total weight of convolutional layer (convolution kernel length ⁇ convolution kernel width +1) ⁇ number of input feature layers ⁇ number of output feature layers
- Equation 2 the formula for calculating the total weight of the convolutional layer can be found in Equation 2 below:
- Total weight of convolutional layer length of convolution kernel ⁇ width of convolution kernel ⁇ number of input feature layers ⁇ number of output feature layers
- Convolution layer multiplication number number of input feature layers ⁇ number of output feature layers ⁇ convolution kernel length ⁇ convolution kernel width ⁇ feature layer length / convolution horizontal step size ⁇ feature layer width / convolution vertical step size 3
- the convolutional neural network may include a compression layer, which may include a first convolutional layer and a second convolutional layer.
- the second number of output feature layers of the second convolution layer in the compression layer is less than the first number of output feature layers of the first convolution layer. If the second quantity is a, the first quantity is b, and both a and b are positive integers, then a is less than b. It can be seen that the compression layer can be used to compress and reduce the number of feature layers in the convolutional neural network.
- the compression layer may include n packets, where n is an integer greater than 1, that is, the first convolutional layer and the second convolutional layer in the compression layer may correspond to n packets.
- n is an integer greater than 1
- the mobile phone can perform the following operations:
- the mobile phone acquires multiple preset weights corresponding to the i-th group.
- the mobile phone may read a plurality of preset weights corresponding to the i-th packet from the local or remote storage unit, and the preset weight may be a coefficient value obtained by multiple training.
- the mobile phone performs a convolution operation according to the plurality of preset weights corresponding to the i-th group and the output feature layer of the first convolution layer in the i-th group to obtain a second convolutional layer in the i-th packet. Output feature layer.
- the compression layer can reduce the number of feature layers, thereby enabling subsequent reduction according to the feature The amount of calculation when the layer performs further data processing is small.
- the method provided by the embodiment of the present application does not affect the resolution of the image when processing the image data, and thus can be applied to various data processing scenarios, such as image enhancement, compared with the prior art, which reduces the amount of calculation by the pooling layer.
- image enhancement compared with the prior art, which reduces the amount of calculation by the pooling layer.
- each packet is convoluted using a convolution kernel independent of other packets and a preset weight according to a certain number of input feature layers corresponding to the packet, And each packet outputs a certain number of output feature layers subjected to a convolution operation; an output feature layer of the first convolution layer in each group is used to calculate an output feature layer of the second convolution layer in the same group;
- the type of convolutional layer structure may be referred to as a multi-branch convolutional layer, and the compression layer of such a structure may be referred to as a multi-branch compression layer.
- the data is divided into n groups, and the results obtained when the packet data is convoluted are independent of each other, and each group is sequentially subjected to multi-layer convolution.
- the convolution operation of the layer and the data flow corresponding to the packet can be considered as a branch.
- the convolution layer included in the compression layer is a continuous plurality of convolution layers, wherein the continuous refers to the output characteristics of the previous convolution layer in the two adjacent convolution layers.
- the layer is used as the input feature layer of the latter convolutional layer to calculate the output feature layer of the latter convolutional layer.
- the grouping situation of the first convolution layer output feature layer is the second The grouping of the convolutional layer input feature layer corresponds, and each packet in the compression layer and the data in each packet are continuous.
- the first layer of convolution it is assumed that there are 8 output feature layers in total, corresponding to 2 output feature layers in each of 4 groups, then there are only 4 groups in the second layer convolution layer.
- each input feature layer in the packet corresponds to a corresponding output feature layer of the first convolutional layer 4 groups to ensure continuity of data and packets.
- a high compression ratio can be achieved by performing layered compression using a plurality of convolution layers.
- a convolution with a compression ratio of 2 by two feature layers is performed.
- the layer achieves a compression effect with a feature layer number compression ratio of 4.
- a larger feature layer number compression ratio (e.g., 4) is achieved by using a convolutional layer.
- the number of feature layers is compressed from an equal value to an equal other.
- the amount of calculation for further data processing according to the reduced number of feature layers may be made smaller.
- the feature layer compression is performed by different feature layer quantity compression methods, the amount of calculation required for the compression process is different.
- the calculation amount required for the compression process can be referred to the following description:
- Multiplication number 1 24 ⁇ 12 ⁇ first convolutional layer convolution kernel length ⁇ first convolutional layer convolution kernel width ⁇ feature layer length/convolution lateral step size ⁇ feature layer width/convolution vertical step length+ 12 ⁇ 6 ⁇ second convolutional layer convolution kernel length ⁇ second convolutional layer convolution kernel width ⁇ feature layer length/convolution lateral step size ⁇ feature layer width/convolution vertical step size.
- the total weight 1 of the number of feature layer compressions obtained according to the above formula 2 is:
- Total weight 1 first convolutional layer convolution kernel length ⁇ first convolutional layer convolution kernel width ⁇ 24 ⁇ 12 + second convolutional layer convolution kernel length ⁇ second convolutional layer convolution Core width ⁇ 12 ⁇ 6.
- the number of feature layers is compressed by a convolution layer with a feature layer number reduction ratio of 4, and the number of multiplications when the number of feature layer compressions is calculated according to the above formula 3 is :
- Multiplication number 2 24 ⁇ 6 ⁇ convolution kernel length ⁇ convolution kernel width ⁇ feature layer length / convolution lateral step size ⁇ feature layer width / convolution vertical step size.
- the total weight 2 of the number of feature layer compressions obtained according to the above formula 2 is:
- the total weight 2 convolution kernel length ⁇ convolution kernel width ⁇ 24 ⁇ 6.
- the first convolutional layer and the second convolutional layer correspond to two groups, and the first group
- the number of output feature layers of one roll of layers is 12, the number of output feature layers of the second convolution layer in the first group is 3, and the 12 output feature layers of the first convolution layer in the first group are The input feature layer of the second convolutional layer in the first group; the number of output feature layers of the first convolutional layer in the second group is 12, and the number of output feature layers of the second convolution layer in the second group 3, and the 12 output feature layers of the first convolutional layer in the second group are the input feature layers of the second convolution layer in the second group; and, the number of all output feature layers of the first convolution layer 24, the 12 output feature layers of the first convolutional layer in the first grouping are different from the 12 output feature layers of the first convolutional layer in the second grouping, and the number of all output feature layers of
- Multiplication number 3 (12 ⁇ 3 ⁇ second convolutional layer convolution kernel length ⁇ second convolutional layer convolution kernel width ⁇ feature layer length / convolution lateral step size ⁇ feature layer width / convolution vertical step size) ⁇ 2.
- the total weight 3 when performing the feature layer compression obtained according to the above formula 2 is:
- the total weight 3 (second convolutional convolution kernel length ⁇ second convolutional convolution kernel width ⁇ 12 ⁇ 3) ⁇ 2.
- the first convolutional layer and the second convolutional layer correspond to three groups, and the first group
- the number of output feature layers of one convolution layer is 8, the number of output feature layers of the second convolutional layer in the first group is 2, and the 8 output feature layers of the first convolution layer in the first group are The input feature layer of the second convolutional layer in the first group; the number of output feature layers of the first convolutional layer in the second grouping is 8, and the number of output feature layers of the second convolutional layer in the second grouping 2, and the 8 output feature layers of the first convolutional layer in the second group are the input feature layers of the second convolution layer in the second group; the output feature layer of the first convolution layer in the third group
- the number of output feature layers is 8, the number of output feature layers of the second convolutional layer in the third group is 2, and the 8 output feature layers of the first convolution layer in the third group are the
- the number of all output feature layers of the first convolution layer is 24, the first group, the second group, and 8 layers convolution output characteristic three-layer packet are respectively different, the number of all output characteristic layer of the second layer is 6 convolution.
- the number of multiplications 4 when performing the feature layer compression obtained according to the above Equation 3 is:
- Multiplication number 4 (8 ⁇ 2 ⁇ second convolutional convolution kernel length ⁇ second convolutional layer convolution kernel width ⁇ feature layer length / convolution lateral step size ⁇ feature layer width / convolution vertical step size) ⁇ 3.
- the total weight 4 when compressing the number of feature layers obtained according to the above formula 2 is:
- the total weight 4 (second convolutional convolution kernel length ⁇ second convolutional convolution kernel width ⁇ 8 ⁇ 2) ⁇ 3.
- the comparison multiplication number 1, the multiplication number 2, the multiplication number 3, and the multiplication number 4 can be known when the first scheme in the prior art is used.
- the number of feature layers is compressed, the number of multiplications is large, and the amount of calculation is large.
- the number of feature layers is compressed by the second scheme in the prior art, the number of multiplications is centered, and the calculation amount is centered;
- the scheme performs feature layer compression the number of multiplications is the least and the amount of calculation is also minimal.
- the calculation amount is the smallest, and the data processing speed of the convolutional neural network is the fastest, and the mobile phone can The consumption is also minimal.
- the total weight is small, and the convolution calculation is performed according to the weight.
- the number of intermediate results obtained is also small, the storage space occupied by weights and intermediate results is small, and the time and energy consumption required for mobile phone read/write weights and intermediate results are also small, so the energy consumption of mobile phones is also small.
- the mobile phone realizes the compression of the number of feature layers by one convolution layer, and in particular, the scheme is more suitable for the characteristics of the compression layer.
- the number compression ratio for example, 2
- the compression layer in the embodiment of the present application may further include a third convolution layer, and the third quantity of the output feature layer of the third convolution layer is less than or equal to the first quantity and greater than or equal to the second The quantity, such that the second quantity is made smaller than the first quantity, thereby achieving the purpose of reducing the number of feature layers.
- the mobile phone acquiring the plurality of preset weights corresponding to the i-th packet in the foregoing step 101 may include:
- the mobile phone acquires a first preset weight corresponding to the third convolution layer in the i-th packet, and a second preset weight corresponding to the second convolution layer in the i-th packet.
- the mobile phone performs a convolution operation according to the plurality of preset weights corresponding to the i-th packet and the output feature layer of the first convolution layer in the i-th packet in the above step 102 to obtain the second volume in the i-th packet.
- the layered output feature layer can include:
- the mobile phone performs a convolution operation according to a first preset weight corresponding to a third convolution layer in the i-th group and an output feature layer of the first convolution layer in the i-th group to obtain an i-th packet.
- the third layer of the output feature layer of the layer is the third layer of the output feature layer of the layer.
- the mobile phone performs a convolution operation according to a second preset weight corresponding to the second convolution layer in the i-th packet and an output feature layer of the third convolution layer in the i-th packet to obtain an i-th packet.
- the output feature layer of the second convolutional layer is
- the compression layer may also include three or more convolution layers, and the mobile phone may hierarchically compress the number of feature layers through multiple convolution layers.
- the first preset weight and the second preset weight may respectively include a plurality of specific weight values.
- each packet of the compression layer is used for the purpose of achieving the number of compressed feature layers.
- the number of output feature layers of the latter convolutional layer may be less than or equal to the number of output feature layers of the previous convolutional layer.
- the compression layer includes a continuous first convolutional layer, a third convolutional layer, a second convolutional layer, and an Xth convolutional layer, and the number of output feature layers of the third convolutional layer is less than The number of output feature layers of the first convolutional layer, the number of output feature layers of the second convolutional layer is equal to the number of output feature layers of the third convolutional layer, and the number of output feature layers of the Xth convolutional layer is less than the second The number of output feature layers of the convolutional layer.
- the mobile phone can compress the number of feature layers through the third convolutional layer and the Xth convolutional layer.
- the number of output feature layers of the latter convolutional layer is smaller than the number of output feature layers of the previous convolutional layer.
- the compression layer includes a continuous first convolutional layer, a third convolutional layer, and a second convolutional layer, and the number of output feature layers of the third convolutional layer is smaller than that of the first convolutional layer
- the number of output feature layers, the number of output feature layers of the second convolutional layer is less than the number of output feature layers of the third convolutional layer.
- the number of compression feature layers can be achieved with fewer convolution layers.
- the number of feature layers of the compression layer is relatively high (for example, greater than 2)
- a second scheme in the prior art is adopted, or a scheme such as shown in FIG. 7a and FIG. 7b is adopted, a convolution layer is adopted.
- the number of feature layers achieved by the convolution layer is relatively high at one time, so that the feature information extracted by the feature layer after the convolution layer is compressed is seriously degraded, resulting in a convolutional neural network.
- the data processing effect is poor.
- the first scheme in the prior art is adopted, the feature layer is hierarchically compressed by a plurality of convolution layers, so that compression can be achieved by not achieving a higher feature layer compression ratio by one convolution layer at a time.
- the latter feature layer extracts more feature information, but because the scheme has a large amount of computation in the feature layer compression process itself, the calculation amount of the data processing process is also large.
- the compression layer provided by the embodiment of the present application is used to hierarchically compress the number of feature layers by using multiple convolution layers, since a higher feature layer compression ratio is not realized by one convolution layer at one time, compression can be performed.
- the latter feature layer extracts more feature information, and can reduce the amount of calculation of the feature layer number compression process. Therefore, the multi-branch compression layer for hierarchically compressing the number of feature layers by multiple convolutional layers provided by the embodiments of the present application is more suitable for the case where the number of feature layers of the compression layer is relatively high.
- the second solution in the prior art may be referred to as a non-branched hierarchical feature layer high compression ratio method.
- the first solution in the prior art may be referred to as a non-branch hierarchical feature layer compression method.
- a method for achieving a higher compression ratio by using one of the compression layers of the multi-branch structure may be referred to as a multi-branch one-time feature layer high compression ratio method.
- multiple layers in the compression layer of the multi-branch structure are adopted.
- the method of convolutional layer hierarchical compression can be referred to as a multi-branch hierarchical feature layer compression method.
- the first convolutional layer, the third convolutional layer, and the second convolutional layer correspond to two groups, and the number of output feature layers of the first convolution layer in the first group is 12,
- the number of output feature layers of the third convolutional layer in the first grouping is 6, the number of output feature layers of the second convolutional layer in the first grouping is 3;
- the output of the first convolutional layer in the second grouping The number of feature layers is 12, the number of output feature layers of the third convolutional layer in the second group is 6, and the number of output feature layers of the third convolution layer in the second group is 3; and, the first volume
- the number of all output feature layers of the laminate is 24, the number of all output feature layers of the third convolutional layer is 12, and the number of all output feature layers of the third convolutional layer is 6.
- the number of multiplications 5 when performing the feature layer compression obtained according to Equation 3 above is:
- Number of multiplications 5 (12 ⁇ 6 ⁇ third convolutional convolution kernel length ⁇ third convolutional convolution kernel width ⁇ feature layer length / Convolutional lateral step size ⁇ feature layer width / convolution vertical step size + 6 ⁇ 3 ⁇ second convolutional layer convolution kernel length ⁇ second convolutional layer convolution kernel width ⁇ feature layer length / convolution lateral step length ⁇ Feature layer width / convolution vertical step size) ⁇ 2.
- the total weight 5 when performing the feature layer compression obtained according to the above formula 2 is:
- Total weight 5 (third convolutional convolution kernel length ⁇ third convolutional convolution kernel width ⁇ 12 ⁇ 6 + second convolutional layer convolution kernel length ⁇ second convolutional layer convolution kernel width ⁇ 6 ⁇ 3) ⁇ 2.
- the first embodiment of the prior art performs the feature layer number compression by using multiple convolution layers, and the embodiment of the present application is adopted.
- the feature layer compression method provided can reduce the amount of calculation in the feature layer compression process when the feature layer is compressed by the same number of convolution layers.
- the number of output feature layers of the previous convolution layer and the output of the subsequent convolution layer are included in two adjacent convolution layers of each group of the compression layer.
- the ratio of the number of feature layers may be less than or equal to the first preset value.
- the first preset value is small, and may be set as needed, for example, may be 2.
- the mobile phone can gradually compress and compress the number of feature layers by using a plurality of compressed lower convolution layers, thereby avoiding the high number of feature layers compressed by the convolution layer at one time, so that the feature information extracted by the compressed feature layer is seriously lost. problem.
- the ratio of the first quantity to the third quantity is less than or equal to a first preset value (for example, 2), and the ratio of the third quantity to the second quantity is less than or equal to the first preset value.
- a first preset value for example, 2
- the ratio of the third quantity to the second quantity is less than or equal to the first preset value.
- the embodiment of the present application performs the feature layer through multiple convolution layers.
- the quantity compression can make the compression of a single compression of each convolution layer of the compression layer relatively low, so that no excessive feature information is lost, and thus, in the process of compressing the number of feature layers, under the premise of reducing the calculation amount, Extract more feature information.
- the main principle of the feature layer compression method adopted in the prior art is that in the feature abstraction process, the purpose of reducing the amount of calculation is achieved by using a smaller amount of data to express a more abstract feature layer.
- the main principle of the feature layer quantity compression method provided by the embodiment of the present application is that, in the feature abstraction process, the connection between the output feature layer of the latter convolution layer and the output feature layer of the previous convolution layer is reduced. The relationship is reduced to achieve the purpose of reducing the amount of calculation.
- connection between adjacent two convolutional layers is more likely to be redundant, and the lower layer of the previous convolutional layer is backward to the next convolutional layer.
- the partial connection utilization between the high-level feature layers is low, resulting in lower overall connection utilization.
- the output feature layer of the previous convolution layer is only the latter convolution layer in the same packet.
- Output The stratum has a connection relationship, and has no connection relationship with the output feature layer of the latter convolution layer in other groups, thereby reducing connection redundancy between the front and rear feature layers, thereby reducing the complexity of the convolutional neural network and reducing The number of multiplications reduces the amount of calculation.
- the model wants to achieve a good processing effect, its weight parameters after training must make each layer of the feature layer well preserved and extract the effective information in the previous layer feature layer.
- the output feature layer is mainly determined by the value of a small part of the input feature layer with a large weight value, that is, only a small part of the input.
- the feature layer has a large effect on the result of this output feature layer, and the value of most input feature layers has less influence on this output feature layer, which means that there is more information and computational redundancy;
- the output feature layer has a large convolution weight value corresponding to different input layers and the difference is small, the output layer result is determined by most input layers, which means that there is less information and computational redundancy.
- the existing convolutional neural network model shown in FIG. 11a is used for super-resolution image processing
- a convolution kernel of size 1 ⁇ 1 and a non-branched convolution layer as shown in FIG. 11b are used
- the weights when convolution operation is performed on convolution layer A in Fig. 11b can be seen in Table 1 below.
- the convolutional layer A in Fig. 11b corresponds to the convolutional layer Conv (1, 12, 24) shown in Fig. 11a.
- the weights whose absolute values are greater than the second preset value for example, 0.1
- the magnitude of the absolute value of the weight represents the reference relationship of the output feature layer to the input feature layer, and represents the latter convolution layer.
- the connection relationship between the output feature layer and the output feature layer of the previous convolution layer since the output feature layer of the latter convolution layer is the output feature layer of the previous convolution layer, the magnitude of the absolute value of the weight represents the reference relationship of the output feature layer to the input feature layer, and represents the latter convolution layer.
- a convolution kernel of size 1 ⁇ 1 and a corresponding four groups as shown in FIG. 12b are used.
- the weight of the third convolutional layer in Fig. 12b for convolution operation can be seen in Table 2 below.
- the convolutional layer A in Fig. 12b corresponds to the convolutional layer Conv (1, 12, 24) shown in Fig. 12a.
- the number of output feature layers of the first convolutional layer included in each packet is 6
- the number of output feature layers of the third convolutional layer included in each packet is three.
- the weight of the absolute value greater than the second preset value for example, 0.1
- the convolution operation is divided into four groups, and the calculation of each output feature layer of the third convolution layer uses only a quarter of the non-branched structure convolution layer.
- the feature layer is input, that is, 6 input feature layers, so Table 2 is a 6 ⁇ 12 matrix.
- the absolute value of the majority of the weights used to calculate the output feature layer according to the input feature layer is greater than the second preset value of 0.1, that is, the correlation between the output feature layer and the input feature layer is strong,
- the feature extraction of the three-volume layer makes more efficient use of most of the feature layers in the first convolutional layer and the same group, and the connection utilization ratio between the first convolutional layer and the third convolutional layer in each group is higher. There is less redundancy in the connection.
- the ratio of the weights in the absolute value greater than 0.1 included in Table 2 is larger, so that the compression of the multi-branch structure provided by the embodiment of the present application can be illustrated as compared with the first scheme in the prior art.
- the connection between the convolution layers is more utilized and the connection redundancy is smaller.
- the multi-branch hierarchical feature layer compression method provided by the embodiment of the present application can reduce the connection between the convolution layers by grouping, reduce the connection redundancy, information redundancy and computational redundancy between the convolution layers to reduce the compression process.
- the amount of calculation in compared with the non-branch hierarchical feature layer compression method in the prior art, when the multi-branch hierarchical feature layer compression method provided by the embodiment of the present application is used, although part of the connection is reduced and part of the feature information is lost, It is connection redundancy, so there is very little useful information lost.
- the feature information that can be extracted by the compressed feature layer is still much, and the impact on the data processing result is small. That is to say, the convolutional layer of the multi-branch structure can achieve the effect of reducing the amount of calculation of the compression process at the cost of losing a small amount of useful information.
- the convolutional layer Conv (1, 12, 24) is located in the first few convolutional layers of the convolutional neural network, so that the extracted feature information is a shallow feature of the image to be processed.
- the lower convolutional layer in the convolutional neural network extracts the deep features of the image to be processed.
- the output characteristics of the convolutional layer Conv (1, 12, 24) are corresponding to the four groups, and the effect diagrams of the three output feature layers of the third convolution layer corresponding to each group can be seen in FIG. 13a.
- Figure 13b, Figure 13c and Figure 13d It can be seen from the output feature layers corresponding to each group in FIG. 13a to FIG. 13d that each group has different tropism in feature extraction, and thus the convolution layer of the multi-branch structure is described from another angle to the image features.
- the acquisition is not simply to repeat the feature acquired by a single branch four times, but to extract a plurality of different feature information, so that the feature information extracted by the compressed feature layer is more.
- the data processing effect of the multi-branch hierarchical feature layer compression method in the embodiment of the present application has a small difference from the data processing effect of the non-branch hierarchical feature layer compression method in the prior art.
- the image test set is subjected to 3x image enlargement using the existing super-resolution convolutional neural network model shown in FIG. 11a and the multi-branch convolutional neural network model shown in FIG. 12a, respectively.
- the difference between the peak signal-to-noise ratio of the output image of the two methods is only about 0.1 dB (decibel), but the gain from the computational reduction caused by the multi-branch convolutional neural network model shown in Fig. 12a is obvious.
- the calculation amount of the 4-branch convolutional layer can be reduced by 75% in the feature layer compression process, and the overall calculation amount of the model can be reduced by about 29%.
- the considerable benefit of reduced computational load is much greater than the slight degradation of image processing.
- the branch hierarchical feature layer compression method corresponding to the multi-branch super-resolution convolutional neural network shown in FIG. 12a and the non-branch one-time feature layer high compression using the prior art are used.
- the calculation amount is basically the same, but the multi-branch super-resolution convolutional neural network shown in Fig. 12a brings about an increase of the peak signal-to-noise ratio of the output image exceeding 0.2 dB, and thus the present embodiment is also embodied.
- the advantage of the branch hierarchical feature layer compression method provided by the application embodiment in data processing.
- the number of output feature layers of the first convolution layer corresponding to each of the n packets may be equal or unequal, and each of the n packets respectively corresponds to the second volume.
- the number of stacked output feature layers may be equal or unequal, i being all positive integers from 1 to n.
- the number of output feature layers of the first convolutional layer corresponding to each of the n packets is equal, and the number of output feature layers of the second convolutional layer corresponding to each of the n packets is also equal
- the number of feature layers of the first convolutional layer output is evenly distributed among n packets, and the number of second convolutional layer output feature layers is also equally distributed among n packets. When the average allocation is employed, the amount of calculation can be made smaller.
- each of the output feature layers in the first convolutional layer corresponds to only one packet, that is, in the above embodiment, there is no output feature layer between the first convolutional layers in different groups. Overlap, which can reduce connection redundancy more.
- the output feature layer of each first convolutional layer may correspond to one or more output feature layers, that is, there is an overlap between output feature layers of the first convolutional layer in different groups, so that Improve the flexibility of grouping.
- FIG. 14 shows a schematic structural view of a compression layer in this case.
- the third output feature layer and the fourth output feature layer of the first convolutional layer correspond to two packets, a first packet and a second packet, and the other output feature layers of the first convolution layer correspond to only one packet.
- the output feature layer between the first convolutional layer and the second convolutional layer still has a connection relationship only within the packet, thereby also reducing connection redundancy, reducing the number of multiplications, and reducing the amount of calculation.
- the above embodiment is such that the number of output feature layers of each convolutional layer in each group is smaller than the convolution of the input packet.
- the number of input feature layers of the layer is described as an example. In fact, the number of output feature layers per convolutional layer in each packet can be less than or the number of input feature layers of the convolutional layer of the packet. However, the number of output feature layers of the compression layer is still less than the number of input feature layers.
- the number of output feature layers of the compression layer is the number of output feature layers of the last convolution layer included in the compression layer, and the number of input feature layers of the compression layer is the first convolution layer of the forefront of the compression layer. The number of output feature layers.
- the fourth number of output feature layers of the second convolutional layer in the i-th packet is less than or equal to the i-th a fifth number of output feature layers of the third convolutional layer in the group; a fifth number of output feature layers of the third convolutional layer in the i-th group, less than or equal to the first volume in the i-th packet.
- the output feature layer of the first convolutional layer in the compression layer is the output feature layer of the fourth convolutional layer
- the output feature layer of the second convolutional layer is the input feature layer of the fifth convolutional layer.
- the convolution layer included in the compression layer is a convolutional layer located in the middle of the convolutional neural network processing flow, not the first convolutional layer in the convolutional neural network, nor the last convolution of the convolutional neural network. Floor.
- the seventh number of convolution layers after the compression layer may be greater than the eighth number of convolution layers before the compression layer. That is, the compression layer includes a convolutional layer that is the first few convolutional layers of the convolutional neural network (but not the first convolutional layer).
- the superposition of the convolutional layer is an extraction process of abstracting the image information, in order to ensure that the extracted feature layer can better represent the image feature information contained in the original image, the former convolution
- the number of feature layers of a layer is generally large.
- the convolutional layer of the latter layer re-abstracts the feature layer image information of the previous layer, and the image information transmitted by the upper layer can be represented by a smaller number of feature layers.
- the handset can perform feature layer compression on the first few convolutional layers of the convolutional neural network.
- the convolution layer of the multi-branch structure provided by the embodiment of the present application may also be combined with the convolution layer of the non-branched structure in the prior second scheme to form a hybrid compression layer for performing the feature layer.
- the amount of compression Illustratively, referring to FIG.
- the convolutional layer w and the convolutional layer e are convolutional layers of a multi-branch structure
- the convolutional layer r is a convolutional layer of a non-multi-branch structure
- the output feature layer of the convolutional layer r The number is smaller than the number of output feature layers of the convolution layer w; the number of output feature layers of the convolution layer r is less than or equal to the number of output feature layers of the convolution layer e, and the number of output feature layers of the convolution layer e is less than or equal to The number of output feature layers of the convolutional layer w.
- the output characteristics of the mobile phone according to the previous convolution layer for example, the first convolution layer described above
- the output feature layer of a subsequent convolution layer for example, the third convolution layer described above
- the arithmetic processing herein may include at least one of increasing offset, pooling processing, normalization processing, or nonlinear processing according to an activation function.
- the electronic device includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above functions.
- the present application can be implemented in a combination of hardware or hardware and computer software in combination with the algorithmic steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. Professionals can use different methods to implement each specific application. The described functionality, but such implementation should not be considered beyond the scope of this application.
- the embodiment of the present application may divide the functional modules of the electronic device according to the foregoing method example.
- each functional module may be divided according to each function, or two or more functions may be integrated into one processing module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
- FIG. 16 shows a possible composition diagram of the electronic device 300 involved in the above and the embodiments.
- the electronic device can be applied to a convolutional neural network, the convolutional neural network comprising a compression layer, the compression layer comprising a first convolutional layer and a second convolutional layer, the second quantity of the output feature layer of the second convolutional layer being less than The first number of output feature layers of the first convolutional layer, the compressed layer includes n packets, n is an integer greater than 1, n packets include the ith packet, and i is all positive integers from 1 to n.
- the electronic device 300 can include a storage unit 31 and a processing unit 32.
- the storage unit 31 can be used to support the electronic device 300 to store a plurality of preset weights corresponding to the i-th packet.
- the processing unit 32 may be configured to support the electronic device 300 to acquire, from the storage unit, a plurality of preset weights corresponding to the i-th packet, and according to the plurality of preset weights corresponding to the i-th packet and the first convolution in the i-th packet.
- the output feature layer of the layer performs a convolution operation to obtain an output feature layer of the second convolutional layer in the i-th packet.
- the storage unit 31 can also be used to store the application code that implements the solution provided by the embodiment of the present application, and the convolutional neural network model structure, the weight, and the intermediate result when the processing unit 32 is operated by using the solution provided by the embodiment of the present application.
- the processing unit 32 may also be used to support the electronic device 300 to perform steps 1010, 1021, and 1022 in FIG. 8b; and/or other processes of the techniques described herein.
- the electronic device includes, but is not limited to, the unit modules enumerated above.
- the electronic device may further include a communication unit, and the communication unit may include a transmitting unit for transmitting data or signals to other devices, and receiving data or signals sent by other devices. Receiving unit, etc.
- the specific functions that can be implemented by the above-mentioned functional units include, but are not limited to, the functions corresponding to the method steps of the foregoing example. For a detailed description of other units of the electronic device, reference may be made to the detailed description of the corresponding method steps. No longer.
- the processing unit 32 in FIG. 16 may be a processor or a controller, such as a central processing unit CPU, a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit ASIC, and a field programmable gate.
- the processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
- the storage unit can be a memory.
- the communication unit can be a transceiver, a radio frequency circuit or a communication interface or the like.
- the disclosed apparatus and method can be Other ways to achieve.
- the device embodiments described above are merely illustrative.
- the division of modules or units is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- An integrated unit can be stored in a readable storage medium if it is implemented as a software functional unit and sold or used as a standalone product.
- the technical solution of the embodiments of the present application may be embodied in the form of a software product in the form of a software product in essence or in the form of a contribution to the prior art, and the software product is stored in a storage medium.
- a number of instructions are included to cause a device (which may be a microcontroller, chip, etc.) or a processor to perform all or part of the steps of the various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Error Detection And Correction (AREA)
- Image Analysis (AREA)
Abstract
L'invention concerne un procédé et un dispositif de traitement de données, qui se rapportent au domaine technique du traitement de données. Lorsqu'un réseau neuronal à convolution est utilisé pour traiter des données, le nombre de couches de caractéristiques d'une couche de convolution peut être compressé au moyen d'un regroupement, de façon à réduire la quantité de calculs. Le schéma est le suivant: un réseau neuronal à convolution comporte une couche de compression; la couche de compression comporte une première couche de convolution et une seconde couche de convolution; le second nombre de couches de caractéristiques de sortie de la seconde couche de convolution est inférieur au premier nombre de couches de caractéristiques de sortie de la première couche de convolution; la couche de compression comporte n groupes, n étant un entier supérieur à 1; et les n groupes comprenant un ième groupe, i étant un entier positif quelconque de 1 à n. Le procédé comporte les étapes suivantes: un dispositif électronique acquiert des poids prédéfinis multiples correspondant à un ième groupe; et réalise une opération de convolution selon les poids prédéfinis multiples correspondant au ième groupe et les couches de caractéristiques de sortie d'une première couche de convolution dans le ième groupe, de façon à obtenir des couches de caractéristiques de sortie d'une seconde couche de convolution dans le ième groupe. Les modes de réalisation de la présente invention sont utilisés pour le traitement de données.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201780090949.7A CN110651273B (zh) | 2017-11-17 | 2017-11-17 | 一种数据处理方法及设备 |
| PCT/CN2017/111752 WO2019095333A1 (fr) | 2017-11-17 | 2017-11-17 | Procédé et dispositif de traitement de données |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2017/111752 WO2019095333A1 (fr) | 2017-11-17 | 2017-11-17 | Procédé et dispositif de traitement de données |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019095333A1 true WO2019095333A1 (fr) | 2019-05-23 |
Family
ID=66539364
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/111752 Ceased WO2019095333A1 (fr) | 2017-11-17 | 2017-11-17 | Procédé et dispositif de traitement de données |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110651273B (fr) |
| WO (1) | WO2019095333A1 (fr) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112580772A (zh) * | 2019-09-30 | 2021-03-30 | 华为技术有限公司 | 卷积神经网络的压缩方法及装置 |
| CN113570035A (zh) * | 2021-07-07 | 2021-10-29 | 浙江工业大学 | 一种利用多层卷积层信息的注意力机制方法 |
| CN114077889A (zh) * | 2020-08-13 | 2022-02-22 | 华为技术有限公司 | 一种神经网络处理器和数据处理方法 |
| JP2022548429A (ja) * | 2019-12-09 | 2022-11-18 | エリス デジタル ホールディングス、エルエルシー | ブロックチェーンによって統合された暗号難易度を基にした金融商品の電子取引及び決済システム |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112508734B (zh) * | 2020-11-27 | 2024-04-26 | 国网浙江省电力有限公司杭州供电公司 | 基于卷积神经网络的电力企业发电量的预测方法及装置 |
| CN114764835B (zh) * | 2021-01-15 | 2025-08-08 | 南京大学 | 一种卷积神经网络模型中间结果的压缩方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106096531A (zh) * | 2016-05-31 | 2016-11-09 | 安徽省云力信息技术有限公司 | 一种基于深度学习的交通图像多类型车辆检测方法 |
| CN106203619A (zh) * | 2015-05-29 | 2016-12-07 | 三星电子株式会社 | 数据优化的神经网络遍历 |
| CN106250981A (zh) * | 2015-06-10 | 2016-12-21 | 三星电子株式会社 | 减少存储器访问和网络内带宽消耗的脉冲神经网络 |
| CN107209864A (zh) * | 2015-01-27 | 2017-09-26 | 北京市商汤科技开发有限公司 | 人脸识别方法和系统 |
| US20170294010A1 (en) * | 2016-04-12 | 2017-10-12 | Adobe Systems Incorporated | Utilizing deep learning for rating aesthetics of digital images |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106326985A (zh) * | 2016-08-18 | 2017-01-11 | 北京旷视科技有限公司 | 神经网络训练方法和装置及数据处理方法和装置 |
| CN107239824A (zh) * | 2016-12-05 | 2017-10-10 | 北京深鉴智能科技有限公司 | 用于实现稀疏卷积神经网络加速器的装置和方法 |
| CN107316079A (zh) * | 2017-08-08 | 2017-11-03 | 珠海习悦信息技术有限公司 | 终端卷积神经网络的处理方法、装置、存储介质及处理器 |
-
2017
- 2017-11-17 WO PCT/CN2017/111752 patent/WO2019095333A1/fr not_active Ceased
- 2017-11-17 CN CN201780090949.7A patent/CN110651273B/zh active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107209864A (zh) * | 2015-01-27 | 2017-09-26 | 北京市商汤科技开发有限公司 | 人脸识别方法和系统 |
| CN106203619A (zh) * | 2015-05-29 | 2016-12-07 | 三星电子株式会社 | 数据优化的神经网络遍历 |
| CN106250981A (zh) * | 2015-06-10 | 2016-12-21 | 三星电子株式会社 | 减少存储器访问和网络内带宽消耗的脉冲神经网络 |
| US20170294010A1 (en) * | 2016-04-12 | 2017-10-12 | Adobe Systems Incorporated | Utilizing deep learning for rating aesthetics of digital images |
| CN106096531A (zh) * | 2016-05-31 | 2016-11-09 | 安徽省云力信息技术有限公司 | 一种基于深度学习的交通图像多类型车辆检测方法 |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112580772A (zh) * | 2019-09-30 | 2021-03-30 | 华为技术有限公司 | 卷积神经网络的压缩方法及装置 |
| CN112580772B (zh) * | 2019-09-30 | 2024-04-26 | 华为技术有限公司 | 卷积神经网络的压缩方法及装置 |
| JP2022548429A (ja) * | 2019-12-09 | 2022-11-18 | エリス デジタル ホールディングス、エルエルシー | ブロックチェーンによって統合された暗号難易度を基にした金融商品の電子取引及び決済システム |
| JP7186928B2 (ja) | 2019-12-09 | 2022-12-09 | エリス デジタル ホールディングス、エルエルシー | ブロックチェーンによって統合された暗号難易度を基にした金融商品の電子取引及び決済システム |
| CN114077889A (zh) * | 2020-08-13 | 2022-02-22 | 华为技术有限公司 | 一种神经网络处理器和数据处理方法 |
| CN113570035A (zh) * | 2021-07-07 | 2021-10-29 | 浙江工业大学 | 一种利用多层卷积层信息的注意力机制方法 |
| CN113570035B (zh) * | 2021-07-07 | 2024-04-16 | 浙江工业大学 | 一种利用多层卷积层信息的注意力机制方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110651273A (zh) | 2020-01-03 |
| CN110651273B (zh) | 2023-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019095333A1 (fr) | Procédé et dispositif de traitement de données | |
| CN110473141B (zh) | 图像处理方法、装置、存储介质及电子设备 | |
| WO2019184823A1 (fr) | Procédé et dispositif de traitement d'images basé sur un modèle de réseau neuronal à convolution | |
| CN103546158B (zh) | 用于图形处理的方法、系统和装置 | |
| WO2020073211A1 (fr) | Accélérateur d'opération, procédé de traitement et dispositif associé | |
| CN114399028B (zh) | 信息处理方法、图卷积神经网络训练方法及电子设备 | |
| WO2021164550A1 (fr) | Procédé et appareil de classification d'images | |
| CN112219210B (zh) | 信号处理装置和信号处理方法 | |
| WO2021081854A1 (fr) | Circuit d'opération de convolution et procédé d'opération de convolution | |
| TWI775210B (zh) | 用於卷積運算的資料劃分方法及處理器 | |
| CN110084309B (zh) | 特征图放大方法、装置和设备及计算机可读存储介质 | |
| CN111831844A (zh) | 图像检索方法、图像检索装置、图像检索设备及介质 | |
| CN113139490B (zh) | 一种图像特征匹配方法、装置、计算机设备及存储介质 | |
| WO2019128548A1 (fr) | Procédé et dispositif de traitement de signaux | |
| WO2020233709A1 (fr) | Procédé de compression de modèle, et dispositif | |
| JP2023510945A (ja) | シーン識別方法及びその装置、インテリジェントデバイス、記憶媒体並びにコンピュータプログラム | |
| CN110222835A (zh) | 一种基于零值检测的卷积神经网络硬件系统及运算方法 | |
| CN112990440A (zh) | 用于神经网络模型的数据量化方法、可读介质和电子设备 | |
| CN112397086A (zh) | 语音关键词检测方法、装置、终端设备和存储介质 | |
| WO2024022060A1 (fr) | Procédé et appareil d'enregistrement d'image, et support de stockage | |
| CN109992742A (zh) | 一种信号处理方法及装置 | |
| CN115049717B (zh) | 一种深度估计方法及装置 | |
| CN116704200A (zh) | 图像特征提取、图像降噪方法及相关装置 | |
| CN116843564A (zh) | 图像去噪方法、装置、电子设备及存储介质 | |
| CN113762297A (zh) | 一种图像处理方法及设备 |
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: 17932046 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: 17932046 Country of ref document: EP Kind code of ref document: A1 |