WO2020143302A1 - 卷积神经网络模型优化方法、装置、计算机设备及存储介质 - Google Patents

卷积神经网络模型优化方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020143302A1
WO2020143302A1 PCT/CN2019/117297 CN2019117297W WO2020143302A1 WO 2020143302 A1 WO2020143302 A1 WO 2020143302A1 CN 2019117297 W CN2019117297 W CN 2019117297W WO 2020143302 A1 WO2020143302 A1 WO 2020143302A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
initial feature
matrix
matrices
initial
Prior art date
Application number
PCT/CN2019/117297
Other languages
English (en)
French (fr)
Inventor
金戈
徐亮
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020143302A1 publication Critical patent/WO2020143302A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the present application relates to the field of artificial intelligence technology, and in particular, to a convolutional neural network model optimization method, device, computer equipment, and storage medium.
  • CNN Convolutional Neural Network
  • convolutional neural network models are commonly used in text classification or image recognition.
  • the computational load brought by the convolutional layer in the convolutional neural network model is usually very large, so that it cannot be applied to terminals with poor computing power, which greatly limits the application range of the convolutional neural network model.
  • the embodiments of the present application provide a convolutional neural network model optimization method, device, computer equipment, and storage medium, which are intended to solve the problem of more computing resources required by the existing convolutional neural network model.
  • an embodiment of the present application provides a method for optimizing a convolutional neural network model, which includes:
  • the total feature extraction matrix is input into the next layer of the convolutional neural network model to obtain an output result.
  • an embodiment of the present application further provides a convolutional neural network model optimization device, which includes:
  • the first dividing unit is used to divide the initial feature matrix output from the input layer of the preset convolutional neural network model into multiple sub-initial feature matrices;
  • a first input unit configured to input each of the sub-initial feature matrices into the convolutional layer of the convolutional neural network model one by one to obtain a sub-feature extraction matrix of each of the sub-initial feature matrices;
  • a first superimposing unit configured to superimpose the sub-feature extraction matrices of each of the sub-initial feature matrices to obtain a total feature extraction matrix
  • the second input unit is used to input the total feature extraction matrix into the next layer of the convolutional neural network model to obtain an output result.
  • an embodiment of the present application further provides a computer device, including a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run a computer stored in the memory Program to perform the following steps:
  • the total feature extraction matrix is input into the next layer of the convolutional neural network model to obtain an output result.
  • an embodiment of the present application further provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, causes the processor to perform the following steps:
  • the total feature extraction matrix is input into the next layer of the convolutional neural network model to obtain an output result.
  • FIG. 1 is a schematic flowchart of a method for optimizing a convolutional neural network model provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a sub-process of a convolutional neural network model optimization method provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a sub-process of a convolutional neural network model optimization method provided by an embodiment of the present application
  • FIG. 4 is a schematic diagram of a sub-process of a method for optimizing a convolutional neural network model provided by an embodiment of the present application
  • FIG. 5 is a schematic flowchart of a method for optimizing a convolutional neural network model provided by another embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a convolutional neural network model optimization device provided by an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a first division unit of a convolutional neural network model optimization device provided by an embodiment of this application;
  • FIG. 8 is a schematic block diagram of a first input unit of a convolutional neural network model optimization device provided by an embodiment of this application;
  • FIG. 9 is a schematic block diagram of a first labeling unit of a convolutional neural network model optimization device provided by an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of a first judgment unit of a convolutional neural network model optimization device provided by an embodiment of this application;
  • FIG. 11 is a schematic block diagram of a first superimposing unit of a convolutional neural network model optimization device provided by an embodiment of this application;
  • FIG. 12 is a schematic block diagram of a device for optimizing a convolutional neural network model provided by another embodiment of this application.
  • FIG. 13 is a schematic block diagram of a computer device provided by an embodiment of the present application.
  • the term “if” may be interpreted as “when” or “once” or “in response to determination” or “in response to detection” depending on the context .
  • the phrase “if determined” or “if [described condition or event] is detected” can be interpreted in the context to mean “once determined” or “in response to a determination” or “once detected [described condition or event ]” or “In response to detection of [the described condition or event]”.
  • FIG. 1 is a schematic flowchart of a convolutional neural network model optimization method provided by an embodiment of the present application. As shown, the method includes the following steps S1-S4.
  • the convolutional neural network model includes an input layer, a convolutional layer, an excitation layer, a pooling layer, a fully connected layer, and an output layer.
  • the data to be processed (image data or text data, etc.) is first input to the input layer of the convolutional neural network model, and the input layer outputs the initial feature matrix after preprocessing the data to be processed.
  • the initial feature matrix is not directly input into the convolutional layer of the convolutional neural network model, but the initial feature matrix is divided into multiple sub-initial feature matrices in advance, and the Each sub-initial feature matrix is input into the convolutional layer of the convolutional neural network model.
  • the calculation amount required for the convolution calculation in the convolutional layer can be greatly reduced, so that the convolutional neural network model can be applied to terminals with low computing power , The application scope of convolutional neural network has been improved.
  • step S1 includes the following steps S11-S12.
  • S11 Divide the initial feature matrix into a plurality of sub-initial feature matrices according to a preset row number threshold and column number threshold, where the number of rows of the sub-initial feature matrix is less than the row number threshold, the sub-initial features The number of columns of the matrix is less than the threshold of the number of columns.
  • the initial feature matrix is divided into a plurality of sub-initial feature matrices according to a preset threshold of the number of rows and a threshold of the number of columns.
  • the number of rows of the divided sub-initial feature matrix is less than the threshold of the number of rows, and the number of columns is less than the threshold of the number of columns.
  • the threshold of the number of rows and the threshold of the number of columns can be determined by those skilled in the art according to the actual computing power of the terminal, and this application does not specifically limit this.
  • S12 Record the coordinate position of each sub-initial feature matrix in the initial feature matrix.
  • the coordinate positions of each sub-initial feature matrix in the initial feature matrix are recorded. Then, according to the coordinate position, the sub-feature extraction matrix obtained by performing feature extraction on each of the sub-initial feature matrices through the convolution layer is superimposed as a total feature extraction matrix.
  • the initial feature matrix A is:
  • the threshold for the number of rows is set to 4, and the threshold for the number of columns is also set to 4.
  • the initial feature matrix A is evenly divided into the following four sub-initial feature matrices A1, A2, A3, and A4, where:
  • A1 is A2 is A3 is A4 is
  • the coordinates of the sub-initial feature matrix A1 are (1,1); the coordinates of the sub-initial feature matrix A2 are (1,2); the coordinates of the sub-initial feature matrix A3 are (2,1); the coordinates of the sub-initial feature matrix A1 are (2,2).
  • each of the sub-initial feature matrices is input into the convolutional layer of the convolutional neural network model one by one to obtain a sub-feature extraction matrix of each of the sub-initial feature matrices.
  • the convolution layer is used to perform convolution calculation on the sub-initial feature matrix.
  • Each convolution can be regarded as a filtering, which is equivalent to a feature extraction process.
  • Each sub-initial feature matrix is obtained after the convolution layer performs feature extraction Sub-feature extraction matrix.
  • step S2 specifically includes the following steps S21-S24.
  • S21 Obtain a sub-initial feature matrix as the target sub-initial feature matrix, and input the target sub-initial feature matrix into the convolutional layer of the convolutional neural network model to obtain the target sub-initial feature matrix Sub-feature extraction matrix.
  • a sub-initial feature matrix is obtained as a target sub-initial feature matrix, and the target sub-initial feature matrix is input into the convolutional layer of the convolutional neural network model to obtain the target sub-initial feature Matrix sub-feature extraction matrix.
  • the target sub-initial feature matrix is input to the convolutional layer of the convolutional neural network model.
  • the target sub-initial feature matrix is labeled.
  • labeling the target sub-initial feature matrix may specifically include adding a preset feature identifier to the target sub-initial feature moment.
  • the preset feature markers can be set by those skilled in the art according to the actual situation, which is not specifically limited in this application.
  • the feature marker is “#”.
  • all the sub-initial feature matrices are traversed, and it is determined whether there is an unlabeled sub-initial feature matrix.
  • step S32 specifically includes the following steps S231-S233.
  • the preset feature markers can be set by those skilled in the art according to actual conditions, and this application does not specifically limit this.
  • the feature marker is "#".
  • an unlabeled sub-initial feature matrix is obtained as the target sub-initial feature matrix, and the target sub-initial feature matrix is input to the convolutional nerve
  • the sub-feature extraction matrix of the target sub-initial feature matrix is obtained in the convolutional layer of the network model, and so on until all sub-initial feature matrices are marked (ie, input into the convolutional layer for feature extraction).
  • step S3 is executed.
  • step S3 if all the sub-initial feature matrices have been marked, the following step S3 is performed.
  • the sub-feature extraction matrices of each of the sub-initial feature matrices are superimposed to obtain a total feature extraction matrix.
  • the total feature extraction matrix is the input data for input to the next layer structure (excitation layer) of the convolutional neural network model.
  • the above step S3 specifically includes the steps of: superimposing the sub-feature extraction matrices of each sub-initial feature matrix into total feature extraction according to the coordinate positions of the sub-initial feature matrices in the initial feature matrix matrix.
  • the coordinate position of the sub-feature extraction matrix of the sub-initial feature matrix in the total feature extraction matrix is the same as the coordinate position of the sub-initial feature matrix in the initial feature matrix.
  • the sub-feature extraction matrix of each sub-initial feature matrix is superimposed as a total feature extraction matrix according to the coordinate position of each sub-initial feature matrix in the initial feature matrix, so that the sub-initial feature matrix
  • the coordinate position of the sub-feature extraction matrix in the total feature extraction matrix is the same as the coordinate position of the sub-initial feature matrix in the initial feature matrix, so that the sub-feature extraction matrix of each sub-initial feature matrix
  • the positional relationship between the sub-feature extraction matrices is kept the same as the positional relationship of each sub-initial feature matrix.
  • the four sub-initial feature matrices A1, A2, A3, and A4 are extracted, and the four sub-feature extraction matrices are B1, B2, B3, and B4, respectively:
  • B1 is B2 is B3 is B3 is
  • the coordinates of the sub-initial feature matrix A1 are (1,1); the coordinates of the sub-initial feature matrix A2 are (1,2); the coordinates of the sub-initial feature matrix A3 are (2,1); the coordinates of the sub-initial feature matrix A1 are (2,2). Therefore, the coordinates of the sub-feature extraction matrix B1 are (1,1); the coordinates of the sub-feature extraction matrix B2 are (1,2); the coordinates of the sub-feature extraction matrix B3 are (2,1); the coordinates of the sub-feature extraction matrix B1 are The coordinates are (2, 2).
  • the total feature extraction matrix B obtained by combining the four sub-feature extraction matrices B1, B2, B3, and B4 is
  • the next layer of the convolutional neural network model is an excitation layer.
  • the total feature extraction matrix is input as input data into the excitation layer of the convolutional neural network model
  • the output data of the excitation layer is input as input data into the pooling layer of the convolutional neural network model.
  • the excitation layer is used to nonlinearly map the output of the convolution layer, that is, to increase the nonlinear characteristics of the data.
  • the pooling layer is used to compress the amount of data and parameters and reduce overfitting.
  • the fully connected layer is mainly used to convert the output of the convolutional layer into a one-dimensional vector.
  • the output layer is used to output results.
  • the initial feature matrix output from the input layer of the preset convolutional neural network model is divided into multiple sub-initial feature matrices; each of the sub-initial feature matrices is input to the convolution one by one
  • a sub-feature extraction matrix of each of the sub-initial feature matrices is obtained; the sub-feature extraction matrix of each of the sub-initial feature matrices is superimposed to obtain a total feature extraction matrix, so that The feature matrix is divided into multiple sub-initial feature matrices and input one by one to the convolutional layer of the convolutional neural network for feature extraction.
  • the calculation amount required for the convolution calculation in the convolutional layer can be greatly reduced, so that the convolutional neural network model can be applied to terminals with low computing power , The application scope of convolutional neural network has been improved.
  • FIG. 5 is a schematic flowchart of a convolutional neural network model optimization method provided by another embodiment of the present application.
  • the convolutional neural network model optimization method of this embodiment includes steps S51-S55. Steps S52-S55 are similar to steps S1-S4 in the above embodiment, and will not be repeated here. The step S51 added in this embodiment will be described in detail below.
  • the convolutional neural network model includes an input layer, a convolutional layer, an excitation layer, a pooling layer, a fully connected layer, and an output layer.
  • the data to be processed (image data or text data, etc.) is input to the input layer of the convolutional neural network model, and the input layer outputs the initial feature matrix after preprocessing the data to be processed.
  • the pre-processing mainly includes de-average processing and normalization processing.
  • De-mean means to centralize each dimension of the data to be processed to 0, and its purpose is to pull the center of the sample back to the origin of the coordinate system.
  • Normalization refers to normalizing the amplitude of the data of different dimensions in the data to be processed to the same range, that is, reducing the interference caused by the difference in the value range of each dimension. For example, we have the feature A of two dimensions And B, A range is 0 to 10, and B range is 0 to 10000, if using these two features directly is problematic, a good practice is to normalize, that is, the data of A and B become 0 to 1 Scope.
  • FIG. 6 is a schematic block diagram of a convolutional neural network model optimization device 60 provided by an embodiment of the present application. As shown in FIG. 6, corresponding to the above convolutional neural network model optimization method, the present application also provides a convolutional neural network model optimization device 60.
  • the convolutional neural network model optimization device 60 includes a unit for performing the above-mentioned convolutional neural network model optimization method, and the device may be configured in a terminal such as a desktop computer, tablet computer, laptop computer, or the like.
  • the convolutional neural network model optimization device 60 includes a first division unit 61, a first input unit 62, a first superposition unit 63, and a second input unit 64.
  • the first dividing unit 61 is configured to divide the initial feature matrix output from the input layer of the preset convolutional neural network model into a plurality of sub-initial feature matrices.
  • the first input unit 62 is configured to input each of the sub-initial feature matrices into the convolutional layer of the convolutional neural network model one by one to obtain a sub-feature extraction matrix of each of the sub-initial feature matrices.
  • the first superimposing unit 63 is configured to superimpose the sub-feature extraction matrices of the sub-initial feature matrices to obtain a total feature extraction matrix.
  • the second input unit 64 is configured to input the total feature extraction matrix into the next layer of the convolutional neural network model to obtain an output result.
  • the first dividing unit 61 includes a second dividing unit 611 and a recording unit 612.
  • the second dividing unit 611 is configured to divide the initial feature matrix into a plurality of sub-initial feature matrices according to a preset row number threshold and column number threshold, where the number of rows of the sub-initial feature matrix is less than the row number threshold , The number of columns of the sub-initial feature matrix is less than the column number threshold.
  • the recording unit 612 is configured to record the coordinate position of each sub-initial feature matrix in the initial feature matrix.
  • the first input unit 62 includes a first acquisition unit 621, a marking unit 622, a first judgment unit 623, and a second acquisition unit 624.
  • the first obtaining unit 621 is configured to obtain a sub-initial feature matrix as a target sub-initial feature matrix, and input the target sub-initial feature matrix into the convolutional layer of the convolutional neural network model to obtain the Sub-feature extraction matrix of the target sub-initial feature matrix.
  • the labeling unit 622 is configured to label the target sub-initial feature matrix.
  • the first determining unit 623 is used to determine whether there is an unlabeled sub-initial feature matrix.
  • the second obtaining unit 624 is configured to obtain an unlabeled sub-initial feature matrix as a target sub-initial feature matrix if there is an unlabeled sub-initial feature matrix, and input the target sub-initial feature matrix to the convolutional nerve
  • the sub-feature extraction matrix of the target sub-initial feature matrix is obtained in the convolutional layer of the network model.
  • the marking unit 622 includes an adding unit 6221.
  • the adding unit 6221 is used to add a preset feature marker to the target sub-initial feature moment.
  • the first judgment unit 623 includes a second judgment unit 6231, a first judgment unit 6232, and a second judgment unit 6233.
  • the second judgment unit 6231 is used to judge whether all the sub-initial feature matrices contain preset feature markers.
  • the first determining unit 6232 is configured to determine that there is no unmarked sub-initial feature matrix if all the sub-initial feature matrices include preset feature identifiers.
  • the second determination unit 6233 is used to determine that there is an unmarked sub-initial feature matrix if there is a sub-initial feature matrix that does not contain a preset feature identifier.
  • the first superimposing unit 63 includes a second superimposing unit 631.
  • the second superimposing unit 631 is configured to superimpose the sub-feature extraction matrix of each sub-initial feature matrix into a total feature extraction matrix according to the coordinate position of each sub-initial feature matrix in the initial feature matrix, wherein, the The coordinate position of the sub-feature extraction matrix of the sub-initial feature matrix in the total feature extraction matrix is the same as the coordinate position of the sub-initial feature matrix in the initial feature matrix.
  • FIG. 12 is a schematic block diagram of a convolutional neural network model optimization device 60 provided by another embodiment of the present application. As shown in FIG. 12, the convolutional neural network model optimization device 60 of this embodiment adds the third input unit 65 based on the above embodiment.
  • the third input unit 65 is configured to input the data to be processed into the input layer of the convolutional neural network model to obtain the initial feature matrix.
  • the above convolutional neural network model optimization device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 13.
  • the computer device 500 may be a terminal or a server.
  • the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and other electronic devices with communication functions.
  • the server can be an independent server or a server cluster composed of multiple servers.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the computer program 5032 When executed, it may cause the processor 502 to execute a convolutional neural network model optimization method.
  • the processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the nonvolatile storage medium 503.
  • the processor 502 can execute a convolutional neural network model optimization method.
  • the network interface 505 is used for network communication with other devices.
  • FIG. 13 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
  • the specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • the processor 502 is used to run the computer program 5032 stored in the memory to implement the optimization method of the convolutional neural network model of the present application.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor.
  • a person of ordinary skill in the art may understand that all or part of the processes in the method for implementing the foregoing embodiments may be completed by instructing relevant hardware through a computer program.
  • the computer program may be stored in a storage medium, which is a computer-readable storage medium.
  • the computer program is executed by at least one processor in the computer system to implement the process steps of the foregoing method embodiments.
  • the present application also provides a storage medium.
  • the storage medium may be a computer-readable storage medium.
  • the storage medium stores a computer program.
  • the processor is caused to execute the optimization method of the convolutional neural network model of the present application.
  • the storage medium is a physical, non-transitory storage medium, for example, it can be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk and other various physical storages that can store program codes medium.
  • ROM Read-Only Memory

Abstract

本申请实施例公开了一种卷积神经网络模型优化方法、装置、计算机设备及存储介质。其中,所述方法属于人工智能技术,所述方法包括:将卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;将各子初始特征矩阵逐一输入到卷积神经网络模型的卷积层中以获得各子初始特征矩阵的子特征提取矩阵;将各子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;将总特征提取矩阵输入到卷积神经网络模型的下一层中以得到输出结果。

Description

卷积神经网络模型优化方法、装置、计算机设备及存储介质
本申请要求于2019年1月10日提交中国专利局、申请号为201910023823.9、申请名称为“卷积神经网络模型优化方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种卷积神经网络模型优化方法、装置、计算机设备及存储介质。
背景技术
卷积神经网络(Convolutional Neural Network,CNN),是一种前馈神经网络,人工神经元可以响应周围单元,可以进行大型图像处理。
目前,文本分类或者是图像识别等领域常用到卷积神经网络模型。但卷积神经网络模型中的卷积层带来的计算量通常非常巨大,以至于其无法应用到计算能力较差的终端中,极大地限制了卷积神经网络模型的应用范围。
发明内容
本申请实施例提供了一种卷积神经网络模型优化方法、装置、计算机设备及存储介质,旨在解决现有卷积神经网络模型所需的计算资源较多的问题。
第一方面,本申请实施例提供了一种卷积神经网络模型优化方法,其包括:
将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
第二方面,本申请实施例还提供了一种卷积神经网络模型优化装置,其包括:
第一划分单元,用于将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
第一输入单元,用于将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
第一叠加单元,用于将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
第二输入单元,用于将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
第三方面,本申请实施例还提供了一种计算机设备,包括存储器以及与所述存储器相连的处理器;所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:
将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
第四方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器执行以下步骤:
将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种卷积神经网络模型优化方法的流程示意图;
图2为本申请实施例提供的一种卷积神经网络模型优化方法的子流程示意图;
图3为本申请实施例提供的一种卷积神经网络模型优化方法的子流程示意图;
图4为本申请实施例提供的一种卷积神经网络模型优化方法的子流程示意图;
图5为本申请另一实施例提供的一种卷积神经网络模型优化方法的流程示意图;
图6为本申请实施例提供的一种卷积神经网络模型优化装置的示意性框图;
图7为本申请实施例提供的一种卷积神经网络模型优化装置的第一划分单元的示意性框图;
图8为本申请实施例提供的一种卷积神经网络模型优化装置的第一输入单元的示意性框图;
图9为本申请实施例提供的一种卷积神经网络模型优化装置的第一标记单元的示意性框图;
图10为本申请实施例提供的一种卷积神经网络模型优化装置的第一判断单元的示意性框图;
图11为本申请实施例提供的一种卷积神经网络模型优化装置的第一叠加单元的示意性框图;
图12为本申请另一实施例提供的一种卷积神经网络模型优化装置的示意性框图;以及
图13为本申请实施例提供的一种计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
请参阅图1,图1是本申请实施例提供的一种卷积神经网络模型优化方法的流程示意图。如图所示,该方法包括以下步骤S1-S4。
S1,将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵。
在本申请实施例中,卷积神经网络模型包括输入层、卷积层、激励层、池化层、全连接层以及输出层。
具体实施中首先将待处理数据(图像数据或者文本数据等)输入到卷积神经网络模型的输入层,输入层对待处理数据进行预处理后输出初始特征矩阵。
在获取了初始特征矩阵后,本申请实施例中不直接将初始特征矩阵输入到卷积神经网络模型的卷积层中,而是预先将初始特征矩阵划分为多个子初始特征矩阵,并逐一将各子初始特征矩阵输入到卷积神经网络模型的卷积层中。
由于子初始特征矩阵的数据量要小于初始特征矩阵的数据量,由此可极大地降低卷积层中卷积计算所需的计算量,使得卷积神经网络模型能够应用到低计算能力的终端中,提高了卷积神经网络网络的应用范围。
在一实施例中,参见图2,以上步骤S1包括如下步骤S11-S12。
S11,根据预设的行数阈值以及列数阈值将所述初始特征矩阵划分为多个子初始特征矩阵,其中所述子初始特征矩阵的行数少于所述行数阈值,所述子初始特征矩阵的列数少于所述列数阈值。
具体实施中,根据预设的行数阈值以及列数阈值将所述初始特征矩阵划分为多个子初始特征矩阵。其中,划分得到的子初始特征矩阵的行数少于所述行数阈值,列数少于所述列数阈值。
需要说明的是,所述行数阈值以及列数阈值可由本领域技术人员根据终端的实际计算能力确定,本申请对此不做具体的限定。
S12,记录各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置。
具体实施中,在将所述初始特征矩阵划分为多个子初始特征矩阵后,记录各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置。之后,根据所述坐标位置将各所述子初始特征矩阵经过卷积层进行特征提取后获得的子特征提取矩阵叠加为总特征提取矩阵。
例如,在一具体实施例中,初始特征矩阵A为:
Figure PCTCN2019117297-appb-000001
在本实施例中,将行数阈值设定为4,列数阈值也设定为4。
具体实施中将初始特征矩阵A均匀划分为以下4个子初始特征矩阵A1、A2、A3以及A4,其中:
A1为
Figure PCTCN2019117297-appb-000002
A2为
Figure PCTCN2019117297-appb-000003
A3为
Figure PCTCN2019117297-appb-000004
A4为
Figure PCTCN2019117297-appb-000005
子初始特征矩阵A1的坐标为(1,1);子初始特征矩阵A2的坐标为(1,2);子初始特征矩阵A3的坐标为(2,1);子初始特征矩阵A1的坐标为(2,2)。
S2,将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵。
具体实施中,将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵。
卷积层用于对所述子初始特征矩阵进行卷积计算,每一次卷积可以看作为一次过滤,相当于一次特征提取的过程,各子初始特征矩阵在经过卷积层进行特征提取后得到子特征提取矩阵。
在一实施例中,参见图3,以上步骤S2具体包括如下步骤S21-S24。
S21,获取一所述子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵。
具体实施中,获取一所述子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵。
S22,对所述目标子初始特征矩阵进行标记。
具体实施中,在将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层后,对所述目标子初始特征矩阵进行标记。
在一实施例中,对所述目标子初始特征矩阵进行标记可具体为在所述目标子初始特征矩中添加预设的特征标记符。
需要说明的是,预设的特征标记符可由本领域技术人员根据实际情况进行设定,本申请对此不作具体限定,例如,在一实施例中,所述特征标记符为“#”。
S23,判断是否存在未标记的子初始特征矩阵。
具体实施中,遍历所有的子初始特征矩阵,并判断是否存在未标记的子初始特征矩阵。
在一实施例中,参见图4,以上步骤S32具体包括如下步骤S231-S233。
S231,判断是否所有的子初始特征矩阵中均包含预设的特征标记符。
具体实施中,判断是否所有的子初始特征矩阵中均包含预设的特征标记符。
需要说明的是,预设的特征标记符可由本领域技术人员根据实际情况进行 设定,本申请对此不作具体限定,例如,在一实施例中,所述特征标记符为“#”。
S232,若所有的子初始特征矩阵中均包含预设的特征标记符,判定不存在未标记的子初始特征矩阵。
具体实施中,如果所有的子初始特征矩阵中均包含预设的特征标记符,判定不存在未标记的子初始特征矩阵。
S233,若存在不包含预设的特征标记符的子初始特征矩阵,判定存在未标记的子初始特征矩阵。
具体实施中,如果存在不包含预设的特征标记符的子初始特征矩阵,判定存在未标记的子初始特征矩阵。
S24,若存在未标记的子初始特征矩阵,获取一未标记的子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵。
具体实施中,如果未对所有的所述子初始特征矩阵进行标记,获取一未标记的子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵,如此循环直到以对所有的子初始特征矩阵进行标记(即输入到卷积层中进行特征提取)。
若已对所有的所述子初始特征矩阵进行标记,执行步骤S3。
具体实施中,若已对所有的所述子初始特征矩阵进行标记,则执行以下步骤S3。
S3,将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵。
具体实施中,在获取了所有子初始特征矩阵的子特征提取矩阵后,将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵。总特征提取矩阵为用于输入到卷积神经网络模型的下一层结构(激励层)的输入数据。
在一实施例中,以上步骤S3具体包括如下步骤:根据各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵。其中,所述子初始特征矩阵的子特征提取矩阵在所述总特征提取矩阵中的坐标位置与所述子初始特征矩阵在所述初始特征矩阵中的坐标位置相同。
具体实施中,据各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵,以使得所述子初始特征矩阵的子特征提取矩阵在所述总特征提取矩阵中的坐标位置与所述子初始特征矩阵在所述初始特征矩阵中的坐标位置相同,从而在将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵的过程中,保持个子特征提取矩阵间的位置关系与各子初始特征矩阵的位置关系相同。
例如,在一具体实施例中,对四个子初始特征矩阵A1、A2、A3以及A4进行特征提取后得到,四个子特征提取矩阵分别为B1、B2、B3以及B4,其中:
B1为
Figure PCTCN2019117297-appb-000006
B2为
Figure PCTCN2019117297-appb-000007
B3为
Figure PCTCN2019117297-appb-000008
B3为
Figure PCTCN2019117297-appb-000009
子初始特征矩阵A1的坐标为(1,1);子初始特征矩阵A2的坐标为(1,2);子初始特征矩阵A3的坐标为(2,1);子初始特征矩阵A1的坐标为(2,2)。因此,子特征提取矩阵B1的坐标为(1,1);子特征提取矩阵B2的坐标为(1,2);子特征提取矩阵B3的坐标为(2,1);子特征提取矩阵B1的坐标为(2,2)。
通过将四个子特征提取矩阵B1、B2、B3以及B4合并得到的总特征提取矩阵B为
Figure PCTCN2019117297-appb-000010
S4,将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
具体实施中,所述卷积神经网络模型的下一层为激励层。具体地,将总特征提取矩阵作为输入数据输入到所述卷积神经网络模型的激励层中,将激励层的输出数据作为输入数据输入到所述卷积神经网络模型的池化层中。将池化层的输出数据作为输入数据输入到所述卷积神经网络模型的全连接层中,将全连接层的输出数据作为输入数据输入到所述卷积神经网络模型的输出层中以得到输出结果。
需要说明的是,激励层用于把卷积层输出结果做非线性映射,即增加数据的非线性特征。池化层用于压缩数据和参数的量,减小过拟合。所述全连接层主要用于将卷积层的输出转换为一个一维的向量。所述输出层用于输出结果。
通过应用本申请实施例的技术方案,将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;将各所述子初始特征矩阵逐 一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵,从而能够实现将初始特征矩阵划分为多个子初始特征矩阵后逐一输入到卷积神经网络的卷积层中进行特征提取。由于子初始特征矩阵的数据量要小于初始特征矩阵的数据量,由此可极大地降低卷积层中卷积计算所需的计算量,使得卷积神经网络模型能够应用到低计算能力的终端中,提高了卷积神经网络网络的应用范围。
图5是本申请另一实施例提供的一种卷积神经网络模型优化方法的流程示意图。如图5所示,本实施例的卷积神经网络模型优化方法包括步骤S51-S55。其中步骤S52-S55与上述实施例中的步骤S1-S4类似,在此不再赘述。下面详细说明本实施例中所增加的步骤S51。
S51、将待处理数据输入到卷积神经网络模型的输入层中以得到所述初始特征矩阵。
在本方案中,卷积神经网络模型包括输入层、卷积层、激励层、池化层、全连接层以及输出层。
具体实施中,将待处理数据(图像数据或者文本数据等)输入到卷积神经网络模型的输入层,输入层对待处理数据进行预处理后输出初始特征矩阵。预处理主要包括去均值处理以及归一化处理。
去均值是指把待处理数据各个维度都中心化为0,其目的就是把样本的中心拉回到坐标系原点上。
归一化是指将待处理数据中不同维度的数据的幅度归一化到同样的范围,即减少各维度数据取值范围的差异而带来的干扰,比如,我们有两个维度的特征A和B,A范围是0到10,而B范围是0到10000,如果直接使用这两个特征是有问题的,好的做法就是归一化,即A和B的数据都变为0到1的范围。
图6是本申请实施例提供的一种卷积神经网络模型优化装置60的示意性框图。如图6所示,对应于以上卷积神经网络模型优化方法,本申请还提供一种卷积神经网络模型优化装置60。该卷积神经网络模型优化装置60包括用于执行上述卷积神经网络模型优化方法的单元,该装置可以被配置于台式电脑、平板电脑、手提电脑、等终端中。具体地,请参阅图6,该卷积神经网络模型优化装置60包括第一划分单元61、第一输入单元62、第一叠加单元63以及第二输入 单元64。
第一划分单元61,用于将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵。第一输入单元62,用于将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵。第一叠加单元63,用于将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵。第二输入单元64,用于将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
在一实施例中,如图7所示,所述第一划分单元61包括第二划分单元611以及记录单元612。
第二划分单元611,用于根据预设的行数阈值以及列数阈值将所述初始特征矩阵划分为多个子初始特征矩阵,其中所述子初始特征矩阵的行数少于所述行数阈值,所述子初始特征矩阵的列数少于所述列数阈值。记录单元612,用于记录各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置。
在一实施例中,如图8所示,所述第一输入单元62包括第一获取单元621、标记单元622、第一判断单元623以及第二获取单元624。
第一获取单元621,用于获取一所述子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵。标记单元622,用于对所述目标子初始特征矩阵进行标记。第一判断单元623,用于判断是否存在未标记的子初始特征矩阵。第二获取单元624,用于若存在未标记的子初始特征矩阵,获取一未标记的子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵。
在一实施例中,如图9所示,所述标记单元622包括添加单元6221。
添加单元6221,用于在所述目标子初始特征矩中添加预设的特征标记符。
在一实施例中,如图10所示,所述第一判断单元623包括第二判断单元6231、第一判定单元6232以及第二判定单元6233。
第二判断单元6231,用于判断是否所有的子初始特征矩阵中均包含预设的特征标记符。第一判定单元6232,用于若所有的子初始特征矩阵中均包含预设的特征标记符,判定不存在未标记的子初始特征矩阵。第二判定单元6233,用 于若存在不包含预设的特征标记符的子初始特征矩阵,判定存在未标记的子初始特征矩阵。
在一实施例中,如图11所示,所述第一叠加单元63包括第二叠加单元631。
第二叠加单元631,用于根据各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵,其中,所述子初始特征矩阵的子特征提取矩阵在所述总特征提取矩阵中的坐标位置与所述子初始特征矩阵在所述初始特征矩阵中的坐标位置相同。
图12是本申请另一实施例提供的一种卷积神经网络模型优化装置60的示意性框图。如图12所示,本实施例的卷积神经网络模型优化装置60是上述实施例的基础上增加了第三输入单元65。
第三输入单元65,用于将待处理数据输入到卷积神经网络模型的输入层中以得到所述初始特征矩阵。
需要说明的是,所属领域的技术人员可以清楚地了解到,上述卷积神经网络模型优化装置60和各单元的具体实现过程,可以参考前述方法实施例中的相应描述,为了描述的方便和简洁,在此不再赘述。
上述卷积神经网络模型优化装置可以实现为一种计算机程序的形式,该计算机程序可以在如图13所示的计算机设备上运行。
请参阅图13,图13是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备500可以是终端,也可以是服务器,其中,终端可以是智能手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等具有通信功能的电子设备。服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。
参阅图13,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行一种卷积神经网络模型优化方法。
该处理器502用于提供计算和控制能力,以支撑整个计算机设备500的运行。
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供 环境,该计算机程序5032被处理器502执行时,可使得处理器502执行一种卷积神经网络模型优化方法。
该网络接口505用于与其它设备进行网络通信。本领域技术人员可以理解,图13中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现本申请的卷积神经网络模型优化方法。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
本领域普通技术人员可以理解的是实现上述实施例的方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成。该计算机程序可存储于一存储介质中,该存储介质为计算机可读存储介质。该计算机程序被该计算机系统中的至少一个处理器执行,以实现上述方法的实施例的流程步骤。
因此,本申请还提供一种存储介质。该存储介质可以为计算机可读存储介质。该存储介质存储有计算机程序。该计算机程序被处理器执行时使处理器执行本申请的卷积神经网络模型优化方法。
所述存储介质为实体的、非瞬时性的存储介质,例如可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的实体存储介质。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决 于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以上所述,仅为本申请的具体实施方式,但本申请明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种卷积神经网络模型优化方法,包括:
    将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
    将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
    将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
    将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
  2. 根据权利要求1所述的方法,其中,所述将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵,包括:
    根据预设的行数阈值以及列数阈值将所述初始特征矩阵划分为多个子初始特征矩阵,其中,所述子初始特征矩阵的行数少于所述行数阈值,所述子初始特征矩阵的列数少于所述列数阈值;
    记录各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置。
  3. 根据权利要求1所述的方法,其中,所述将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵,包括:
    获取一所述子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵;
    对所述目标子初始特征矩阵进行标记;
    判断是否存在未标记的子初始特征矩阵;
    若存在未标记的子初始特征矩阵,获取一未标记的子初始特征矩阵作为目标子初始特征矩阵,并返回所述将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵的步骤。
  4. 根据权利要求3所述的方法,其中,所述对所述目标子初始特征矩阵进行标记,包括:
    在所述目标子初始特征矩中添加预设的特征标记符。
  5. 根据权利要求4所述的方法,其中,所述判断是否存在未标记的子初始特征矩阵,包括:
    判断是否所有的子初始特征矩阵中均包含预设的特征标记符;
    若存在不包含预设的特征标记符的子初始特征矩阵,判定存在未标记的子初始特征矩阵。
  6. 根据权利要求5所述的方法,其中,所述判断是否存在未标记的子初始特征矩阵,还包括:
    若所有的子初始特征矩阵中均包含预设的特征标记符,判定不存在未标记的子初始特征矩阵。
  7. 根据权利要求2所述的方法,其中,所述将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵,包括:
    根据各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵。
  8. 根据权利要求7所述的方法,其中,所述子初始特征矩阵的子特征提取矩阵在所述总特征提取矩阵中的坐标位置与所述子初始特征矩阵在所述初始特征矩阵中的坐标位置相同。
  9. 根据权利要求1所述的方法,其中,在所述将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵之前,所述方法还包括:
    将待处理数据输入到卷积神经网络模型的输入层中以得到所述初始特征矩阵。
  10. 一种卷积神经网络模型优化装置,包括:
    第一划分单元,用于将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
    第一输入单元,用于将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
    第一叠加单元,用于将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
    第二输入单元,用于将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
  11. 一种计算机设备,包括存储器以及与所述存储器相连的处理器;其中,所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:
    将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
    将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
    将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵;
    将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
  12. 根据权利要求11所述的计算机设备,其中,所述将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵的步骤包括:
    根据预设的行数阈值以及列数阈值将所述初始特征矩阵划分为多个子初始特征矩阵,其中,所述子初始特征矩阵的行数少于所述行数阈值,所述子初始特征矩阵的列数少于所述列数阈值;
    记录各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置。
  13. 根据权利要求11所述的计算机设备,其中,所述将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵的步骤包括:
    获取一所述子初始特征矩阵作为目标子初始特征矩阵,并将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵;
    对所述目标子初始特征矩阵进行标记;
    判断是否存在未标记的子初始特征矩阵;
    若存在未标记的子初始特征矩阵,获取一未标记的子初始特征矩阵作为目标子初始特征矩阵,并返回所述将所述目标子初始特征矩阵输入到所述卷积神经网络模型的卷积层中以获得所述目标子初始特征矩阵的子特征提取矩阵的步骤。
  14. 根据权利要求13所述的计算机设备,其中,所述对所述目标子初始特征 矩阵进行标记的步骤包括:
    在所述目标子初始特征矩中添加预设的特征标记符。
  15. 根据权利要求14所述的计算机设备,其中,所述判断是否存在未标记的子初始特征矩阵的步骤包括:
    判断是否所有的子初始特征矩阵中均包含预设的特征标记符;
    若存在不包含预设的特征标记符的子初始特征矩阵,判定存在未标记的子初始特征矩阵。
  16. 根据权利要求15所述的计算机设备,其中,所述判断是否存在未标记的子初始特征矩阵的步骤还包括:
    若所有的子初始特征矩阵中均包含预设的特征标记符,判定不存在未标记的子初始特征矩阵。
  17. 根据权利要求12所述的计算机设备,其中,所述将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩阵的步骤,包括:
    根据各所述子初始特征矩阵在所述初始特征矩阵中的坐标位置将各所述子初始特征矩阵的子特征提取矩阵叠加为总特征提取矩阵。
  18. 根据权利要求17所述的计算机设备,其中,所述子初始特征矩阵的子特征提取矩阵在所述总特征提取矩阵中的坐标位置与所述子初始特征矩阵在所述初始特征矩阵中的坐标位置相同。
  19. 根据权利要求11所述的计算机设备,其中,在所述将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵之前,所述处理器还执行如下步骤:
    将待处理数据输入到卷积神经网络模型的输入层中以得到所述初始特征矩阵。
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时使所述处理器执行以下步骤:
    将预设的卷积神经网络模型的输入层输出的初始特征矩阵划分为多个子初始特征矩阵;
    将各所述子初始特征矩阵逐一输入到所述卷积神经网络模型的卷积层中以获得各所述子初始特征矩阵的子特征提取矩阵;
    将各所述子初始特征矩阵的子特征提取矩阵进行叠加后获得总特征提取矩 阵;
    将所述总特征提取矩阵输入到所述卷积神经网络模型的下一层中以得到输出结果。
PCT/CN2019/117297 2019-01-10 2019-11-12 卷积神经网络模型优化方法、装置、计算机设备及存储介质 WO2020143302A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910023823.9 2019-01-10
CN201910023823.9A CN109886390B (zh) 2019-01-10 2019-01-10 卷积神经网络模型优化方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020143302A1 true WO2020143302A1 (zh) 2020-07-16

Family

ID=66925830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117297 WO2020143302A1 (zh) 2019-01-10 2019-11-12 卷积神经网络模型优化方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109886390B (zh)
WO (1) WO2020143302A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163069A (zh) * 2020-09-27 2021-01-01 广东工业大学 一种基于图神经网络节点特征传播优化的文本分类方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886390B (zh) * 2019-01-10 2023-11-24 平安科技(深圳)有限公司 卷积神经网络模型优化方法、装置、计算机设备及存储介质
CN111797881A (zh) * 2019-07-30 2020-10-20 华为技术有限公司 图像分类方法及装置
CN110388996B (zh) * 2019-09-03 2021-05-28 广东电网有限责任公司 一种巴克豪森信号特征获取方法、装置、终端及存储介质
CN111666150B (zh) * 2020-05-09 2022-01-11 深圳云天励飞技术股份有限公司 存储空间的分配方法、装置、终端及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451654A (zh) * 2017-07-05 2017-12-08 深圳市自行科技有限公司 卷积神经网络的加速运算方法、服务器及存储介质
US20180293758A1 (en) * 2017-04-08 2018-10-11 Intel Corporation Low rank matrix compression
CN109117897A (zh) * 2018-08-09 2019-01-01 百度在线网络技术(北京)有限公司 基于卷积神经网络的图像处理方法、装置及可读存储介质
CN109886390A (zh) * 2019-01-10 2019-06-14 平安科技(深圳)有限公司 卷积神经网络模型优化方法、装置、计算机设备及存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10824934B2 (en) * 2017-01-12 2020-11-03 Texas Instruments Incorporated Methods and apparatus for matrix processing in a convolutional neural network
JP6738296B2 (ja) * 2017-03-23 2020-08-12 株式会社日立製作所 畳込みニューラルネットワークによる処理方法、畳込みニューラルネットワークの学習方法、および畳込みニューラルネットワークを備える処理装置
CN109145107B (zh) * 2018-09-27 2023-07-25 平安科技(深圳)有限公司 基于卷积神经网络的主题提取方法、装置、介质和设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293758A1 (en) * 2017-04-08 2018-10-11 Intel Corporation Low rank matrix compression
CN107451654A (zh) * 2017-07-05 2017-12-08 深圳市自行科技有限公司 卷积神经网络的加速运算方法、服务器及存储介质
CN109117897A (zh) * 2018-08-09 2019-01-01 百度在线网络技术(北京)有限公司 基于卷积神经网络的图像处理方法、装置及可读存储介质
CN109886390A (zh) * 2019-01-10 2019-06-14 平安科技(深圳)有限公司 卷积神经网络模型优化方法、装置、计算机设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163069A (zh) * 2020-09-27 2021-01-01 广东工业大学 一种基于图神经网络节点特征传播优化的文本分类方法
CN112163069B (zh) * 2020-09-27 2024-04-12 广东工业大学 一种基于图神经网络节点特征传播优化的文本分类方法

Also Published As

Publication number Publication date
CN109886390A (zh) 2019-06-14
CN109886390B (zh) 2023-11-24

Similar Documents

Publication Publication Date Title
WO2020143302A1 (zh) 卷积神经网络模型优化方法、装置、计算机设备及存储介质
WO2021017261A1 (zh) 识别模型训练方法、图像识别方法、装置、设备及介质
TWI766855B (zh) 一種字符識別方法和裝置
EP2806374B1 (en) Method and system for automatic selection of one or more image processing algorithm
WO2020232872A1 (zh) 表格识别方法、装置、计算机设备和存储介质
WO2018166114A1 (zh) 图片识别的方法、系统、电子装置及介质
WO2022042123A1 (zh) 图像识别模型生成方法、装置、计算机设备和存储介质
WO2020119053A1 (zh) 一种图片聚类方法、装置、存储介质及终端设备
JP7132654B2 (ja) レイアウト解析方法、読取り支援デバイス、回路および媒体
US20190332577A1 (en) Data access method based on feature analysis, storage device and storage system
WO2021000404A1 (zh) 基于深度学习的目标检测方法及电子装置
EP3620982B1 (en) Sample processing method and device
WO2021042844A1 (zh) 大规模数据聚类方法、装置、计算机设备及计算机可读存储介质
CN111666905B (zh) 模型训练方法、行人属性识别方法和相关装置
WO2019238125A1 (zh) 信息处理方法、相关设备及计算机存储介质
WO2020168754A1 (zh) 基于预测模型的绩效预测方法、装置及存储介质
CN110705489A (zh) 目标识别网络的训练方法、装置、计算机设备和存储介质
WO2020143303A1 (zh) 深度学习模型训练方法、装置、计算机设备及存储介质
Ning et al. MT-YOLOv5: Mobile terminal table detection model based on YOLOv5
WO2021068524A1 (zh) 图像匹配方法、装置、计算机设备及存储介质
US20190019107A1 (en) Method of machine learning by remote storage device and remote storage device employing method of machine learning
CN110765917A (zh) 适用于人脸识别模型训练的主动学习方法、装置、终端、介质
US20230245276A1 (en) Method and apparatus for acquiring raw image, and electronic device
CN111402164B (zh) 矫正网络模型的训练方法和装置、文本识别方法和装置
CN110929118B (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: 19909307

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

Country of ref document: EP

Kind code of ref document: A1