CN105224963B - The method and terminal of changeable deep learning network structure - Google Patents

The method and terminal of changeable deep learning network structure Download PDF

Info

Publication number
CN105224963B
CN105224963B CN201410244177.6A CN201410244177A CN105224963B CN 105224963 B CN105224963 B CN 105224963B CN 201410244177 A CN201410244177 A CN 201410244177A CN 105224963 B CN105224963 B CN 105224963B
Authority
CN
China
Prior art keywords
matrix
value
hiding
initial
parameter
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.)
Active
Application number
CN201410244177.6A
Other languages
Chinese (zh)
Other versions
CN105224963A (en
Inventor
罗平
田永龙
王晓刚
鞠汶奇
刘健庄
汤晓鸥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410244177.6A priority Critical patent/CN105224963B/en
Publication of CN105224963A publication Critical patent/CN105224963A/en
Application granted granted Critical
Publication of CN105224963B publication Critical patent/CN105224963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present embodiments relate to the methods and terminal of a kind of changeable deep learning network structure.The described method includes: obtaining the first input feature vector matrix for indicating object features;According to the first input feature vector matrix, the value of corresponding multiple notable feature matrixes and the estimated value of switching variable corresponding with notable feature matrix are determined;Corresponding element in first input feature vector matrix is subjected to multiplication operation with the corresponding element in corresponding notable feature matrix, obtains the first matrix of consequence;First matrix of consequence and the first parameter matrix are subjected to multiplication operation, obtain the second matrix of consequence;Second matrix of consequence and the first offset moment matrix are subjected to sum operation, obtain third matrix of consequence;According to activation primitive, activation processing is carried out to third matrix of consequence, obtains activated matrix;Element in activated matrix is subjected to multiplication operation with the estimated value of corresponding switching variable, obtains switching matrix;Corresponding element in switching matrix is subjected to cumulative summation operation, obtains the first output matrix.

Description

The method and terminal of changeable deep learning network structure
Technical field
The present invention relates to the methods and end of communication technique field more particularly to a kind of changeable deep learning network structure End.
Background technique
Deep learning network is the field of a very close artificial intelligence in machine learning, its object is to establish, mould Anthropomorphic brain carries out the neural network of analytic learning.
Currently, deep learning network achieves a series of surprising achievements in numerous areas, such as: in video, language Sound identification field, identification can be used for recruit field of pharmacy etc..In the prior art, the basic network of deep learning network Structure is convolutional neural networks (Convolutional Newral Network, referred to as: CNN) structure and depth confidence network (Deep Belief Network, referred to as: DBN) structure.
It is illustrated by taking CNN network structure as an example, which is applied to field of image processing more.CNN network structure Convolution is carried out to the input feature vector matrix extracted in image with one or more filters (filter that is to say convolution template) Operation obtains output eigenmatrix corresponding with input feature vector matrix.
The convolution mask of CNN network structure are as follows:Wherein, wkFor the power of given convolution mask Value matrix, xkFor the characteristic variable of input feature vector matrix, function f () is activation primitive, is typically chosen sigmoid function.
Detailed process are as follows: input feature vector matrix by and multiple training filter and can biasing set carry out convolution algorithm, Multiple Feature Mapping figures are generated at C1 layers;Every group in Feature Mapping figure of 4 pixels are summed again, with weight matrix, partially Sum operation is set, multiple S2 layers of Feature Mapping figure is obtained by sigmoid function;Feature Mapping figure is filtered place again Reason, obtains C3 layers;Every group in C3 layers of Feature Mapping figure of 4 pixels are summed again, are added fortune with weight matrix, biasing It calculates, multiple S4 layers of Feature Mapping figure is obtained by sigmoid function;Finally, the Feature Mapping figure of each layer is connected as one Vector is input in traditional neural network, obtains output eigenmatrix corresponding with input feature vector matrix.
But the exposure when handling graphic service using CNN network structure and traditional neural network in the prior art Following defect out: the calculating process of multiple network structure is complicated, it is computationally intensive and CNN network structure is used alone can not be simple It is rapidly obtained output eigenmatrix.
Summary of the invention
The embodiment of the invention provides the methods and terminal of a kind of changeable deep learning network structure, solve existing skill What CNN network structure calculating process complexity, computationally intensive exclusive use network structure can not be simple and quick in art gets defeated Out the problem of eigenmatrix.
In a first aspect, the embodiment of the invention provides a kind of method of changeable deep learning network structure, the side Method includes:
Obtain one or more the first input feature vector matrix for indicating object features;
According to each first input feature vector matrix, determine corresponding with the first input feature vector matrix multiple significant The estimated value of the value of eigenmatrix and switching variable corresponding with each notable feature matrix;
According to the value of the notable feature matrix, respectively by each first input feature vector matrix corresponding element with Corresponding element in corresponding multiple notable feature matrixes carries out multiplication operation, obtains multiple first matrixs of consequence;
The first parameter matrix that each first matrix of consequence and preset or training obtain is subjected to multiplication operation, is obtained To multiple second matrixs of consequence;
The first offset moment matrix that each second matrix of consequence and preset or training are obtained carries out sum operation, Obtain multiple third matrixs of consequence;
According to activation primitive, activation processing is carried out to each third matrix of consequence, obtains multiple activated matrixs;
Each element in each activated matrix is subjected to phase with the estimated value of the corresponding one switching variable Multiplication obtains multiple switching matrix;
Corresponding element in multiple switching matrix is subjected to cumulative summation operation, obtains the first output matrix.
In the first possible implementation, the determination switches with each corresponding one of notable feature matrix The estimated value of variable specifically includes:
Pass throughThe probability value for calculating multiple switching variables, retains institute State probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in Switching variable sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 becomes as the switching The estimated value of amount;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth of k-th initial of first parameter matrixs Capable transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, described For the transposition of k-th initial of first hiding matrixes.
In the second possible implementation, the determination switches with each corresponding one of notable feature matrix The estimated value of variable specifically includes:
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates more The probability value of a switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and the value of the switching variable after setting 1 and the institute after setting 0 State estimated value of the value of switching variable as the switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is first The transposition of the jth row of k-th of first parameter matrix to begin;It is describedFor institute in the jth column of the second initial parameter matrix The transposition for the matrix for thering is element to be formed;The bkjFor the initial k-th first offset moment matrix j-th of element it is initial Value;The k is positive integer, and j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The λkFor K-th of element of the 4th hiding matrix;The d is that third hides matrix.
In the third possible implementation, the value of the notable feature matrix is by each member in the notable feature matrix The probability value composition of element;
In the notable feature matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;Institute State hkFor preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckFor K-th initial of first hiding matrixes;The k is positive integer;The τ () is the activation primitive.
In the fourth possible implementation, the activation primitive specifically includes: the absolute value of hyperbolic tangent function, double Bent tangent function double cut SIN function, double cuts cosine function, any function in sigmoid function.
In a fifth possible implementation, the method also includes: determine first parameter matrix, described first Excursion matrix and the first hiding matrix.
The 5th kind of possible implementation with reference to first aspect, in a sixth possible implementation, the determination First parameter matrix, first excursion matrix and the first hiding matrix specifically include:
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, lead to It crosses 1 time or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first offset Matrix.
The 6th kind of possible implementation with reference to first aspect, it is any primary in the 7th kind of possible implementation The operation mode of the iteration specifically includes:
It is hidden according to the initial value and described first of the initial value of first parameter matrix, the first offset moment matrix The initial value of matrix, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value and the first hiding matrix initial value, determine the probability value, described significant of the second input feature vector matrix The probability value of the probability value of eigenmatrix and the second hiding matrix;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square The probability value of battle array and the probability value of the second hiding matrix, determine the second input feature vector matrix in a manner of generating at random The first value, the first value of the first value of the notable feature matrix and the second hiding matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the notable feature square First value of battle array and the first value of the second hiding matrix determine second input to determine the same method of the first value The second value of the second value of eigenmatrix, the second value of the second hiding matrix and the notable feature matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the second hiding square Battle array the first value, the first value of the notable feature matrix, the second value of the second input feature vector matrix, it is described second hide The second value of the second value of matrix and the notable feature matrix determines the described first hiding matrix, first parameter matrix Moment matrix is deviated with described first, and the operation mode of the iteration next time is entered according to preset condition or exits described change The operation mode in generation.
The 6th kind of possible implementation with reference to first aspect, in the 8th kind of possible implementation, the acquisition The initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix specifically includes:
The initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix is obtained at random;Or Person,
By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix are obtained With the initial value of the first hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
The 7th kind of possible implementation with reference to first aspect, in the 9th kind of possible implementation, the determination The estimated value of all switching variables corresponding with the second input feature vector matrix of each training sample specifically includes:
Pass throughThe probability values for calculating multiple switching variables, described in reservation Probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 is as the switching variable Estimated value;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount;
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first ginseng The transposition of the jth row of matrix number;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix; Described k, j are positive integer, describedFor the transposition of k-th initial of first hiding matrix.
The 7th kind of possible implementation with reference to first aspect, in the tenth kind of possible implementation, the determination The probability value of the second input feature vector matrix specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The 7th kind of possible implementation with reference to first aspect, in a kind of the tenth possible implementation, it is described really The probability value of the fixed notable feature matrix specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The 7th kind of possible implementation with reference to first aspect, it is described true in the 12nd kind of possible implementation The probability value of the fixed second hiding matrix specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix; The bkFor k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The symbol ο representing matrix corresponding element is multiplied.
The 7th kind of possible implementation with reference to first aspect, it is described true in the 13rd kind of possible implementation Fixed first parameter matrix, the first offset moment matrix and the first hiding matrix specifically by
It calculates;
Wherein, the θ is first parameter matrix, in the first offset moment matrix, the first hiding matrix Any one;It is describedThe skIt is cut described in k-th The estimated value of transformation amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described the Two input feature vector matrixes;The mkFor the preset k-th notable feature matrix;The WkIt is initial k-th described first Parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedIt is described first hidden for initial k-th Hide the transposition of matrix;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0 For the first value of the described second hiding matrix;The m0For the first value of the notable feature matrix;It is describedIt is defeated for described second Enter the second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the of notable feature matrix Two-value;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element is multiplied.
The 13rd kind of possible implementation with reference to first aspect, it is described in the 14th kind of possible implementation Method further include:
Pass throughUpdate first parameter matrix initial value, it is described first offset moment matrix it is initial The initial value of value and the described first hiding matrix;
Wherein, θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;The η is preset learning rate.
In the 15th kind of possible implementation, it is described obtain first output matrix after further include:
The second parameter matrix that the first output matrix matrix and preset or training obtain is subjected to multiplication operation, is obtained To the second output matrix.
The 15th kind of possible implementation with reference to first aspect, it is described in the 16th kind of possible implementation Method further include:
Determine first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix Matrix is hidden with third.
The 16th kind of possible implementation with reference to first aspect, it is described in the 17th kind of possible implementation Determine first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix and described the Three hiding matrixes specifically include:
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix is identical;
Obtain first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide the initial value of matrix and the 4th hiding matrix;
It is hidden according to first parameter matrix, second parameter matrix, the first offset moment matrix, described first Matrix, the third hide the initial value of matrix and the 4th hiding matrix, determine institute by the operation mode of 1 time or successive ignition It is hidden to state the first hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third Hide matrix.
The 17th kind of possible implementation with reference to first aspect, in the 18th kind of possible implementation, arbitrarily The operation mode of the primary iteration specifically includes:
According to the initial value of first parameter matrix, the initial value of second parameter matrix, first offset The initial value of matrix, the initial value of the first hiding matrix and the third are hidden the initial value of matrix and the described 4th and are hidden The initial value of matrix, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the second hiding matrix Initial value, the third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine that second input is special Levy the probability value and the second output square of the probability value of matrix, the probability value of the notable feature matrix, the second hiding matrix The probability value of battle array;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square Probability value, the probability value of the second hiding matrix and the probability value of second output matrix of battle array, with the side generated at random Formula determines the first value of the second input feature vector matrix, the first value of the notable feature matrix, the second hiding matrix The first value and second output matrix the first value;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix The first value, the first value of the second hiding matrix and the first value of second output matrix, with determine the first value it is same Method determine the second value of the second input feature vector matrix, second value, the notable feature of the second hiding matrix The second value of the second value of matrix and second output matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the second hiding matrix The first value, the first value of the notable feature matrix, the first value of second output matrix, the second input feature vector square Second value, the second value of the second hiding matrix, the second value of the notable feature matrix and the second output square of battle array The second value of battle array determines the described first hiding matrix, first parameter matrix, second parameter matrix, described first partially It moves moment matrix and the third hides matrix, and the operation mode of the iteration next time is entered according to preset condition or is exited The operation mode of the iteration.
The 17th kind of possible implementation with reference to first aspect, it is described in the 19th kind of possible implementation Obtain first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix, institute The initial value for stating the hiding matrix of third and the 4th hiding matrix specifically includes:
First parameter matrix, second parameter matrix, the first offset moment matrix, described first are obtained at random Hide matrix, the third hides the initial value of matrix and the 4th hiding matrix;Alternatively,
The initial value of second parameter matrix, the third hiding matrix and the 4th hiding matrix is obtained at random, By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix and described the are obtained The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
The 18th kind of possible implementation with reference to first aspect, it is described in the 20th kind of possible implementation Determining all estimated values for switching variables corresponding with each second input feature vector matrix specifically include:
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates more The probability value of a switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and the value of the switching variable after setting 1 and the institute after setting 0 State estimated value of the value of switching variable as the switching variable;
Wherein, the x is the preset second input feature vector matrix;The y is preset second output matrix; It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter The transposition for the matrix that all elements are formed in the jth column of matrix;The bkjFor k-th initial of first offset moment matrix The initial value of j-th of element;The k is the positive integer no more than the K, and j is positive integer, describedDescribed in initial k-th The transposition of first hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides square Battle array.
The 18th kind of possible implementation with reference to first aspect, in a kind of the 20th possible implementation, institute State determine the probability value of the second input feature vector matrix specifically by It calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The 18th kind of possible implementation with reference to first aspect, in the 22nd kind of possible implementation, institute State determine the probability value of the notable feature matrix specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The 18th kind of possible implementation with reference to first aspect, in the 23rd kind of possible implementation, institute State determine the probability value of the second hiding matrix specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The Wk For k-th initial of first parameter matrix;The bkFor k-th initial of first offset moment matrix;The UTIt is first The transposition of second parameter matrix to begin;The k is the positive integer no more than the K;The τ () is the activation letter Number;The symbol ο representing matrix corresponding element is multiplied.
The 18th kind of possible implementation with reference to first aspect, in the 24th kind of possible implementation, institute State determine it is described output eigenmatrix probability value specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The hkIt is hidden for preset k-th described second Matrix;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K Positive integer;The τ () is the activation primitive.
The 18th kind of possible implementation with reference to first aspect, in the 25th kind of possible implementation, institute State determine the first hiding matrix, first parameter matrix, second parameter matrix, the first offset moment matrix and The third hide matrix specifically byIt calculates;
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described First hiding matrix and the third hide any one in matrix;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedDescribed in initial k-th The transposition of first hiding matrix, the U are initial second parameter matrix;The yTFor the preset second output square The transposition of battle array;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is described second First value of input feature vector matrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix The first value;The m0For the first value of the notable feature matrix;It is describedIt is the second of the second input feature vector matrix Value;It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is described For the second value of the notable feature matrix;The k is the positive integer no more than the K;The symbol.Representing matrix corresponding element Element is multiplied.
The 25th kind of possible implementation with reference to first aspect, in the 26th kind of possible implementation, The method also includes:
Pass throughUpdate the initial value of first parameter matrix, second parameter matrix it is initial Value, the initial value of the first offset moment matrix, the initial value of the first hiding matrix and the third hide the first of matrix Initial value;
Wherein, θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in the hiding matrix of matrix, the third;The η is preset learning rate;
Pass throughUpdate the initial value of the 4th hiding matrix;
Wherein, the skThe estimated value of k-th of switching variable;The λkIt is k-th yuan of the 4th hiding matrix Element;The k is the positive integer no more than the K;The n is positive integer.
In second aspect, the embodiment of the invention provides a kind of terminal, the terminal includes:
Acquiring unit, for obtaining one or more the first input feature vector matrix for indicating object features;
First determination unit, for according to each first input feature vector matrix, determining and first input feature vector The value of the corresponding multiple notable feature matrixes of matrix and a switching variable corresponding with each notable feature matrix are estimated Evaluation;
Arithmetic element, for the value according to the notable feature matrix, respectively by each first input feature vector matrix In corresponding element in corresponding multiple notable feature matrixes corresponding element carry out multiplication operation, obtain multiple first Matrix of consequence;
The arithmetic element is also used to, the first parameter that each first matrix of consequence and preset or training are obtained Matrix carries out multiplication operation, obtains multiple second matrixs of consequence;
The arithmetic element is also used to, the first offset that each second matrix of consequence and preset or training are obtained Moment matrix carries out sum operation, obtains multiple third matrixs of consequence;
The arithmetic element is also used to, and according to activation primitive, is carried out activation processing to each third matrix of consequence, is obtained To multiple activated matrixs;
The arithmetic element is also used to, by each element and the corresponding switching in each activated matrix The estimated value of variable carries out multiplication operation, obtains multiple switching matrix;
The arithmetic element is also used to, and the corresponding element in multiple switching matrix is carried out cumulative summation operation, is obtained To the first output matrix.
In the first possible implementation, first determination unit is determining with each notable feature matrix It is corresponding one switching variable estimated value specifically,
Pass throughThe probability value for calculating multiple switching variables, retains institute State probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in Switching variable sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 becomes as the switching The estimated value of amount;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth of k-th initial of first parameter matrixs Capable transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, described For the transposition of k-th initial of first hiding matrixes.
In the second possible implementation, first determination unit is determining with each notable feature matrix The estimated value of corresponding switching variable specifically includes:
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates more The probability value of a switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and the value of the switching variable after setting 1 and the institute after setting 0 State estimated value of the value of switching variable as the switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is first The transposition of the jth row of k-th of first parameter matrix to begin;It is describedIt is arranged for the jth of initial second parameter matrix The transposition for the matrix that middle all elements are formed;The bkjFor j-th of element of initial k-th first offset moment matrix Initial value;The k is the positive integer no more than the K, and j is positive integer, describedFor k-th initial of first hiding square The transposition of battle array;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides matrix.
In the third possible implementation, the value for the notable feature matrix that first determination unit determines by The probability value composition of each element in the notable feature matrix;
In the notable feature matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;Institute State hkFor preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckFor K-th initial of first hiding matrixes;The k is positive integer;The τ () is the activation primitive.
In the fourth possible implementation, the activation primitive that the arithmetic element uses specifically includes: hyperbolic The absolute value of tangent function, double cut SIN function, double cuts cosine function, any letter in sigmoid function hyperbolic tangent function Number.
In a fifth possible implementation, the terminal further include: the second determination unit, for determining described first Parameter matrix, first excursion matrix and the first hiding matrix.
In conjunction with the 5th kind of possible implementation of second aspect, in a sixth possible implementation, described second Determination unit is specifically used for, and obtains the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, lead to It crosses 1 time or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first offset Matrix.
In conjunction with the 6th kind of possible implementation of second aspect, in the 7th kind of possible implementation, described second The operation mode for any primary iteration that determination unit uses specifically includes:
According to the second input feature vector matrix, the initial value of first parameter matrix, the first offset moment matrix Initial value and the first hiding matrix initial value, determining all institutes corresponding with each second input feature vector matrix State the estimated value of switching variable;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value and the first hiding matrix initial value, determine the probability value, described significant of the second input feature vector matrix The probability value of the probability value of eigenmatrix and the second hiding matrix;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square The probability value of battle array and the probability value of the second hiding matrix, determine the second input feature vector matrix in a manner of generating at random The first value, the first value of the first value of the notable feature matrix and the second hiding matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the notable feature square First value of battle array and the first value of the second hiding matrix determine second input to determine the same method of the first value The second value of the second value of eigenmatrix, the second value of the second hiding matrix and the notable feature matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the second hiding square Battle array the first value, the first value of the notable feature matrix, the second value of the second input feature vector matrix, it is described second hide The second value of the second value of matrix and the notable feature matrix determines the described first hiding matrix, first parameter matrix Moment matrix is deviated with described first, and the operation mode of the iteration next time is entered according to preset condition or exits described change The operation mode in generation.
In conjunction with the 6th kind of possible implementation of second aspect, in the 8th kind of possible implementation, described second Determination unit is specifically used for, and obtains first parameter matrix, the first offset moment matrix and the first hiding matrix at random Initial value;Alternatively,
By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix are obtained With the initial value of the first hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
In conjunction with the 7th kind of possible implementation of second aspect, in the 9th kind of possible implementation, described second The estimated value for all switching variables corresponding with the second input feature vector of each trained sample that determination unit determines Specifically,
Pass throughThe probability value for calculating multiple switching variables, retains institute State probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in Switching variable sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 becomes as the switching The estimated value of amount;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount;
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first ginseng The transposition of the jth row of matrix number;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix; Described k, j are positive integer, describedFor the transposition of k-th initial of first hiding matrix.
In conjunction with the 7th kind of possible implementation of second aspect, in the tenth kind of possible implementation, described second Determination unit determine the second input feature vector matrix probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
In conjunction with the 7th kind of possible implementation of second aspect, in a kind of the tenth possible implementation, described Two determination units determine the notable feature matrix in each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
In conjunction with the 7th kind of possible implementation of second aspect, in the 12nd kind of possible implementation, described Two determination units determine the described second hiding matrix probability value specifically,
Pass through p (hk=1 | x, s, m)=τ (sk(Wk(xοmk)+bk)) calculate;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix; The bkFor k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The symbol ο representing matrix corresponding element is multiplied.
In conjunction with the 7th kind of possible implementation of second aspect, in the 13rd kind of possible implementation, described Determining first parameter matrix of two determination units, the first offset moment matrix and the first hiding matrix are specially
Pass throughIt calculates;
Wherein, the θ is first parameter matrix, in the first offset moment matrix, the first hiding matrix Any one;It is describedThe skIt is cut described in k-th The estimated value of transformation amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described the Two input feature vector matrixes;The mkFor the preset k-th notable feature matrix;The WkIt is initial k-th described first Parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedIt is hidden for initial k-th described first The transposition of matrix;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0For First value of the second hiding matrix;The m0For the first value of the notable feature matrix;It is describedFor second input The second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the second of notable feature matrix Value;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element is multiplied.
It is described in the 14th kind of possible implementation in conjunction with the 13rd kind of possible implementation of second aspect Terminal further include:
First updating unit, for passing throughUpdate first parameter matrix initial value, described The initial value of one offset moment matrix and the initial value of the first hiding matrix;
Wherein, θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;The η is preset learning rate.
In the 15th kind of possible implementation, the arithmetic element is also used to, by the first output matrix matrix The second parameter matrix obtained with preset or training carries out multiplication operation, obtains the second output matrix.
It is described in the 16th kind of possible implementation in conjunction with the 15th kind of possible implementation of second aspect Terminal further include: third determination unit, for determining first parameter matrix, second parameter matrix, described first partially It moves moment matrix, the first hiding matrix and third and hides matrix.
It is described in the 17th kind of possible implementation in conjunction with the 16th kind of possible implementation of second aspect Third determination unit is specifically used for, and obtains the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix is identical;
Obtain first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide the initial value of matrix and the 4th hiding matrix;
It is hidden according to first parameter matrix, second parameter matrix, the first offset moment matrix, described first Matrix, the third hide the initial value of matrix and the 4th hiding matrix, determine institute by the operation mode of 1 time or successive ignition It is hidden to state the first hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third Hide matrix.
It is described in the 18th kind of possible implementation in conjunction with the 17th kind of possible implementation of second aspect The operation mode for any primary iteration that third determination unit uses specifically includes:
According to the second input feature vector matrix, second output matrix, the initial value of first parameter matrix, institute State the initial value of the second parameter matrix, the first offset initial value of moment matrix, the first hiding matrix initial value and The third hides the initial value of matrix and the initial value of the 4th hiding matrix, determining and each second input feature vector The estimated value of the corresponding all switching variables of matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the second hiding matrix Initial value, the third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine that second input is special Levy the probability value of matrix, the probability value of the notable feature matrix, the probability value of the second hiding matrix and described second defeated The probability value of matrix out;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square Probability value, the probability value of the second hiding matrix and the probability value of second output matrix of battle array, with the side generated at random Formula determine the first value of the second input feature vector matrix, the first value of the notable feature matrix, the second hiding matrix First value of one value and second output matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix The first value, the first value of the second hiding matrix and the first value of second output matrix, with determine the first value it is same Method determine the second value of the second input feature vector matrix, second value, the notable feature of the second hiding matrix The second value of the second value of matrix and second output matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the second hiding matrix The first value, the first value of the notable feature matrix, the first value of second output matrix, the second input feature vector square Second value, the second value of the second hiding matrix, the second value of the notable feature matrix and the second output square of battle array The second value of battle array determines the described first hiding matrix, first parameter matrix, second parameter matrix, described first partially It moves moment matrix and the third hides matrix, and the operation mode of the iteration next time is entered according to preset condition or is exited The operation mode of the iteration.
It is described in the 19th kind of possible implementation in conjunction with the 17th kind of possible implementation of second aspect Third determination unit is specifically used for, and obtains first parameter matrix, second parameter matrix, first offset at random Matrix, the first hiding matrix, the third hide the initial value of matrix and the 4th hiding matrix;Alternatively,
The initial value of second parameter matrix, the third hiding matrix and the 4th hiding matrix is obtained at random, By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix and described the are obtained The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
It is described in the 20th kind of possible implementation in conjunction with the 18th kind of possible implementation of second aspect The estimated values for all switching variables corresponding with each second input feature vector matrix that third determination unit determines have Body is,
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates more The probability value of a switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and the value of the switching variable after setting 1 and the institute after setting 0 State estimated value of the value of switching variable as the switching variable;
Wherein, the x is the preset second input feature vector matrix;The y is the preset output eigenmatrix; It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter The transposition for the matrix that all elements are formed in the jth column of matrix;The bkjFor k-th initial of first offset moment matrix The initial value of j-th of element;The k is the positive integer no more than the K, and j is positive integer, describedFor k-th initial of institute State the transposition of the first hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d hides for the third Matrix.
In conjunction with the 18th kind of possible implementation of second aspect, in a kind of the 20th possible implementation, institute State third determination unit determine the second input feature vector matrix probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
In conjunction with the 18th kind of possible implementation of second aspect, in the 22nd kind of possible implementation, institute State third determination unit determine the notable feature matrix probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
In conjunction with the 18th kind of possible implementation of second aspect, in the 23rd kind of possible implementation, institute State third determination unit determine the described second hiding matrix probability value specifically,
Pass through p (hk=1 | x, y, s, m)=τ (sk(Wk(xοmk)+bk+UTY) it) calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The Wk For k-th initial of first parameter matrix;The bkFor k-th initial of first offset moment matrix;The UTIt is first The transposition of second parameter matrix to begin;The k is the positive integer no more than the K;The τ () is the activation letter Number;The symbol ο representing matrix corresponding element is multiplied.
In conjunction with the 18th kind of possible implementation of second aspect, in the 24th kind of possible implementation, institute State third determination unit determine the output eigenmatrix probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The hkIt is hidden for preset k-th described second Matrix;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K Positive integer;The τ () is the activation primitive.
In conjunction with the 18th kind of possible implementation of second aspect, in the 25th kind of possible implementation, institute State the described first determining hiding matrix of third unit, first parameter matrix, second parameter matrix, described first partially Move moment matrix and the third hide matrix specifically,
Pass throughIt calculates;
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described First hiding matrix and the third hide any one in matrix;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedFor initial k-th described The transposition of one hiding matrix, the U are initial second parameter matrix;The yTFor preset second output matrix Transposition;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is defeated for described second Enter the first value of eigenmatrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix First value;The m0For the first value of the notable feature matrix;It is describedFor the second value of the second input feature vector matrix; It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is described The second value of notable feature matrix;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element phase Multiply.
In conjunction with the 25th kind of possible implementation of second aspect, in the 26th kind of possible implementation, The terminal further include:
Second updating unit, for passing throughUpdate first parameter matrix initial value, described The initial value of two parameter matrixs, the first offset initial value of moment matrix, the initial value of the first hiding matrix and described Third hides the initial value of matrix;
Wherein, θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in the hiding matrix of matrix, the third;The η is preset learning rate;
Second updating unit is also used to, and is passed throughUpdate the initial value of the 4th hiding matrix;
Wherein, the skThe estimated value of k-th of switching variable;The λkIt is k-th yuan of the 4th hiding matrix Element;The k is the positive integer no more than the K;The n is positive integer.
By the method and terminal of application changeable deep learning network structure provided in an embodiment of the present invention, terminal is obtained One or more the first input feature vector matrixes for indicating object features, pass throughIt obtains First output matrix of the first input feature vector matrix.Solve CNN network structure calculating process complexity, calculation amount in the prior art Be used alone that the network structure can not be simple and quick greatly the problem of getting output eigenmatrix, realize simplification and calculated Journey reduces calculation amount, can rapidly obtain the output matrix of input picture.
Detailed description of the invention
Fig. 1 is the method flow diagram for the changeable deep learning network structure that the embodiment of the present invention one provides;
Fig. 2 is the method flow diagram of changeable deep learning network structure provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of terminal structure schematic diagram that the embodiment of the present invention three provides;
Fig. 4 is another terminal structure schematic diagram that the embodiment of the present invention three provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
In order to facilitate understanding of embodiments of the present invention, it is further explained below in conjunction with attached drawing with specific embodiment Bright, embodiment does not constitute the restriction to the embodiment of the present invention.
Embodiment one
The side for the changeable deep learning network structure that embodiment one that the present invention will be described in detail by taking Fig. 1 as an example below provides Method, Fig. 1 is the method flow diagram for the changeable deep learning network structure that the embodiment of the present invention one provides, in the embodiment of the present invention Middle subject of implementation is the terminal that with processor and the processor can be handled the image for obtaining, collecting, the terminal tool Body is PC (Personal Computer, referred to as: PC), desktop computer etc..
The method of changeable deep learning network structure provided in an embodiment of the present invention is applied to field of image processing.Such as figure Shown in 1, the embodiment specifically includes the following steps:
Step 110 obtains one or more the first input feature vector matrix for indicating object features.
Specifically, camera is installed in public places, camera is connected by wired, wireless network connection type and terminal It connects.Camera captured in real-time photo site, by wired, wireless network by image transmitting to terminal, terminal obtains input picture, The storage format of input picture is by Y, U, V component composition.
Input picture is zoomed in and out processing by terminal, such as: by 640 × 480 ratio of input picture scale value.And it will input Image is divided, and obtains multiple 108 × 36 window, and each window indicates a part of input picture, and from each window 6 different input feature vectors are formed the 2 dimensional feature matrixes in 6 channels by 6 different input feature vectors of middle extraction.
6 different input feature vectors are extracted from window, form the 2 dimensional feature matrixes in 6 channels specifically: are extracted in window Y-component (Y-component in image storage format YUV), using Y-component as the first input feature vector;Window is zoomed into full size 4/5 (scaling can change according to the actual situation) size, extract Y ' component when window zooms to the 4/5 of full size, and Using Y ' component as the second input feature vector;Window is zoomed to 3/5 (scaling can change according to the actual situation) of full size Size extracts Y " component when window zooms to the 3/5 of full size, and using Y " component as third input feature vector;Extract window In side feature A, using A as the 4th input feature vector;By window zoom to full size 4/5 (scaling can be according to practical feelings Condition changes) size, the special positive A ' in side when window zooms to the 4/5 of full size is extracted, and regard A ' as the 5th input feature vector;By window Mouth zooms to 3/5 (scaling can change according to the actual situation) size of full size, extracts window and zooms to the 3/5 of full size When side feature A ", and by A " be used as the 6th input feature vector;6 different input feature vectors are formed to the 2 dimensional feature squares in 6 channels Battle array.
In embodiments of the present invention, it is illustrated so that terminal obtains multiple first input feature vector matrixes as an example.
For 2 dimensional feature matrixes of each window, terminal is filtered place using the filter of 64 trained 9*9*6 Reason obtains filtering matrix, and the number of the filtering matrix is 64, and reuses trained 2* to 64 filtering matrixs respectively The filter of 2*64 is handled, and the filter of the 2*2*64 is handled the processing to filtering matrix specifically: from each filter Selected pixels maximum value in every 4 pixels in wave matrix, and the pixel maximum after selection is formed into the first input feature vector Matrix, in the embodiment of the present invention, the number of the first input feature vector matrix is 64.
Terminal obtains the first input feature vector matrix for indicating object features.
Step 120, according to each first input feature vector matrix, determination is corresponding with the first input feature vector matrix The estimated value of the value of multiple notable feature matrixes and switching variable corresponding with each notable feature matrix.
Specifically, terminal is directed to each first input feature vector matrix, determines corresponding more with the first input feature vector matrix The value of a notable feature matrix, and according to the value for the multiple notable feature matrixes determined, determining and each notable feature matrix Value it is corresponding 1 switching variable estimated value.
Further, it is determined that the number of notable feature matrix be preset numerical value, for example, to preset each first defeated for terminal The number for entering the corresponding notable feature matrix of eigenmatrix is 10.It is understood that the number for the switching variable that terminal determines It also is 10.
In embodiments of the present invention, the value of the notable feature matrix by each element in the notable feature matrix probability Value composition, that is to say, terminal is by determining that the probability value of each element in notable feature matrix determines notable feature matrix Value, that is, determine notable feature matrix.
Further, terminal first passes through the estimated value that following formula one determine multiple switching variables.
Formula one
Terminal calculates the probability value of multiple switching variables by formula one, retains the value of the maximum switching variable of probability value, Other switching variables in addition to the maximum switching variable of probability value are set 0, and by the value of the switching variable of reservation and after setting 0 Switch estimated value of the value of variable as switching variable;
Alternatively, terminal calculates the probability value of multiple switching variables by formula one, the maximum switching variable of probability value is set 1, other switching variables in addition to the maximum switching variable of probability value are set 0, and the value of the switching variable after 1 being set with set 0 Estimated value of the value of switching variable afterwards as switching variable;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth of k-th initial of first parameter matrixs Capable transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, described For the transposition of k-th initial of first hiding matrixes.
Further, terminal determines that the probability value of each element in notable feature matrix is counted especially by following formula two It calculates,
Formula two
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;Institute State hkFor preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckFor K-th initial of first hiding matrixes;The k is positive integer;The τ () is the activation primitive.
Step 130, according to the value of the notable feature matrix, respectively by pair in each first input feature vector matrix It answers element to carry out multiplication operation with the corresponding element in corresponding multiple notable feature matrixes, obtains multiple first result squares Battle array.
Specifically, the value of the notable feature matrix determined according to step 120, terminal is respectively by each first input feature vector square Corresponding element in battle array carries out multiplication operation with the corresponding element in corresponding multiple notable feature matrixes, obtains multiple first knots Fruit matrix.
According to example above-mentioned, terminal is significant with corresponding 10 respectively by the corresponding element in the first input feature vector matrix Feature crosses the corresponding element in each of matrix notable feature matrix and carries out multiplication operation, obtains multiple first result squares Battle array.
Further, the first matrix of consequence is calculated by following formula three,
Formula three
Wherein, the x is the first input feature vector matrix;It is describedFor the notable feature matrix;Described k, l are positive Integer, the symbol ο representing matrix corresponding element are multiplied.
The first parameter matrix that each first matrix of consequence is obtained with preset or training is carried out phase by step 140 Multiplication obtains multiple second matrixs of consequence.
Specifically, the second matrix of consequence is calculated by following formula four,
Formula four
Wherein, the fkFor first matrix of consequence;It is describedFor k-th of first parameter matrixs;Described k, l are positive whole Number.
Step 150, the first offset moment matrix for obtaining each second matrix of consequence and preset or training carry out Sum operation obtains multiple third matrixs of consequence.
Specifically, third matrix of consequence is calculated by following formula five,
Formula five
Wherein, the gkFor second matrix of consequence;It is describedFor k-th first offset moment matrixs;Described k, l are positive Integer.
Step 160, according to activation primitive, activation processing is carried out to each third matrix of consequence, obtains multiple activation Matrix.
Specifically, activated matrix is calculated by following formula six,
nk=tanhabs(ik) formula six
Wherein, the tanhabs() is the activation primitive;The k is positive integer.The activation primitive specifically includes: The absolute value of hyperbolic tangent function, double cut SIN function, double cuts cosine function, appointing in sigmoid function hyperbolic tangent function One function.Also any activation primitive in the prior art can be used according to the actual situation.
Step 170, by each activated matrix each element with corresponding one it is described switching variable estimation Value carries out multiplication operation, obtains multiple switching matrix.
Specifically, switching matrix is calculated by following formula seven,
Formula seven
Wherein, describedFor the estimated value of k-th of switching variable;Described k, l are positive integer.
Corresponding element in multiple switching matrix is carried out cumulative summation operation by step 180, obtains the first output square Battle array.
Specifically, the first output matrix is calculated by following formula eight,
Formula eight
Wherein, describedFor the estimated value of k-th of switching variable.
It optionally, in embodiments of the present invention, further include terminal to the first parameter matrix, first involved in aforementioned formula The step of offset moment matrix is trained, by the training to parameters matrix, can quickly and accurately obtain the first output square Battle array, and then the output matrix of mark object features is obtained, improve the accuracy rate of detection.Specific step is as follows:
It is understood that while being trained to above-mentioned parameter matrix, terminal also to the first hiding matrix also into Row training.
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, lead to It crosses 1 time or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first offset Matrix.
Specifically, terminal obtains the second input feature vector matrix of training sample, and terminal carries out clustering processing to training sample, Obtain K class, the value of the K is identical as the number of notable feature matrix, the switching number of variable, in embodiments of the present invention with For 10 classes, terminal can carry out clustering processing to training sample by k-means method in the prior art, obtain K class.
Terminal obtains the initial value of the first parameter matrix, the first offset moment matrix and the first hiding matrix.It is understood that It is that the initial value of the matrix is specially the initial value of each element in matrix.
In one implementation, terminal obtains the first parameter matrix, the first offset moment matrix and the first hiding square at random The initial value of battle array;Alternatively,
In another implementation, terminal passes through limitation Boltzmann machine (Restricted Boltzmann Machine, referred to as: RBM) training pattern, obtain the initial of the first parameter matrix, the first offset moment matrix and the first hiding matrix Value;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
RBM pre-training technology is a kind of prior art for pre-training depth network parameter, and the technology is first immediately first Training sample, is then inputted network by beginningization network parameter, and 1 probability value occurs in the node for calculating hidden layer, then utilizes Ji The principle of Buss (gibbs) sampling is generated the value of the node of hidden layer by probability value at random, is reversely counted further according to the value of hidden layer There is 1 probability in the node for calculating visible layer, recycles this probability to generate the value of the node of visible layer at random, finally by comparing Difference between the desired value of node estimates parameter and updates size, to update network parameter.
Terminal passes through 1 time or more according to the first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix The operation mode of secondary iteration determines the first hiding matrix, the first parameter matrix and the first excursion matrix.
Further, in embodiments of the present invention, the operation mode of any primary iteration specifically includes:
Terminal is first according to the initial value of the first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix Initial value determines the estimated value of all switching variables corresponding with each second input feature vector matrix;
Terminal calculates the probability value of multiple switching variables, retains the maximum switching variable of probability value by following formula nine Value, other switching variables in addition to the maximum switching variable of probability value are set 0, and by the value of the switching variable of reservation with set Estimated value of the value of switching variable after 0 as switching variable;
Alternatively, calculating the probability value of multiple switching variables by following formula nine, the maximum switching variable of probability value being set 1, other switching variables in addition to the maximum switching variable of probability value are set 0, and the value of the switching variable after 1 being set with set 0 Estimated value of the value of switching variable afterwards as switching variable.
Formula nine
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first ginseng The transposition of the jth row of matrix number;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix; Described k, j are positive integer, describedFor the transposition of k-th initial of first hiding matrix.
Terminal according to the switching estimated value of variable, the initial value of the first parameter matrix, the first offset moment matrix initial value With the initial value of the first hiding matrix, the probability value of the second input feature vector matrix, the probability value of notable feature matrix and are determined The probability value of two hiding matrixes;In embodiments of the present invention, the probability value of each matrix specifically refers to each element in each matrix Probability value.
The probability value of second input feature vector matrix is calculated by following formula ten,
Formula ten
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The probability value of notable feature matrix is calculated by following formula 11,
Formula 11
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The probability value of second hiding matrix is calculated by following formula 12,
Formula 12
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix; The bkFor k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The symbol ο representing matrix corresponding element is multiplied.
Terminal according to switching the estimated value of variable, the probability value of the second input feature vector matrix, notable feature matrix probability The probability value of value and the second hiding matrix determines the first value, significant special of the second input feature vector matrix in a manner of generating at random Levy the first value of matrix and the first value of the second hiding matrix.In embodiments of the present invention, the first value of each matrix specifically refers to First value of each element in each matrix.
The random generating mode that is to say terminal using probability random rule, determine the of the second input feature vector matrix First value of one value, the first value of notable feature matrix and the second hiding matrix.
Probability random rule specially refers to be excluded subjective to extract observation unit, each tested list consciously in sampling Position is randomly assigned experimental group and control group, each unit is made to have certain chance to be taken out with the principle of probability equalization In.
Terminal according to the switching estimated value of variable, the initial value of the first parameter matrix, the first offset moment matrix initial value, The initial value of first hiding matrix, the first value of the second input feature vector matrix, the first value of notable feature matrix and second are hidden First value of matrix determines second value, the second hiding matrix of the second input feature vector matrix to determine the same method of the first value Second value and notable feature matrix second value.In embodiments of the present invention, the second value of each matrix specifically refers to each matrix In each element second value.
In embodiments of the present invention, terminal determines each parameter again by aforementioned formula ten, formula 11, formula 12 The probability value of matrix, using probability random rule determine the second value of the second input feature vector matrix, the second hiding matrix second The second value of value and notable feature matrix, process as hereinbefore, are no longer repeated herein.
Terminal according to the switching estimated value of variable, the initial value of the first parameter matrix, the first offset moment matrix initial value, The initial value of first hiding matrix, the first value of the second input feature vector matrix, the first value of the second hiding matrix, notable feature square First value of battle array, the second value of the second input feature vector matrix, the second value of the second hiding matrix and notable feature matrix second Value determines the first hiding matrix, the first parameter matrix and the first offset moment matrix, and enters next iteration according to preset condition Operation mode or exit the operation mode of iteration.
Terminal stores the first determining parameter matrix and the first offset moment matrix, and then in step 140, step It is used in 150.
First hiding matrix, the first parameter matrix and the first offset moment matrix are calculated by following formula 13,
Formula 13
Wherein, the θ is first parameter matrix, in the first offset moment matrix, the first hiding matrix Any one;It is describedThe skIt is cut described in k-th The estimated value of transformation amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described the Two input feature vector matrixes;The mkFor the preset k-th notable feature matrix;The WkIt is initial k-th described first Parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedIt is described first hidden for initial k-th Hide the transposition of matrix;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0 For the first value of the described second hiding matrix;The m0For the first value of the notable feature matrix;It is describedIt is defeated for described second Enter the second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the of notable feature matrix Two-value;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element is multiplied.
It is hereinbefore described be 1 time or the operation mode of successive ignition in any an iteration operation mode, iteration Operation mode can stop interative computation according to preset condition or exit interative computation.
In embodiments of the present invention, preset condition includes: the number that terminal has formerly preset interative computation, works as interative computation When having reached preset times, terminal is no longer iterated operation, the first hiding matrix, the first parameter matrix and the first offset square Battle array is the matrix for being finally iterated operation;Alternatively, the first parameter preset threshold value of terminal, after interative computation twice in succession When the variation range of first hiding matrix, the first parameter matrix and the first offset moment matrix is less than parameter threshold, then terminal is no longer It is iterated operation, the first hiding matrix, the first parameter matrix and the first offset moment matrix are the square for being finally iterated operation Battle array.
It optionally, in embodiments of the present invention, further include terminal to the first parameter matrix, the first offset moment matrix and first The step of initial value of hiding matrix is updated.By the step, may make terminal according to the first parameter matrix, first partially It moves moment matrix and obtains the accuracy of the first output matrix, improve the accuracy rate of detection.
Terminal updates the initial value of the first parameter matrix, the initial value of the first offset moment matrix by following formula 14 With the initial value of the first hiding matrix,
Formula 14
Wherein, θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;The η is preset learning rate.
It is understood that terminal is also settable to the first parameter matrix, the first offset moment matrix, the first hiding matrix The update condition that initial value is updated, for example, update times are arranged in terminal, when reaching update times, terminal is no longer carried out It updates, the initial value of the first hiding matrix, the first parameter matrix and the first offset moment matrix is the matrix of final updating;Alternatively, Terminal setting updates threshold value, when the updated first hiding matrix, the first parameter matrix and first deviate moment matrix twice in succession Initial value variation range be less than update threshold value when, then terminal is no longer updated, the first hiding matrix, the first parameter matrix Initial value with the first offset moment matrix is the matrix of final updating.
By the method for application changeable deep learning network structure provided in an embodiment of the present invention, terminal obtains expression thing One or more the first input feature vector matrixes of body characteristics, pass throughIt is defeated to obtain first Enter the first output matrix of eigenmatrix.It is complicated, computationally intensive independent to solve CNN network structure calculating process in the prior art Using the network structure can not be simple and quick get output eigenmatrix the problem of, realize simplified calculating process, reduce Calculation amount can rapidly obtain the output matrix of input picture.
Furthermore in embodiments of the present invention, terminal is formerly trained required parameter, updates, but also according to instruction The parameter practice, updated can quickly and accurately obtain the output matrix of input picture, improve the accuracy rate of detection.
Embodiment two
In order to facilitate understanding of embodiments of the present invention, it is further explained below in conjunction with attached drawing with specific embodiment Bright, embodiment does not constitute the restriction to the embodiment of the present invention.
The side for the changeable deep learning network structure that embodiment two that the present invention will be described in detail by taking Fig. 2 as an example below provides Method, Fig. 2 is the method flow diagram of changeable deep learning network structure provided by Embodiment 2 of the present invention, in the embodiment of the present invention Middle subject of implementation is the terminal that with processor and the processor can be handled the image for obtaining, collecting, the terminal tool Body is PC (Personal Computer, referred to as: PC), desktop computer etc..
The method of changeable deep learning network structure provided in an embodiment of the present invention is applied to field of image processing.Such as figure Shown in 2, the embodiment specifically includes the following steps:
Step 210 obtains one or more the first input feature vector matrix for indicating object features.
Specifically, in previous embodiment one step 110 have already been described in detail terminal obtain indicate one of object features or The process of multiple input feature vector matrixes, is no longer repeated herein.
Step 220, according to each first input feature vector matrix, determination is corresponding with the first input feature vector matrix The estimated value of the value of multiple notable feature matrixes and switching variable corresponding with each notable feature matrix.
Specifically, terminal is directed to each first input feature vector matrix, determines corresponding more with the first input feature vector matrix The value of a notable feature matrix, and according to the value for the multiple notable feature matrixes determined, determining and each notable feature matrix Value it is corresponding 1 switching variable estimated value.
Further, it is determined that the number of notable feature matrix be preset numerical value, for example, to preset each first defeated for terminal The number for entering the corresponding notable feature matrix of eigenmatrix is 10.It is understood that the number for the switching variable that terminal determines It also is 10.
In embodiments of the present invention, the value of the notable feature matrix by each element in the notable feature matrix probability Value composition, that is to say, terminal is by determining that the probability value of each element in notable feature matrix determines notable feature matrix Value, that is, determine notable feature matrix.
Further, terminal first passes through the estimated value that following formula 14 determine multiple switching variables.
Formula 14
Terminal calculates the probability value of multiple switching variables by formula 14, retains the maximum switching variable of probability value Other switching variables in addition to the maximum switching variable of probability value are set 0, and by the value of the switching variable of reservation and set 0 by value Estimated value of the value of switching variable afterwards as switching variable;
Alternatively, terminal calculates the probability value of multiple switching variables by formula 14, by the maximum switching variable of probability value Set 1, other switching variables in addition to the maximum switching variable of probability value set 0, and the value of the switching variable after 1 being set with set Estimated value of the value of switching variable after 0 as switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is first The transposition of the jth row of k-th of first parameter matrix to begin;It is describedFor institute in the jth column of the second initial parameter matrix The transposition for the matrix for thering is element to be formed;The bkjFor the initial k-th first offset moment matrix j-th of element it is initial Value;The k is positive integer, and j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The λkFor K-th of element of the 4th hiding matrix;The d is that third hides matrix.
Closer, terminal also passes through each element in the determining notable feature matrix of the formula three in previous embodiment one Probability value is no longer repeated herein.
Step 230, according to the value of the notable feature matrix, respectively by pair in each first input feature vector matrix It answers element to carry out multiplication operation with the corresponding element in corresponding multiple notable feature matrixes, obtains multiple first result squares Battle array.
Specifically, terminal has already been described in detail according to the value of notable feature matrix, respectively in step 130 in previous embodiment one Corresponding element in each first input feature vector matrix is subjected to phase with the corresponding element in corresponding multiple notable feature matrixes Multiplication obtains the process of multiple first matrixs of consequence, no longer repeats herein.
The first parameter matrix that each first matrix of consequence is obtained with preset or training is carried out phase by step 240 Multiplication obtains multiple second matrixs of consequence.
Specifically, step 140 has already been described in detail terminal for each first matrix of consequence and presets in previous embodiment one Or obtained the first parameter matrix of training carry out multiplication operation, obtain the process of multiple second matrixs of consequence, it is no longer multiple herein It states.
Step 250, the first offset moment matrix for obtaining each second matrix of consequence and preset or training carry out Sum operation obtains multiple third matrixs of consequence.
Specifically, step 150 has already been described in detail terminal for each second matrix of consequence and presets in previous embodiment one Or training obtain first offset moment matrix carry out sum operation, obtain the process of multiple third matrixs of consequence, herein no longer It repeats.
Step 260, according to activation primitive, activation processing is carried out to each third matrix of consequence, obtains multiple activation Matrix.
Specifically, terminal has already been described in detail according to activation primitive, to each third knot in step 160 in previous embodiment one Fruit matrix carries out activation processing, obtains the process of multiple activated matrixs, no longer repeats herein.
Step 270, by each activated matrix each element with corresponding one it is described switching variable estimation Value carries out multiplication operation, obtains multiple switching matrix.
Specifically, terminal has already been described in detail by each member in each activated matrix in step 170 in previous embodiment one The plain estimated value for switching variable with corresponding one carries out multiplication operation, obtains the process of multiple switching matrix, no longer multiple herein It states.
Corresponding element in multiple switching matrix is carried out cumulative summation operation by step 280, obtains the first output square Battle array.
Specifically, terminal has already been described in detail by the corresponding element in multiple switching matrix in step 180 in previous embodiment one Element carries out cumulative summation operation, obtains the process of the first output matrix, no longer repeats herein.
The second parameter matrix that the first output matrix matrix is obtained with preset or training is carried out phase by step 290 Multiplication obtains the second output matrix.
Specifically, the second output matrix is calculated by following formula 15,
Formula 15
Wherein, the U is the second parameter matrix.
It optionally, in embodiments of the present invention, further include terminal to the first parameter matrix involved in aforementioned formula, described The step of second parameter matrix, the first offset moment matrix are trained, can be fast by the training to parameters matrix Speed accurately obtains the second output matrix, and then obtains the output matrix of mark object features, improves the accuracy rate of detection.Tool Steps are as follows for body:
It is understood that terminal is also to the first hiding matrix and while being trained to above-mentioned parameter matrix Three hiding matrixes are also trained.
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix is identical;
Obtain first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide the initial value of matrix and the 4th hiding matrix;
It is hidden according to first parameter matrix, second parameter matrix, the first offset moment matrix, described first Matrix, the third hide the initial value of matrix and the 4th hiding matrix, determine institute by the operation mode of 1 time or successive ignition It is hidden to state the first hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third Hide matrix.
Specifically, had already been described in detail in previous embodiment one terminal obtain training sample the second input feature vector matrix, The process that clustering processing is carried out to training sample, is no longer repeated herein.
It is hidden that terminal obtains the first parameter matrix, the second parameter matrix, the first offset moment matrix, the first hiding matrix, third Hide the initial value of matrix and the 4th hiding matrix.It is understood that the initial value of the matrix is specially each element in matrix Initial value.
In one implementation, terminal obtains the first parameter matrix, the second parameter matrix, the first offset square at random Battle array, the first hiding matrix, third hide the initial value of matrix and the 4th hiding matrix;Alternatively,
In another implementation, terminal obtains the second parameter matrix at random, third hides matrix and the 4th hiding square The initial value of battle array obtains the first parameter matrix, the first offset moment matrix and the by limiting Boltzmann machine RBM training pattern The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM
Terminal is hidden according to the first parameter matrix, the second parameter matrix, the first offset moment matrix, the first hiding matrix, third The initial value for hiding matrix and the 4th hiding matrix, determines the first hiding matrix, first by the operation mode of 1 time or successive ignition Parameter matrix, the second parameter matrix, the first excursion matrix and third hide matrix.
Further, in embodiments of the present invention, the operation mode of any primary iteration specifically includes:
Terminal according to the initial value of the first parameter matrix, the initial value of the second parameter matrix, the first offset moment matrix just Initial value, the initial value of the first hiding matrix and third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine with The estimated values of the corresponding all switching variables of each second input feature vector matrix;
Terminal calculates the probability value of multiple switching variables by following formula 16, retains the maximum switching of probability value and becomes Other switching variables in addition to the maximum switching variable of probability value are set 0 by the value of amount, and by the value of the switching variable of reservation and Estimated value of the value of switching variable after setting 0 as switching variable;
Alternatively, the probability value of multiple switching variables is calculated, by the maximum switching variable of probability value by following formula formula 16 Set 1, other switching variables in addition to the maximum switching variable of probability value set 0, and the value of the switching variable after 1 being set with set Estimated value of the value of switching variable after 0 as switching variable.
Formula 16
Wherein, the x is the preset second input feature vector matrix;The y is preset second output matrix; It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter The transposition for the matrix that all elements are formed in the jth column of matrix;The bkjFor k-th initial of first offset moment matrix The initial value of j-th of element;The k is the positive integer no more than the K, and j is positive integer, describedFor k-th initial of institute State the transposition of the first hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d hides for the third Matrix.
Terminal is according to the switching estimated value of variable, the initial value of the first parameter matrix, the initial value of the second parameter matrix, the The initial value of one offset moment matrix, the initial value of the first hiding matrix, the initial value of the second hiding matrix, third hide matrix The initial value of initial value and the 4th hiding matrix determines the probability value of the second input feature vector matrix, the probability of notable feature matrix The probability value of value, the probability value of the second hiding matrix and the second output matrix;In embodiments of the present invention, the probability value of each matrix Specifically refer to the probability value of each element in each matrix.
The probability value of second input feature vector matrix is calculated by formula ten;The probability value of notable feature matrix passes through formula ten One calculates
The probability value of second hiding matrix is calculated by following formula 17,
p(hk=1 | x, y, s, m)=τ (sk(Wk(xοmk)+bk+UTY)) formula 17
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The Wk For k-th initial of first parameter matrix;The bkFor k-th initial of first offset moment matrix;The UTIt is first The transposition of second parameter matrix to begin;The k is the positive integer no more than the K;The τ () is the activation letter Number;The symbol ο representing matrix corresponding element is multiplied.
The probability value for exporting eigenmatrix is calculated by following formula 18,
Formula 18
Wherein, the skFor the estimated value of k-th of switching variable;The hkIt is hidden for preset k-th described second Matrix;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K Positive integer;The τ () is the activation primitive.
Terminal according to switching the estimated value of variable, the probability value of the second input feature vector matrix, notable feature matrix probability The probability value of value, the probability value of the second hiding matrix and the second output matrix determines the second input spy in a manner of generating at random Levy the first of the first value of matrix, the first value of notable feature matrix, the first value of the second hiding matrix and the second output matrix Value.In embodiments of the present invention, the first value of each matrix specifically refers to the first value of each element in each matrix.
Random generating mode has been described in detail in previous embodiment one, has no longer repeated herein.
Terminal is according to the switching estimated value of variable, the initial value of the first parameter matrix, the initial value of the second parameter matrix, the The one offset initial value of moment matrix, the initial value of the first hiding matrix, third hide the initial value of matrix, the 4th hiding matrix Initial value, the first value of the second input feature vector matrix, the first value of notable feature matrix, the first value of the second hiding matrix and First value of two output matrixes determines the second value, second hidden of the second input feature vector matrix to determine the same method of the first value Hide second value, the second value of the second value of notable feature matrix and the second output matrix of matrix.In embodiments of the present invention, respectively The second value of matrix specifically refers to the second value of each element in each matrix.
In embodiments of the present invention, terminal is again by aforementioned formula ten, formula 11, formula 17, formula 18, really The probability value of fixed each parameter matrix, second value, the second hiding square of the second input feature vector matrix are determined using probability random rule Battle array second value, the second value of the second value of notable feature matrix and the second output matrix, process as hereinbefore, herein not It repeats again.
Terminal is according to the switching estimated value of variable, the initial value of the first parameter matrix, the initial value of the second parameter matrix, the The one offset initial value of moment matrix, the initial value of the first hiding matrix, third hide the initial value of matrix, the 4th hiding matrix Initial value, the first value of the second input feature vector matrix, the first value of the second hiding matrix, the first value of notable feature matrix, First value of two output matrixes, the second value of the second input feature vector matrix, the second value of the second hiding matrix, notable feature matrix Second value and the second output matrix second value, determine the first hiding matrix, the first parameter matrix, the second parameter matrix, One offset moment matrix and third hide matrix, and enter the operation mode of next iteration according to preset condition or exit iteration Operation mode.
Terminal stores the first determining parameter matrix, the second parameter matrix and the first offset moment matrix, Jin Er Step 240, step 250 use in step 290.
It is logical that first hiding matrix, the first parameter matrix, the second parameter matrix, the first offset moment matrix and third hide matrix Following formula 19 are crossed to calculate,
Formula 19
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described First hiding matrix and the third hide any one in matrix;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedFor initial k-th described The transposition of one hiding matrix, the U are initial second parameter matrix;The yTFor preset second output matrix Transposition;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is defeated for described second Enter the first value of eigenmatrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix First value;The m0For the first value of the notable feature matrix;It is describedFor the second value of the second input feature vector matrix; It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is described The second value of notable feature matrix;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element phase Multiply.
It is hereinbefore described be 1 time or the operation mode of successive ignition in any an iteration operation mode, iteration Operation mode can stop interative computation according to preset condition or exit interative computation.
In embodiments of the present invention, preset condition includes: the number that terminal has formerly preset interative computation, works as interative computation When having reached preset times, terminal is no longer iterated operation, the first hiding matrix, the first parameter matrix, the second parameter matrix, It is the matrix for being finally iterated operation that first offset moment matrix and third, which hide matrix,;Alternatively, the first parameter preset of terminal Threshold value, the first hiding matrix after interative computation twice in succession, the first parameter matrix, the second parameter matrix, the first offset When the variation range that matrix and third hide matrix is less than parameter threshold, then terminal is no longer iterated operation, the first hiding square It is finally to be iterated operation that battle array, the first parameter matrix, the second parameter matrix, the first offset moment matrix and third, which hide matrix, Matrix.
It optionally, in embodiments of the present invention, further include initial value, second parameter matrix of the terminal to the first parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, third hide the initial value and the of matrix The step of initial value of four hiding matrixes is updated.By the step, it may make terminal according to the first parameter matrix, first Offset moment matrix, the second parameter matrix obtain the accuracy of the first output matrix, improve the accuracy rate of detection.
Terminal updates the initial value of the first parameter matrix, the initial value of the second parameter matrix, the by following formula 20 The initial value of one offset moment matrix, the initial value of the first hiding matrix and third hide the initial value of matrix,
Formula 20
Wherein, θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in the hiding matrix of matrix, the third;The η is preset learning rate.
Terminal updates the initial value of the 4th hiding matrix by following formula 21,
Formula 21
It is understood that terminal it is also settable to the first parameter matrix, the second parameter matrix, first offset moment matrix, The update condition that the initial value of the hiding matrix of first hiding matrix, third and the 4th hiding matrix is updated, for example, terminal is set Update times are set, when reaching update times, terminal is no longer updated, and the first parameter matrix, the second parameter matrix, first are partially Moving moment matrix, the first hiding matrix, third to hide the initial value of matrix and the 4th hiding matrix is the matrix of final updating;Or Person, terminal setting updates threshold value, when updated first parameter matrix, the second parameter matrix, the first offset square twice in succession When the variation range that battle array, the first hiding matrix, third hide the initial value of matrix and the 4th hiding matrix is less than update threshold value, then Terminal is no longer updated, and the first parameter matrix, the second parameter matrix, the first offset moment matrix, the first hiding matrix, third are hidden The initial value for hiding matrix and the 4th hiding matrix is the matrix of final updating.
By the method for application changeable deep learning network structure provided in an embodiment of the present invention, terminal obtains expression thing One or more the first input feature vector matrixes of body characteristics, pass throughIt is defeated to obtain first Enter the first output matrix of eigenmatrix.It is complicated, computationally intensive independent to solve CNN network structure calculating process in the prior art Using the network structure can not be simple and quick get output eigenmatrix the problem of, realize simplified calculating process, reduce Calculation amount can rapidly obtain the output matrix of input picture.
Furthermore in embodiments of the present invention, terminal is formerly trained required parameter, updates, but also according to instruction The parameter practice, updated can quickly and accurately obtain the output matrix of input picture, improve the accuracy rate of detection.
Embodiment three
Correspondingly, the embodiment of the present invention three additionally provides a kind of terminal, to realize cutting for the offer of previous embodiment one The method for changing deep learning network structure, as shown in figure 3, the terminal include: acquiring unit 310, the first determination unit 320 with And arithmetic element 330.
The acquiring unit 310 that the terminal includes indicates that the input of one or more first of object features is special for obtaining Levy matrix;
First determination unit 320, for according to each first input feature vector matrix, determining and described first input to be special It levies the value of the corresponding multiple notable feature matrixes of matrix and switches variable with each corresponding one of notable feature matrix Estimated value;
Arithmetic element 330, for the value according to the notable feature matrix, respectively by each first input feature vector square Corresponding element in battle array and the corresponding element progress multiplication operation in corresponding multiple notable feature matrixes, obtain multiple the One matrix of consequence;
The arithmetic element 330 is also used to, first that each first matrix of consequence and preset or training are obtained Parameter matrix carries out multiplication operation, obtains multiple second matrixs of consequence;
The arithmetic element 330 is also used to, first that each second matrix of consequence and preset or training are obtained It deviates moment matrix and carries out sum operation, obtain multiple third matrixs of consequence;
The arithmetic element 330 is also used to, and according to activation primitive, is carried out at activation to each third matrix of consequence Reason, obtains multiple activated matrixs;
The arithmetic element 330 is also used to, by each activated matrix each element with described in corresponding one The estimated value for switching variable carries out multiplication operation, obtains multiple switching matrix;
The arithmetic element 330 is also used to, and the corresponding element in multiple switching matrix is carried out cumulative summation operation, Obtain the first output matrix.
What first determination unit 320 determined switches estimating for variable with each corresponding one of notable feature matrix Evaluation specifically,
Pass throughThe probability values for calculating multiple switching variables, described in reservation Probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 is as the switching variable Estimated value;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth of k-th initial of first parameter matrixs Capable transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, described For the transposition of k-th initial of first hiding matrixes.
What first determination unit 320 determined switches estimating for variable with each corresponding one of notable feature matrix Evaluation specifically includes:
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates more The probability value of a switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and the value of the switching variable after setting 1 and the institute after setting 0 State estimated value of the value of switching variable as the switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is first The transposition of the jth row of k-th of first parameter matrix to begin;It is describedFor institute in the jth column of the second initial parameter matrix The transposition for the matrix for thering is element to be formed;The bkjFor the initial k-th first offset moment matrix j-th of element it is initial Value;The k is positive integer, and j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The λkFor K-th of element of the 4th hiding matrix;The d is that third hides matrix.
The value for the notable feature matrix that first determination unit 320 determines is by each member in the notable feature matrix The probability value composition of element;
In the notable feature matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;Institute State hkFor preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckFor K-th initial of first hiding matrixes;The k is positive integer;The τ () is the activation primitive.
The activation primitive that the arithmetic element 330 uses specifically includes: the absolute value of hyperbolic tangent function, hyperbolic are just Function is cut, double SIN function cut, double cuts cosine function, any function in sigmoid function.
The terminal further include: the second determination unit 340, for determining first parameter matrix, first offset Matrix and the first hiding matrix.
Second determination unit 340 is specifically used for, and obtains the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, lead to It crosses 1 time or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first offset Matrix.
The operation mode for any primary iteration that second determination unit 340 uses specifically includes:
It is hidden according to the initial value and described first of the initial value of first parameter matrix, the first offset moment matrix The initial value of matrix, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value and the first hiding matrix initial value, determine the probability value, described significant of the second input feature vector matrix The probability value of the probability value of eigenmatrix and the second hiding matrix;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square The probability value of battle array and the probability value of the second hiding matrix, determine the second input feature vector matrix in a manner of generating at random The first value, the first value of the first value of the notable feature matrix and the second hiding matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the notable feature square First value of battle array and the first value of the second hiding matrix determine second input to determine the same method of the first value The second value of the second value of eigenmatrix, the second value of the second hiding matrix and the notable feature matrix;
According to the estimated value of the switching variable, the initial value of first parameter matrix, the first offset moment matrix Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the second hiding square Battle array the first value, the first value of the notable feature matrix, the second value of the second input feature vector matrix, it is described second hide The second value of the second value of matrix and the notable feature matrix determines the described first hiding matrix, first parameter matrix Moment matrix is deviated with described first, and the operation mode of the iteration next time is entered according to preset condition or exits described change The operation mode in generation.
Second determination unit 340 is specifically used for, and obtains first parameter matrix, the first offset square at random The initial value of battle array and the first hiding matrix;Alternatively,
By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix are obtained With the initial value of the first hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
The switching variable corresponding with each notable feature matrix that second determination unit 340 determines Estimated value specifically,
Pass throughThe probability value for calculating multiple switching variables, retains institute State probability value it is maximum it is described switching variable value, by except the probability value it is maximum it is described switching variable in addition to other described in Switching variable sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 becomes as the switching The estimated value of amount;
Alternatively, passing throughThe probability value for calculating multiple switching variables, will The maximum switching variable of probability value sets 1, by other institutes in addition to the maximum switching variable of the probability value It states switching variable and sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 are cut as described in The estimated value of transformation amount
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first ginseng The transposition of the jth row of matrix number;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix; Described k, j are positive integer, describedFor the transposition of k-th initial of first hiding matrix.
The probability value of the second input feature vector matrix that second determination unit 340 determines specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
In the notable feature matrix that second determination unit 340 determines each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The probability value of the described second hiding matrix that second determination unit 340 determines specifically,
Pass through p (hk=1 | x, s, m)=τ (sk(Wk(xοmk)+bk)) calculate;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix; The bkFor k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The symbol ο representing matrix corresponding element is multiplied.
First parameter matrix that second determination unit 340 determines, the first offset moment matrix and described the One hiding matrix is specially
Pass throughIt calculates;
Wherein, the θ is first parameter matrix, in the first offset moment matrix, the first hiding matrix Any one;It is describedThe skIt is cut described in k-th The estimated value of transformation amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described the Two input feature vector matrixes;The mkFor the preset k-th notable feature matrix;The WkIt is initial k-th described first Parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedIt is described first hidden for initial k-th Hide the transposition of matrix;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0 For the first value of the described second hiding matrix;The m0For the first value of the notable feature matrix;It is describedIt is defeated for described second Enter the second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the of notable feature matrix Two-value;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element is multiplied.
The terminal further include: the first updating unit 350, for passing throughUpdate the first parameter square The initial value of the initial value of battle array, the initial value of the first offset moment matrix and the first hiding matrix;
Wherein, θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;The η is preset learning rate.
Further, as shown in figure 4, the terminal can also be realized by terminal structure schematic diagram as shown in Figure 4.
The arithmetic element 330 is also used to, second that the first output matrix matrix and preset or training are obtained Parameter matrix carries out multiplication operation, obtains the second output matrix.
Third determination unit 410, for determining first parameter matrix, second parameter matrix, described first partially It moves moment matrix, the first hiding matrix and third and hides matrix.
The third determination unit 410 is specifically used for, and obtains the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K with it is described The number of notable feature matrix is identical;
Obtain first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide the initial value of matrix and the 4th hiding matrix;
It is hidden according to first parameter matrix, second parameter matrix, the first offset moment matrix, described first Matrix, the third hide the initial value of matrix and the 4th hiding matrix, determine institute by the operation mode of 1 time or successive ignition It is hidden to state the first hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third Hide matrix.
The operation mode for any primary iteration that the third determination unit 410 uses specifically includes:
According to the initial value of first parameter matrix, the initial value of second parameter matrix, first offset The initial value of matrix, the initial value of the first hiding matrix and the third are hidden the initial value of matrix and the described 4th and are hidden The initial value of matrix, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the second hiding matrix Initial value, the third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine that second input is special Levy the probability value of matrix, the probability value of the notable feature matrix, the probability value of the second hiding matrix and described second defeated The probability value of matrix out;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature square Probability value, the probability value of the second hiding matrix and the probability value of second output matrix of battle array, with the side generated at random Formula determine the first value of the second input feature vector matrix, the first value of the notable feature matrix, the second hiding matrix First value of one value and second output matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix The first value, the first value of the second hiding matrix and the first value of second output matrix, with determine the first value it is same Method determine the second value of the second input feature vector matrix, second value, the notable feature of the second hiding matrix The second value of the second value of matrix and second output matrix;
According to the switching estimated value of variable, the initial value of first parameter matrix, second parameter matrix Initial value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide matrix Initial value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the second hiding matrix The first value, the first value of the notable feature matrix, the first value of second output matrix, the second input feature vector square Second value, the second value of the second hiding matrix, the second value of the notable feature matrix and the second output square of battle array The second value of battle array determines the described first hiding matrix, first parameter matrix, second parameter matrix, described first partially It moves moment matrix and the third hides matrix, and the operation mode of the iteration next time is entered according to preset condition or is exited The operation mode of the iteration.
The third determination unit 410 is specifically used for, and obtains first parameter matrix, the second parameter square at random Battle array, the first offset moment matrix, the first hiding matrix, the third hide matrix and the 4th hiding matrix just Initial value;Alternatively,
The initial value of second parameter matrix, the third hiding matrix and the 4th hiding matrix is obtained at random, By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix and described the are obtained The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is RBM The offset moment matrix of hidden layer, first parameter matrix are the weight matrix of RBM.
All switchings corresponding with each second input feature vector matrix that the third determination unit 410 determines The estimated value of variable specifically,
Pass throughCalculate multiple institutes The probability value for stating switching variable retains the value of the maximum switching variable of the probability value, will be maximum except the probability value Other described switching variables except the switching variable set 0, and by the value of the switching variable of reservation and after setting 0 described in Switch estimated value of the value of variable as the switching variable;
Alternatively, passing throughIt calculates The probability value of multiple switching variables, sets 1 for the maximum switching variable of the probability value, will be maximum except the probability value The switching variable except other described switching variables set 0, and the value of the switching variable after 1 being set and after setting 0 Estimated value of the value of the switching variable as the switching variable;
Wherein, the x is the preset second input feature vector matrix;The y is preset second output matrix; It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter The transposition for the matrix that all elements are formed in the jth column of matrix;The bkjFor k-th initial of first offset moment matrix The initial value of j-th of element;The k is the positive integer no more than the K, and j is positive integer, describedDescribed in initial k-th The transposition of first hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides square Battle array.
The probability value of the second input feature vector matrix that the third determination unit 410 determines specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor preset k-th notable feature Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The probability value of the notable feature matrix that the third determination unit 410 determines specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is the activation primitive.
The probability value of the described second hiding matrix that the third determination unit 410 determines specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is preset second input feature vector Matrix;The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The Wk For k-th initial of first parameter matrix;The bkFor k-th initial of first offset moment matrix;The UTIt is first The transposition of second parameter matrix to begin;The k is the positive integer no more than the K;The τ () is the activation letter Number;The symbol ο representing matrix corresponding element is multiplied.
The probability value of the output eigenmatrix that the third determination unit 410 determines specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The hkIt is hidden for preset k-th described second Matrix;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K Positive integer;The τ () is the activation primitive.
The described first determining hiding matrix of the third unit 410, first parameter matrix, the second parameter square Battle array, it is described first offset moment matrix and the third hide matrix specifically,
Pass throughIt calculates;
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described First hiding matrix and the third hide any one in matrix;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;The bkFor k-th initial of first offset moment matrix;It is describedDescribed in initial k-th The transposition of first hiding matrix, the U are initial second parameter matrix;The yTFor the preset second output square The transposition of battle array;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is described second First value of input feature vector matrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix The first value;The m0For the first value of the notable feature matrix;It is describedIt is the second of the second input feature vector matrix Value;It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is described For the second value of the notable feature matrix;The k is the positive integer no more than the K;The symbol ο representing matrix corresponding element Element is multiplied.
The terminal further include: the second updating unit 420, for passing throughUpdate the first parameter square Battle array initial value, second parameter matrix initial value, it is described first offset moment matrix initial value, the first hiding square The initial value of battle array and the third hide the initial value of matrix;
Wherein, θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in the hiding matrix of matrix, the third;The η is preset learning rate;
Second updating unit is also used to, and is passed throughUpdate the initial value of the 4th hiding matrix;
Wherein, the skThe estimated value of k-th of switching variable;The λkIt is k-th yuan of the 4th hiding matrix Element;The k is the positive integer no more than the K;The n is positive integer.
Therefore, by applying terminal provided in an embodiment of the present invention, terminal obtain indicate object features one or more the One input feature vector matrix, passes throughObtain the first input feature vector matrix first is defeated Matrix out.Solve CNN network structure calculating process in the prior art is complicated, computationally intensive exclusive use network structure can not Simple and quick gets the problem of exporting eigenmatrix, realizes simplified calculating process, reduces calculation amount, can rapidly obtain The output matrix of input picture.
Furthermore in embodiments of the present invention, terminal is formerly trained required parameter, updates, but also according to instruction The parameter practice, updated can quickly and accurately obtain the output matrix of input picture, improve the accuracy rate of detection.
Professional should further appreciate that, described in conjunction with the examples disclosed in the embodiments of the present disclosure Unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description. These functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution. Professional technician can use different methods to achieve the described function each specific application, but this realization It should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can be executed with hardware, processor The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium well known to interior.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include Within protection scope of the present invention.

Claims (54)

1. a kind of method of the changeable deep learning network structure for image procossing, which is characterized in that the described method includes:
Input picture is obtained, the input picture is divided into multiple windows;
Filter process is applied for 2 dimensional feature matrixes of each window, obtains filtering matrix;
Obtain indicate object features one or more the first input feature vector matrix, wherein the first input feature vector matrix be by Pixel maximum composition in the filtering matrix;
According to each first input feature vector matrix, multiple notable features corresponding with the first input feature vector matrix are determined The estimated value of the value of matrix and switching variable corresponding with each notable feature matrix;
According to the value of the notable feature matrix, respectively by each first input feature vector matrix corresponding element with it is corresponding Multiple notable feature matrixes in corresponding element carry out multiplication operation, obtain multiple first matrixs of consequence;
The first parameter matrix that each first matrix of consequence and preset or training obtain is subjected to multiplication operation, is obtained more A second matrix of consequence;
The first offset moment matrix that each second matrix of consequence and preset or training are obtained carries out sum operation, obtains Multiple third matrixs of consequence;
According to activation primitive, activation processing is carried out to each third matrix of consequence, obtains multiple activated matrixs;
Each element in each activated matrix is subjected to multiplication fortune with the estimated value of the corresponding one switching variable It calculates, obtains multiple switching matrix;
Corresponding element in multiple switching matrix is subjected to cumulative summation operation, obtains the first output matrix, described first Output matrix is used to obtain the output matrix for the object features for identifying the input picture.
2. the method according to claim 1, wherein the determination is corresponding with each notable feature matrix The estimated value of one switching variable specifically includes:
Pass throughThe probability value for calculating multiple switching variables, retains the probability It is worth the value of the maximum switching variable, other described switchings in addition to the maximum switching variable of the probability value is become Amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 estimating as the switching variable Evaluation;
Alternatively, passing through) multiple probability values for switching variables are calculated, it will be described The maximum switching variable of probability value sets 1, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 become as the switching The estimated value of amount;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth row of initial k-th of first parameter matrixs Transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, describedIt is first The transposition of k-th of the first hiding matrixes to begin;The skFor the estimated value of k-th of switching variable.
3. the method according to claim 1, wherein the determination is corresponding with each notable feature matrix The estimated value of one switching variable specifically includes:
Pass throughCalculate multiple described cut The probability value of transformation amount retains the value of the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the switching by the value of the switching variable of reservation and after setting 0 Estimated value of the value of variable as the switching variable;
Alternatively, passing throughCalculate multiple institutes The probability value for stating switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the value of the switching variable after 1 being set with set 0 after described in cut Estimated value of the value of transformation amount as the switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is initial The transposition of the jth row of k-th of first parameter matrix;It is describedFor all members in the jth column of the second initial parameter matrix The transposition for the matrix that element is formed;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix; The k is positive integer, and j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The λkIt is the 4th Hide k-th of element of matrix;The d is that third hides matrix;The skFor the estimated value of k-th of switching variable;Institute Stating Z is positive integer.
4. the method according to claim 1, wherein the value of the notable feature matrix is by the notable feature square The probability value composition of each element in battle array;
In the notable feature matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;The hk For preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckIt is initial K-th of first hiding matrixes;The k is positive integer;The τ () is the activation primitive;The mkIt is preset k-th The notable feature matrix;The h is the described second hiding matrix;The s is the estimated value of the switching variable.
5. the method according to claim 1, wherein the activation primitive specifically includes: hyperbolic tangent function Absolute value, double cut SIN function, double cuts cosine function, any function in sigmoid function hyperbolic tangent function.
6. the method according to claim 1, wherein the method also includes: determine first parameter matrix, First excursion matrix and the first hiding matrix.
7. according to the method described in claim 6, it is characterized in that, the determination first parameter matrix, it is described first partially It moves matrix and the first hiding matrix specifically includes:
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K and it is described significantly The number of eigenmatrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, pass through 1 time Or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first excursion matrix.
8. the method according to the description of claim 7 is characterized in that the operation mode of any primary iteration specifically includes:
According to the initial value of first parameter matrix, the initial value and the first hiding matrix of the first offset moment matrix Initial value, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first The initial value of initial value and the first hiding matrix determines the probability value of the second input feature vector matrix, the notable feature The probability value of the probability value of matrix and the second hiding matrix;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature matrix The probability value of probability value and the second hiding matrix determines the of the second input feature vector matrix in a manner of generating at random First value of one value, the first value of the notable feature matrix and the second hiding matrix;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix First value of the first value and the second hiding matrix determines second input feature vector to determine the same method of the first value The second value of the second value of matrix, the second value of the second hiding matrix and the notable feature matrix;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the second hiding matrix First value, the first value of the notable feature matrix, the second value of the second input feature vector matrix, the second hiding matrix Second value and the notable feature matrix second value, determine the described first hiding matrix, first parameter matrix and institute The first offset moment matrix is stated, and the operation mode of the iteration next time is entered according to preset condition or exits the iteration Operation mode.
9. the method according to the description of claim 7 is characterized in that described obtain first parameter matrix, described first partially The initial value for moving moment matrix and the first hiding matrix specifically includes:
The initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix is obtained at random;Alternatively,
By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix and the are obtained The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is hidden for RBM The offset moment matrix of layer, first parameter matrix are the weight matrix of RBM.
10. according to the method described in claim 8, it is characterized in that, the determination and each training sample it is second defeated The estimated value for entering the corresponding all switching variables of eigenmatrix specifically includes:
Pass throughThe probability value for calculating multiple switching variables, retains the probability It is worth the value of the maximum switching variable, other described switchings in addition to the maximum switching variable of the probability value is become Amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 estimating as the switching variable Evaluation;
Alternatively, passing through) multiple probability values for switching variables are calculated, it will be described The maximum switching variable of probability value sets 1, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 become as the switching The estimated value of amount;
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first parameter square The transposition of the jth row of battle array;The bkjFor the initial value of j-th of element of k-th initial of first offset moment matrix;It is described K, j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The skBecome for k-th of switching The estimated value of amount.
11. according to the method according to any one of claims 8, which is characterized in that determination the second input feature vector matrix Probability value specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor the preset k-th notable feature square Battle array;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () For the activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable;The m is institute State notable feature matrix.
12. according to the method described in claim 8, it is characterized in that, the probability value of the determination notable feature matrix has Body is to pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The hkFor the preset k-th second hiding matrix;It is describedFor turning for k-th initial of first parameter matrix It sets;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The mkFor the preset k-th notable feature matrix;The h is the described second hiding matrix;It is described S is the estimated value of the switching variable.
13. according to the method described in claim 8, it is characterized in that, the probability value of the hiding matrix of the determination described second has Body is to pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix;It is describedbk For k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is described sharp Function living;The symbol o representing matrix corresponding element is multiplied;The hkFor the preset k-th second hiding matrix;It is described S is the estimated value of the switching variable;The m is the notable feature matrix.
14. according to the method described in claim 8, it is characterized in that, the determination first parameter matrix, it is described first partially Move moment matrix and the first hiding matrix specifically by
It calculates;
Wherein, the θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;It is describedThe skK-th of switching becomes The estimated value of amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described second defeated Enter eigenmatrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter Matrix;It is describedbkFor k-th initial of first offset moment matrix;It is describedFor k-th initial of first hiding square The transposition of battle array;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0For institute State the first value of the second hiding matrix;The m0For the first value of the notable feature matrix;It is describedFor second input The second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the second of notable feature matrix Value;The k is the positive integer no more than the K;The symbol o representing matrix corresponding element is multiplied;The h is described second hidden Hide matrix;The s is the estimated value of the switching variable;The m is the notable feature matrix.
15. according to the method for claim 14, which is characterized in that the method also includes:
Pass throughUpdate first parameter matrix initial value, it is described first offset moment matrix initial value and The initial value of the first hiding matrix;
Wherein, θ is first parameter matrix, the first offset moment matrix, any one in the first hiding matrix; The η is preset learning rate.
16. the method according to claim 1, wherein it is described obtain first output matrix after further include:
The first output matrix matrix and preset or obtained the second parameter matrix of training are subjected to multiplication operation, obtain the Two output matrixes.
17. the method according to claim 11, the method also includes:
Determine first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix and the Three hiding matrixes.
18. according to the method for claim 17, which is characterized in that the determination first parameter matrix, described second Parameter matrix, the first offset moment matrix, the first hiding matrix and the third are hidden matrix and are specifically included:
Obtain the second input feature vector matrix of training sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K and it is described significantly The number of eigenmatrix is identical;
Obtain first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding square Battle array, the third hide the initial value of matrix and the 4th hiding matrix;
According to first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding square Battle array, the third hide the initial value of matrix and the 4th hiding matrix, determined by the operation mode of 1 time or successive ignition described in First hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third are hidden Matrix.
19. according to the method for claim 18, which is characterized in that the operation mode of any primary iteration is specifically wrapped It includes:
According to the initial value of first parameter matrix, the initial value of second parameter matrix, the first offset moment matrix Initial value, the first hiding matrix initial value and the third hide matrix initial value and the 4th hiding matrix Initial value, determining all estimated values for switching variables corresponding with each second input feature vector matrix;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, it is described first offset the initial value of moment matrix, the initial value of the first hiding matrix, the second hiding matrix it is initial Value, the third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine the second input feature vector square The probability value of battle array, the probability value of the notable feature matrix, the probability value of the second hiding matrix and second output matrix Probability value;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature matrix The probability value of probability value, the probability value of the second hiding matrix and second output matrix, it is true in a manner of generating at random First value of the fixed second input feature vector matrix, the first value of the notable feature matrix, the second hiding matrix the First value of one value and second output matrix;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide the initial of matrix The of value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix First value of one value, the first value of the second hiding matrix and second output matrix, to determine the first value similarly side Method determines the second value of the second input feature vector matrix, the second value of the second hiding matrix, the notable feature matrix Second value and second output matrix second value;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide the initial of matrix The of value, the first value of the initial value of the 4th hiding matrix, the second input feature vector matrix, the second hiding matrix One value, the first value of the notable feature matrix, the first value of second output matrix, the second input feature vector matrix Second value, the second value of the second hiding matrix, the second value of the notable feature matrix and second output matrix Second value determines the described first hiding matrix, first parameter matrix, second parameter matrix, first offset Matrix and the third hide matrix, and enter the operation mode of the iteration next time according to preset condition or exit described The operation mode of iteration.
20. according to the method for claim 18, which is characterized in that described to obtain first parameter matrix, described second Parameter matrix, the first offset moment matrix, the first hiding matrix, the third hide matrix and the 4th hiding matrix Initial value specifically includes:
Obtain at random first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide the initial value of matrix and the 4th hiding matrix;Alternatively,
The initial value for obtaining second parameter matrix, the third hiding matrix and the 4th hiding matrix at random, passes through Boltzmann machine RBM training pattern is limited, first parameter matrix, the first offset moment matrix and described first hidden are obtained Hide the initial value of matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is hidden for RBM The offset moment matrix of layer, first parameter matrix are the weight matrix of RBM.
21. according to the method for claim 19, which is characterized in that the determination and each second input feature vector matrix The estimated value of corresponding all switching variables specifically includes:
Pass throughCalculate multiple described cut The probability value of transformation amount retains the value of the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the switching by the value of the switching variable of reservation and after setting 0 Estimated value of the value of variable as the switching variable;
Alternatively, passing throughCalculate multiple institutes The probability value for stating switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the value of the switching variable after 1 being set with set 0 after described in cut Estimated value of the value of transformation amount as the switching variable;
Wherein, the x is the preset second input feature vector matrix;The y is preset second output matrix;It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter matrix Jth column in all elements formed matrix transposition;It is describedbkjFor the jth of k-th initial of first offset moment matrix The initial value of a element;The k is the positive integer no more than the K, and j is positive integer, describedFor initial k-th described The transposition of one hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides matrix; The skFor the estimated value of k-th of switching variable;The Z is positive integer.
22. according to method described in the claim 19, which is characterized in that determination the second input feature vector matrix Probability value specifically byIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor the preset k-th notable feature square Battle array;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () For the activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable;The m is institute State notable feature matrix.
23. according to the method for claim 19, which is characterized in that the probability value of the determination notable feature matrix has Body is to pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The hkFor the preset k-th second hiding matrix;It is describedFor turning for k-th initial of first parameter matrix It sets;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable.
24. according to the method for claim 19, which is characterized in that the probability value of the hiding matrix of the determination described second has Body is to pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The WkIt is initial K-th of first parameter matrix;It is describedbkFor k-th initial of first offset moment matrix;The UTFor initial institute State the transposition of the second parameter matrix;The k is the positive integer no more than the K;The τ () is the activation primitive;It is described Symbol o representing matrix corresponding element is multiplied;The hkFor the preset k-th second hiding matrix;The s is the switching The estimated value of variable;The m is the notable feature matrix.
25. according to the method for claim 19, which is characterized in that the probability value tool of the determination output eigenmatrix Body is to pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The hkFor the preset k-th second hiding square Battle array;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K's Positive integer;The τ () is the activation primitive;The y is second output matrix;The h is the described second hiding square Battle array;The s is the estimated value of the switching variable.
26. according to the method for claim 19, which is characterized in that the hiding matrix of the determination described first, described first Parameter matrix, second parameter matrix, it is described first offset moment matrix and the third hide matrix specifically byIt calculates;
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in matrix and the hiding matrix of the third;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;It is describedbkFor k-th initial of first offset moment matrix;It is describedFor initial k-th described The transposition of one hiding matrix, the U are initial second parameter matrix;The yTFor preset second output matrix Transposition;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is defeated for described second Enter the first value of eigenmatrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix First value;The m0For the first value of the notable feature matrix;It is describedFor the second value of the second input feature vector matrix; It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is describedFor institute State the second value of notable feature matrix;The k is the positive integer no more than the K;The symbol o representing matrix corresponding element phase Multiply;The y is second output matrix;The h is the described second hiding matrix;The s is the estimation of the switching variable Value;The m is the notable feature matrix.
27. according to the method for claim 26, which is characterized in that the method also includes:
Pass throughUpdate the initial value of the first parameter matrix, initial value of second parameter matrix, described The initial value of first offset moment matrix, the initial value of the first hiding matrix and the third hide the initial value of matrix;
Wherein, θ be first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide any one in matrix;The η is preset learning rate;
Pass throughUpdate the initial value of the 4th hiding matrix;
Wherein, the skThe estimated value of k-th of switching variable;The λkFor k-th of element of the 4th hiding matrix; The k is the positive integer no more than the K;The n is positive integer;The N is positive integer.
28. a kind of terminal of the changeable deep learning network structure for image procossing, which is characterized in that the terminal packet It includes:
The input picture is divided into multiple windows for obtaining input picture by division unit;
Filter unit applies filter process for the 2 dimensional feature matrixes for each window, obtains filtering matrix;
Acquiring unit, for obtaining one or more the first input feature vector matrix for indicating object features, wherein described first is defeated Enter eigenmatrix to be made of the pixel maximum in the filtering matrix;
First determination unit, for according to each first input feature vector matrix, determining and the first input feature vector matrix The estimated value of the value of corresponding multiple notable feature matrixes and switching variable corresponding with each notable feature matrix;
Arithmetic element respectively will be in each first input feature vector matrix for the value according to the notable feature matrix Corresponding element carries out multiplication operation with the corresponding element in corresponding multiple notable feature matrixes, obtains multiple first results Matrix;
The arithmetic element is also used to, the first parameter matrix that each first matrix of consequence and preset or training are obtained Multiplication operation is carried out, multiple second matrixs of consequence are obtained;
The arithmetic element is also used to, the first offset square that each second matrix of consequence and preset or training are obtained Battle array carries out sum operation, obtains multiple third matrixs of consequence;
The arithmetic element is also used to, and according to activation primitive, is carried out activation processing to each third matrix of consequence, is obtained more A activated matrix;
The arithmetic element is also used to, by each element and the corresponding one switching variable in each activated matrix Estimated value carry out multiplication operation, obtain multiple switching matrix;
The arithmetic element is also used to, and the corresponding element in multiple switching matrix is carried out cumulative summation operation, obtains the One output matrix, first output matrix are used to obtain the output matrix for the object features for identifying the input picture.
29. terminal according to claim 28, which is characterized in that first determination unit determine with it is each described aobvious Write eigenmatrix it is corresponding one switching variable estimated value specifically,
Pass throughThe probability value for calculating multiple switching variables, retains the probability It is worth the value of the maximum switching variable, other described switchings in addition to the maximum switching variable of the probability value is become Amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 estimating as the switching variable Evaluation;
Alternatively, passing through) multiple probability values for switching variables are calculated, it will be described The maximum switching variable of probability value sets 1, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 become as the switching The estimated value of amount;
Wherein, the x is the first input feature vector matrix;It is describedFor the jth row of initial k-th of first parameter matrixs Transposition;The bkjFor j-th of element of k-th first initial offset moment matrixs;Described k, j are positive integer, describedIt is first The transposition of k-th of the first hiding matrixes to begin;The skFor the estimated value of k-th of switching variable.
30. terminal according to claim 28, which is characterized in that first determination unit determine with it is each described aobvious The estimated value for writing the corresponding switching variable of eigenmatrix specifically includes:
Pass throughCalculate multiple described cut The probability value of transformation amount retains the value of the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the switching by the value of the switching variable of reservation and after setting 0 Estimated value of the value of variable as the switching variable;
Alternatively, passing throughCalculate multiple institutes The probability value for stating switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the value of the switching variable after 1 being set with set 0 after described in cut Estimated value of the value of transformation amount as the switching variable;
Wherein, the x is the first input feature vector matrix;The y is preset second output matrix;It is describedIt is initial The transposition of the jth row of k-th of first parameter matrix;It is describedFor institute in the jth column of initial second parameter matrix The transposition for the matrix for thering is element to be formed;The bkjFor the initial k-th first offset moment matrix j-th of element it is initial Value;The k is the positive integer no more than the K, and j is positive integer, describedFor k-th initial of first hiding matrix Transposition;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides matrix;The skIt is k-th The estimated value of the switching variable;The Z is positive integer.
31. terminal according to claim 28, which is characterized in that the notable feature that first determination unit determines The value of matrix is made of the probability value of each element in the notable feature matrix;
In the notable feature matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the first input feature vector matrix;The hk For preset k-th of second hiding matrixes;It is describedFor the transposition of k-th initial of first parameter matrixs;The ckIt is initial K-th of first hiding matrixes;The k is positive integer;The τ () is the activation primitive;The mkIt is preset k-th The notable feature matrix;The h is the described second hiding matrix;The s is the estimated value of the switching variable.
32. terminal according to claim 28, which is characterized in that the activation primitive that the arithmetic element uses is specific Include: the absolute value of hyperbolic tangent function, hyperbolic tangent function, double cut SIN function, double cuts cosine function, sigmoid function In any function.
33. terminal according to claim 28, which is characterized in that the terminal further include: the second determination unit, for true Fixed first parameter matrix, first excursion matrix and the first hiding matrix.
34. terminal according to claim 33, which is characterized in that second determination unit is specifically used for, and obtains training Second input feature vector matrix of sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K and it is described significantly The number of eigenmatrix, the number of the switching variable are identical;
Obtain the initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;
According to first parameter matrix, the initial value of the first offset moment matrix and the first hiding matrix, pass through 1 time Or the operation mode of successive ignition determines the described first hiding matrix, first parameter matrix and first excursion matrix.
35. terminal according to claim 34, which is characterized in that second determination unit uses any primary described The operation mode of iteration specifically includes:
The first of moment matrix is deviated according to the second input feature vector matrix, the initial value of first parameter matrix, described first The initial value of initial value and the first hiding matrix, it is determining it is corresponding with each second input feature vector matrix it is all described in cut The estimated value of transformation amount;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first The initial value of initial value and the first hiding matrix determines the probability value of the second input feature vector matrix, the notable feature The probability value of the probability value of matrix and the second hiding matrix;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature matrix The probability value of probability value and the second hiding matrix determines the of the second input feature vector matrix in a manner of generating at random First value of one value, the first value of the notable feature matrix and the second hiding matrix;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix First value of the first value and the second hiding matrix determines second input feature vector to determine the same method of the first value The second value of the second value of matrix, the second value of the second hiding matrix and the notable feature matrix;
The first of moment matrix is deviated according to the estimated value of the switching variable, the initial value of first parameter matrix, described first Initial value, the initial value of the first hiding matrix, the first value of the second input feature vector matrix, the second hiding matrix First value, the first value of the notable feature matrix, the second value of the second input feature vector matrix, the second hiding matrix Second value and the notable feature matrix second value, determine the described first hiding matrix, first parameter matrix and institute The first offset moment matrix is stated, and the operation mode of the iteration next time is entered according to preset condition or exits the iteration Operation mode.
36. terminal according to claim 34, which is characterized in that second determination unit is specifically used for, random to obtain The initial value of first parameter matrix, the first offset moment matrix and the first hiding matrix;Alternatively,
By limiting Boltzmann machine RBM training pattern, first parameter matrix, the first offset moment matrix and the are obtained The initial value of one hiding matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is hidden for RBM The offset moment matrix of layer, first parameter matrix are the weight matrix of RBM.
37. terminal according to claim 35, which is characterized in that second determination unit is determining with each instruction Practice sample the second input feature vector it is corresponding it is all it is described switching variables estimated values specifically,
Pass throughThe probability value for calculating multiple switching variables, retains the probability It is worth the value of the maximum switching variable, other described switchings in addition to the maximum switching variable of the probability value is become Amount sets 0, and the value of the switching variable using the value of the switching variable of reservation and after setting 0 estimating as the switching variable Evaluation;
Alternatively, passing through) multiple probability values for switching variables are calculated, it will be described The maximum switching variable of probability value sets 1, by except the probability value it is maximum it is described switching variable in addition to other described in cut Transformation amount sets 0, and the value of the switching variable after setting 1 and the value of the switching variable after setting 0 become as the switching The estimated value of amount;
Wherein, the x is the preset second input feature vector matrix;It is describedFor k-th initial of first parameter square The transposition of the jth row of battle array;It is describedbkjFor the initial value of j-th of element of k-th initial of first offset moment matrix;It is described K, j is positive integer, describedFor the transposition of k-th initial of first hiding matrix;The skBecome for k-th of switching The estimated value of amount.
38. according to terminal described in the claim 35, which is characterized in that described the second of the second determination unit determination The probability value of input feature vector matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor the preset k-th notable feature square Battle array;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () For the activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable;The m is institute State notable feature matrix.
39. terminal according to claim 35, which is characterized in that the notable feature that second determination unit determines In matrix each element probability value specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The hkFor the preset k-th second hiding matrix;It is describedFor turning for k-th initial of first parameter matrix It sets;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The mkFor the preset k-th notable feature matrix;The h is the described second hiding matrix;It is described S is the estimated value of the switching variable.
40. terminal according to claim 35, which is characterized in that described the second of the second determination unit determination is hidden The probability value of matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter matrix;The bk For k-th initial of first offset moment matrix;The k is the positive integer no more than the K;The τ () is described sharp Function living;The symbol o representing matrix corresponding element is multiplied;The hkFor the preset k-th second hiding matrix;It is described S is the estimated value of the switching variable;The m is the notable feature matrix.
41. terminal according to claim 35, which is characterized in that first parameter that second determination unit determines Matrix, the first offset moment matrix and the first hiding matrix are specially
Pass throughIt calculates;
Wherein, the θ be first parameter matrix, it is the first offset moment matrix, any in the first hiding matrix One;It is describedThe skK-th of switching becomes The estimated value of amount;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset described second defeated Enter eigenmatrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of first parameter Matrix;The bkFor k-th initial of first offset moment matrix;It is describedFor k-th initial of first hiding square The transposition of battle array;The IE [] is expectation function;The x0For the first value of the second input feature vector matrix;The h0For institute State the first value of the second hiding matrix;The m0For the first value of the notable feature matrix;It is describedFor second input The second value of eigenmatrix;It is describedFor the second value of the described second hiding matrix;It is describedIt is the second of notable feature matrix Value;The k is the positive integer no more than the K;The symbol o representing matrix corresponding element is multiplied;The h is described second hidden Hide matrix;The s is the estimated value of the switching variable;The m is the notable feature matrix.
42. terminal according to claim 41, which is characterized in that the terminal further include:
First updating unit, for passing throughUpdate first parameter matrix initial value, it is described first partially Move the initial value of moment matrix and the initial value of the first hiding matrix;
Wherein, θ is first parameter matrix, the first offset moment matrix, any one in the first hiding matrix; The η is preset learning rate.
43. terminal according to claim 28, which is characterized in that the arithmetic element is also used to, and described first is exported The second parameter matrix that matrix and preset or training obtain carries out multiplication operation, obtains the second output matrix.
44. terminal according to claim 43, the terminal further include: third determination unit, for determining described first Parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix and third hide matrix.
45. terminal according to claim 44, which is characterized in that the third determination unit is specifically used for, and obtains training Second input feature vector matrix of sample;
Clustering processing is carried out to the training sample, obtains K class, the K is preset value, the value of the K and it is described significantly The number of eigenmatrix is identical;
Obtain first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding square Battle array, the third hide the initial value of matrix and the 4th hiding matrix;
According to first parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding square Battle array, the third hide the initial value of matrix and the 4th hiding matrix, determined by the operation mode of 1 time or successive ignition described in First hiding matrix, first parameter matrix, second parameter matrix, first excursion matrix and the third are hidden Matrix.
46. terminal according to claim 45, which is characterized in that the third determination unit uses any primary described The operation mode of iteration specifically includes:
According to the second input feature vector matrix, second output matrix, the initial value of first parameter matrix, described The initial value of two parameter matrixs, the first offset initial value of moment matrix, the initial value of the first hiding matrix and described Third hides the initial value of matrix and the initial value of the 4th hiding matrix, determining and each second input feature vector matrix The estimated value of corresponding all switching variables;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, it is described first offset the initial value of moment matrix, the initial value of the first hiding matrix, the second hiding matrix it is initial Value, the third hide the initial value of matrix and the initial value of the 4th hiding matrix, determine the second input feature vector square Probability value, the probability value of the notable feature matrix, the probability value of the second hiding matrix and the second output square of battle array The probability value of battle array;
According to the switching estimated value of variable, the probability value of the second input feature vector matrix, the notable feature matrix The probability value of probability value, the probability value of the second hiding matrix and second output matrix, it is true in a manner of generating at random The first value, the first value of the notable feature matrix, the first value of the second hiding matrix of the fixed second input feature vector matrix With the first value of second output matrix;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide the initial of matrix The of value, the initial value of the 4th hiding matrix, the first value of the second input feature vector matrix, the notable feature matrix First value of one value, the first value of the second hiding matrix and second output matrix, to determine the first value similarly side Method determines the second value of the second input feature vector matrix, the second value of the second hiding matrix, the notable feature matrix Second value and second output matrix second value;
According to it is described switching the estimated value of variable, the initial value of first parameter matrix, second parameter matrix it is initial Value, the first offset initial value of moment matrix, the initial value of the first hiding matrix, the third hide the initial of matrix The of value, the first value of the initial value of the 4th hiding matrix, the second input feature vector matrix, the second hiding matrix One value, the first value of the notable feature matrix, the first value of second output matrix, the second input feature vector matrix Second value, the second value of the second hiding matrix, the second value of the notable feature matrix and second output matrix Second value determines the described first hiding matrix, first parameter matrix, second parameter matrix, first offset Matrix and the third hide matrix, and enter the operation mode of the iteration next time according to preset condition or exit described The operation mode of iteration.
47. terminal according to claim 45, which is characterized in that the third determination unit is specifically used for, random to obtain First parameter matrix, second parameter matrix, the first offset moment matrix, the first hiding matrix, described the The initial value of three hiding matrixes and the 4th hiding matrix;Alternatively,
The initial value for obtaining second parameter matrix, the third hiding matrix and the 4th hiding matrix at random, passes through Boltzmann machine RBM training pattern is limited, first parameter matrix, the first offset moment matrix and described first hidden are obtained Hide the initial value of matrix;
Wherein, the described first hiding matrix is the offset moment matrix of RBM visible layer, and the first offset moment matrix is hidden for RBM The offset moment matrix of layer, first parameter matrix are the weight matrix of RBM.
48. terminal according to claim 46, which is characterized in that the third determination unit determine with each described the Two input feature vector matrixes it is corresponding it is all it is described switching variables estimated values specifically,
Pass throughCalculate multiple described cut The probability value of transformation amount retains the value of the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the switching by the value of the switching variable of reservation and after setting 0 Estimated value of the value of variable as the switching variable;
Alternatively, passing throughCalculate multiple institutes The probability value for stating switching variable, sets 1 for the maximum switching variable of the probability value, will be maximum described except the probability value Other described switching variables except switching variable set 0, and the value of the switching variable after 1 being set with set 0 after described in cut Estimated value of the value of transformation amount as the switching variable;
Wherein, the x is the preset second input feature vector matrix;The y is the preset output eigenmatrix;It is describedFor the transposition of the jth row of k-th initial of first parameter matrix;It is describedFor initial second parameter matrix Jth column in all elements formed matrix transposition;The bkjFor the jth of k-th initial of first offset moment matrix The initial value of a element;The k is the positive integer no more than the K, and j is positive integer, describedFor initial k-th described The transposition of one hiding matrix;The λkFor k-th of element of the 4th hiding matrix;The d is that the third hides matrix; The skFor the estimated value of k-th of switching variable;The Z is positive integer.
49. according to terminal described in the claim 46, which is characterized in that described the second of the third determination unit determination The probability value of input feature vector matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The mkFor the preset k-th notable feature square Battle array;The hkFor the preset k-th second hiding matrix;It is describedFor k-th initial of first parameter matrix Transposition;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () For the activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable;The m is institute State notable feature matrix.
50. terminal according to claim 46, which is characterized in that the notable feature that the third determination unit determines The probability value of matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The hkFor the preset k-th second hiding matrix;It is describedFor turning for k-th initial of first parameter matrix It sets;The ckFor k-th initial of first hiding matrix;The k is the positive integer no more than the K;The τ () is The activation primitive;The h is the described second hiding matrix;The s is the estimated value of the switching variable.
51. terminal according to claim 46, which is characterized in that described the second of the third determination unit determination is hidden The probability value of matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The x is the preset second input feature vector matrix; The y is preset second output matrix;The mkFor the preset k-th notable feature matrix;The WkIt is initial K-th of first parameter matrix;It is describedbkFor k-th initial of first offset moment matrix;The UTFor initial institute State the transposition of the second parameter matrix;The k is the positive integer no more than the K;The τ () is the activation primitive;It is described Symbol o representing matrix corresponding element is multiplied;The hkFor the preset k-th second hiding matrix;The s is the switching The estimated value of variable;The m is the notable feature matrix.
52. terminal according to claim 46, which is characterized in that the output feature that the third determination unit determines The probability value of matrix specifically,
Pass throughIt calculates;
Wherein, the skFor the estimated value of k-th of switching variable;The hkFor the preset k-th second hiding square Battle array;The U is initial second parameter matrix;The d is that the third hides matrix;The k is no more than the K's Positive integer;The τ () is the activation primitive;The y is second output matrix;The h is the described second hiding square Battle array;The s is the estimated value of the switching variable.
53. terminal according to claim 46, which is characterized in that the described first hiding square that the third unit determines It is specific that battle array, first parameter matrix, second parameter matrix, the first offset moment matrix and the third hide matrix For,
Pass throughIt calculates;
Wherein, the θ is first parameter matrix, second parameter matrix, the first offset moment matrix, described first Hide any one in matrix and the hiding matrix of the third;It is describedThe skK-th The estimated value of the switching variable;It is describedFor the transposition of the preset k-th second hiding matrix;The x is preset The second input feature vector matrix;The mkFor the preset k-th notable feature matrix;The WkFor k-th initial of institute State the first parameter matrix;It is describedbkFor k-th initial of first offset moment matrix;It is describedFor initial k-th described The transposition of one hiding matrix, the U are initial second parameter matrix;The yTFor preset second output matrix Transposition;The dTThe transposition of matrix is hidden for the third;The IE [] is expectation function;The x0It is defeated for described second Enter the first value of eigenmatrix;The y0For the first value of second output matrix;The h0For the described second hiding matrix First value;The m0For the first value of the notable feature matrix;It is describedFor the second value of the second input feature vector matrix; It is describedFor the second value of second output matrix;It is describedFor the second value of the described second hiding matrix;It is describedFor institute State the second value of notable feature matrix;The k is the positive integer no more than the K;The symbol o representing matrix corresponding element phase Multiply;The y is second output matrix;The h is the described second hiding matrix;The s is the estimation of the switching variable Value;The m is the notable feature matrix.
54. terminal according to claim 53, which is characterized in that the terminal further include:
Second updating unit, for passing throughUpdate first parameter matrix initial value, it is described second ginseng The initial value of matrix number, the initial value of the first offset moment matrix, the initial value of the first hiding matrix and the third Hide the initial value of matrix;
Wherein, θ be first parameter matrix, second parameter matrix, it is described first offset moment matrix, it is described first hide Matrix, the third hide any one in matrix;The η is preset learning rate;
Second updating unit is also used to, and is passed throughUpdate the initial value of the 4th hiding matrix;
Wherein, the skThe estimated value of k-th of switching variable;The λkFor k-th of element of the 4th hiding matrix; The k is the positive integer no more than the K;The n is positive integer;The N is positive integer.
CN201410244177.6A 2014-06-04 2014-06-04 The method and terminal of changeable deep learning network structure Active CN105224963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410244177.6A CN105224963B (en) 2014-06-04 2014-06-04 The method and terminal of changeable deep learning network structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410244177.6A CN105224963B (en) 2014-06-04 2014-06-04 The method and terminal of changeable deep learning network structure

Publications (2)

Publication Number Publication Date
CN105224963A CN105224963A (en) 2016-01-06
CN105224963B true CN105224963B (en) 2019-06-07

Family

ID=54993923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410244177.6A Active CN105224963B (en) 2014-06-04 2014-06-04 The method and terminal of changeable deep learning network structure

Country Status (1)

Country Link
CN (1) CN105224963B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729901B (en) * 2016-08-10 2021-04-27 阿里巴巴集团控股有限公司 Image processing model establishing method and device and image processing method and system
CN109815969A (en) * 2019-03-05 2019-05-28 上海骏聿数码科技有限公司 A kind of feature extracting method and device based on artificial intelligence image recognition
CN110490221B (en) * 2019-07-05 2023-06-23 平安科技(深圳)有限公司 Multi-label classification method, electronic device and computer readable storage medium
CN113553571B (en) * 2020-04-26 2022-03-01 国网电子商务有限公司 Method and device for measuring reliability of terminal equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279759A (en) * 2013-06-09 2013-09-04 大连理工大学 Vehicle front trafficability analyzing method based on convolution nerve network
CN103544506A (en) * 2013-10-12 2014-01-29 Tcl集团股份有限公司 Method and device for classifying images on basis of convolutional neural network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504361B2 (en) * 2008-02-07 2013-08-06 Nec Laboratories America, Inc. Deep neural networks and methods for using same
US8582807B2 (en) * 2010-03-15 2013-11-12 Nec Laboratories America, Inc. Systems and methods for determining personal characteristics

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279759A (en) * 2013-06-09 2013-09-04 大连理工大学 Vehicle front trafficability analyzing method based on convolution nerve network
CN103544506A (en) * 2013-10-12 2014-01-29 Tcl集团股份有限公司 Method and device for classifying images on basis of convolutional neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于卷积神经网络的植物叶片分类";龚丁禧等;《计算机与现代化》;20140430(第4期);全文

Also Published As

Publication number Publication date
CN105224963A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
CN107103331B (en) Image fusion method based on deep learning
Soo Kim et al. Interpretable 3d human action analysis with temporal convolutional networks
CN105701508B (en) Global local optimum model and conspicuousness detection algorithm based on multistage convolutional neural networks
CN105224963B (en) The method and terminal of changeable deep learning network structure
CN106599830A (en) Method and apparatus for positioning face key points
CN105678248B (en) Face key point alignment algorithm based on deep learning
CN107154023A (en) Face super-resolution reconstruction method based on generation confrontation network and sub-pix convolution
JP6127219B2 (en) Method and system for extracting facial features from facial image data
CN110728324B (en) Depth complex value full convolution neural network-based polarimetric SAR image classification method
CN106022355A (en) 3DCNN (three-dimensional convolutional neural network)-based high-spectral image space spectrum combined classification method
CN107194426A (en) A kind of image-recognizing method based on Spiking neutral nets
CN109492596B (en) Pedestrian detection method and system based on K-means clustering and regional recommendation network
CN110246148A (en) The conspicuousness detection method of multi-modal depth information fusion and attention study
CN110929736A (en) Multi-feature cascade RGB-D significance target detection method
CN107146237A (en) A kind of method for tracking target learnt based on presence with estimating
CN107169508B (en) Cheong-sam image emotion semantic recognition method based on fusion features
CN107689036A (en) A kind of Real-time image enhancement method based on the bilateral study of depth
KR20170038622A (en) Device and method to segment object from image
CN103258334B (en) The scene light source colour method of estimation of coloured image
CN104408697B (en) Image Super-resolution Reconstruction method based on genetic algorithm and canonical prior model
CN111783779A (en) Image processing method, apparatus and computer-readable storage medium
CN117077579B (en) Airfoil flow field prediction method, device, equipment and storage medium
CN106779055A (en) Image characteristic extracting method and device
CN110458178A (en) The multi-modal RGB-D conspicuousness object detection method spliced more
CN111445432A (en) Image significance detection method based on information fusion convolutional neural network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant