Summary of the invention
This application provides a kind of multilayer convolutional neural networks and optimize system and method, to solve
In prior art, network structure needs to set the skill of the feature that multilayer just can extract space invariance
Art problem.
In order to solve the problems referred to above, the technical scheme is that
Embodiments provide a kind of multilayer convolutional neural networks and optimize system, including:
Framing module, based on CP decompose sampling module, micro-sampling module, based on BP algorithm
Arameter optimization module and convolutional neural networks feature output module, described framing module is led to
Cross the regression function dimension set parameter matrix θ according to convolutional layer, and for next layer for
The operation of coordinate transform;The described sampling module decomposed based on CP is to the knot through convolution operation
Fruit carries out tensor resolution, obtains two order one tensor p and q, utilizes pixel corresponding simultaneously
The parameter θ that coordinate produces with last layer carries out computing;Described micro-sampling module application bilinearity
Interpolation algorithm carries out linear interpolation to the pixel of image different directions, it is thus achieved that network exports
V;Described arameter optimization module based on BP algorithm is updated for parameter θ;Described convolution
Neural network characteristics output module is for bringing the parameter θ ^ updated into network, and carries out repeatedly
For computing, it is simultaneously introduced grader and feature is carried out classification prediction, export convolutional neural networks
Feature.
The technical scheme that the embodiment of the present invention is taked also includes: described framing module is also used
In receiving from result U after last convolution, wherein U is by carrying out with sample convolution kernel
Image convolution calculates and obtains.
The technical scheme that the embodiment of the present invention is taked also includes: described framing module is passed through
Regression function specifically includes according to the dimension set parameter matrix θ of convolutional layer: for convolution god
A certain feature output U ∈ R through networkH*W*CAs the input of sample level, wherein, H, W
The height of representative picture and width, C represents passage;Spatial transformation parameter is calculated by floc
θ, floc comprise dimension set parameter matrix θ: the θ=f returning layer according to convolutional layerloc(U)。
The technical scheme that the embodiment of the present invention is taked also includes: the application of described micro-sampling module is double
Linear interpolation algorithm carries out linear interpolation to the pixel of image different directions, it is thus achieved that network is defeated
Go out V particularly as follows: utilize the parameter θ tried to achieve to do imitative to the pixel respective coordinates (xt, yt) of U
Penetrate conversion, obtain (xs, ys);The coordinate (xs, ys) of pixel and p ° of q will be obtained through tensor computation
It is input to micro-sample level, by bilinear interpolation algorithm, surrounding pixel is carried out in micro-sample level
Compression substitutes, it is thus achieved that network output V.
The technical scheme that the embodiment of the present invention is taked also includes: described parameter based on BP algorithm
The concrete mode that tuning module is updated for θ is: utilize network output V to input network
Order one p ° of q of exterior product of tensors seeks the sensitivity δ that local derviation obtains, and updates ginseng according to sensitivity δ
Number.
The technical scheme that the embodiment of the present invention is taked also includes: described convolutional neural networks feature
Output module is for by the output U of the space transformer through L iterationLEnter softmax layer
Classify, obtain the class probability of each class;Utilize the error function parameter to convolutional layer
W seeks local derviation, successively undated parameter W, brings the W updated into each convolutional layer and again counts
Calculate.
The embodiment of the present invention additionally provides a kind of multilayer convolutional neural networks optimization method, bag
Include:
Step a: obtained result U of a certain convolutional layer by convolutional calculation, pass through framing
Module obtain result U, using result U as sample level input calculate spatial transformation parameter θ;
Step b: U is carried out tensor resolution, it is thus achieved that two order one tensor p and q, utilization is tried to achieve
Parameter θ pixel respective coordinates is done affine transformation, pixel will be obtained through tensor computation
Coordinate and p ° of q be input to micro-sample level;
Step c: be combined with tensor operation by bilinear interpolation algorithm in micro-sample level, it is thus achieved that
Network output V;V is asked the local derviation of order one p ° of q of tensor product, updates ginseng according to sensitivity δ
Number θ;
Step d: the whole network of iterative computation, output convolutional neural networks feature output.
The technical scheme that the embodiment of the present invention is taked also includes: by convolution meter in described step a
Calculate and obtain result U of a certain convolutional layer particularly as follows: the sample of convolution kernel and X*Y for d*d
Carry out image convolution and calculate result U obtaining a certain convolutional layer.
The technical scheme that the embodiment of the present invention is taked also includes: in described step d, iterative computation is whole
Individual network includes: bring the parameter updated into network, it is thus achieved that network output assignment, repeats
Step a, to step c, is iterated computing.
The technical scheme that the embodiment of the present invention is taked also includes: described step d also includes: for
Output U through the space transformer of L iterationLEnter softmax layer to classify, obtain
The class probability of each class;Definition quadratic loss function, utilizes error function to convolutional layer
Parameter W seeks local derviation, successively undated parameter W;Bring the W updated into each convolutional layer again
Calculate, it is thus achieved that the final network of CNN exports.
The multilayer convolutional neural networks of the embodiment of the present invention optimizes system and method through tensor
Space transformer is added in convolutional layer output after decomposition, substitutes traditional pond layer, is conducive to
Extract the feature of space invariance;Output simultaneously for convolutional layer carries out tensor resolution,
Bigization retains under raw information and structural dependence premise, removes redundancy, improves computing
Efficiency;Application bilinear interpolation algorithm is combined with tensor, the pixel to image different directions
Carry out linear interpolation, between any two known pixels point, insert pixel, when amplifying
Avoid distortion, replacement pixels point during dimensionality reduction, can be tried to achieve;Utilize the low order tensor after tensor resolution
It is compressed processing to pixel in conjunction with bilinear interpolation algorithm, reduces computation complexity also
Scaling at image processes and maintains antialiasing function.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below tie
Close drawings and Examples, the present invention is further elaborated.Should be appreciated that herein
Described specific embodiment, only in order to explain the present invention, is not intended to limit the present invention.
Refer to the multilayer convolutional neural networks that Fig. 1, Fig. 1 are the embodiment of the present invention and optimize system
Structural representation.The multilayer convolutional neural networks of the embodiment of the present application optimizes system and includes figure
As locating module, the sampling module that decomposes based on CP, micro-sampling module, based on BP algorithm
Arameter optimization module and convolutional neural networks feature output module.Framing module can set
After convolutional layer, it is also possible to accept original image, framing module passes through regression function
Dimension set parameter matrix θ according to convolutional layer, and for next layer for coordinate transform
Operation;Sampling module based on CP decomposition carries out tensor to the result through convolution operation and divides
Solve, obtain two order one tensor p and q, utilize coordinate and last layer that pixel is corresponding simultaneously
The parameter θ produced carries out computing, particularly as follows: utilize the parameter θ the tried to achieve pixel to U
Respective coordinates (xt, yt) does affine transformation, obtains (xs, ys):
Tensor theories is a subdiscipline of mathematics, and tensor concept is pushing away of vector concept
Extensively, vector is single order tensor, and tensor is one and can be used to represent at some vectors, scalar sum
The polyteny function of the linear relationship between other tensors, the sample expressed for tensor form
Prototype structure can be retained to the full extent, and then extract in feature extraction phases more robust
Feature.
The pixel of image different directions is carried out by micro-sampling module application bilinear interpolation algorithm
Linear interpolation, it is thus achieved that network output V, inserts pixel between any two known pixels point
Point, avoids distortion when amplifying, can try to achieve replacement pixels point during dimensionality reduction.Wherein, bilinearity
Interpolation algorithm: bilinear interpolation, is also called bilinear interpolation.Bilinear interpolation is to have two
The linear interpolation extension of the interpolating function of variable, its core concept is to enter respectively in both direction
Row once linear interpolation, is widely used in signal transacting, and digital picture and Video processing etc. should
In with.
Arameter optimization module based on BP algorithm is updated for θ, concrete update mode
For: utilize network output V to ask local derviation to obtain network input order one p ° of q of exterior product of tensors
Sensitivity δ, according to sensitivity δ undated parameter θ;
Convolutional neural networks feature output module networks for the parameter θ ^ band that will have updated
Network, and it is iterated computing, it is simultaneously introduced grader and feature is carried out classification prediction, output
Convolutional neural networks feature.
Refer to the multilayer convolutional neural networks optimization side that Fig. 2, Fig. 2 are the embodiment of the present invention
The flow chart of method.The multilayer convolutional neural networks optimization method of the embodiment of the present invention includes:
Step 10: image convolution calculating is carried out for the convolution kernel of d*d and the sample of X*Y
Obtain result U of a certain convolutional layer;
In step 10, convolution kernel:
Sample X:
Obtain and export U:
Wherein to convolution results Um the most once, n
Step 20: framing module receives from result U after last convolution.
Step 30: a certain feature for CNN exports U ∈ RH*W*C(H, W representative picture
Height and width, C represents passage), as the input of sample level, calculate space by floc and become
Changing parameter θ, floc comprises recurrence layer and the parameter of convolutional layer becomes θ matrix:
θ=floc(U)
Obtaining result is:
Step 40: result U after convolution is carried out tensor resolution, obtains two order one tensors
P and q:
In step 40, in tradition convolutional neural networks, network design is convolution pond
The structure in convolution pond, needs to set multilayer and just can extract the feature of space invariance.
And in the multilayer convolutional neural networks optimization method of this embodiment of the present invention, through tensor
Add space transformer after convolutional layer output after decomposition, substitute traditional pond layer, favorably
In the feature extracting space invariance;Output simultaneously for convolutional layer carries out tensor resolution,
Maximize and retain under raw information and structural dependence premise, remove redundancy, improve fortune
Calculate efficiency.
Step 50: utilize the parameter θ tried to achieve that the pixel respective coordinates (xt, yt) of U is done
Affine transformation, obtains (xs, ys):
Step 60: the coordinate (xs, ys) obtaining pixel through tensor computation is input to p ° of q
Micro-sample level, is compressed replacing to surrounding pixel by bilinear interpolation algorithm in micro-sample level
Generation, it is thus achieved that network output V.
In a step 60, micro-sample level application bilinear interpolation algorithm is combined with tensor, to figure
As the pixel of different directions carries out linear interpolation, interleaving of any two known pixels point
Enter pixel, avoid distortion when amplifying, replacement pixels point during dimensionality reduction, can be tried to achieve, at this specially
Profit is be combined with tensor by bilinear interpolation algorithm to be compressed pixel processing, fall
While low computation complexity, in the scaling of image processes, maintain antialiasing function
Step 70: utilize network output V that network input order one p ° of q of exterior product of tensors is asked inclined
Lead the sensitivity δ of acquisition, according to sensitivity δ undated parameter θ.
Step 80: bring the parameter θ ^ updated into network, it is thus achieved that network output is entered as
U2, as the input of the first step, repeats step 10 and arrives step 70, be iterated computing.
In step 80, after space transformer regulates parameter, can arbitrarily add and convolution
The optional position of neutral net, after can being arranged on original sample input layer, it is also possible to arranges
After convolutional layer (sample-convolution-space transformer ... or sample-space transformer-convolution ...)
Finally realizing effect is the feature that different space transformers can extract different levels, such as
One space transformer can extract the feature of bird head, second feature etc. that can extract bird body
Deng.
Step 90: the output UL for the space transformer through L iteration enters
Softmax layer is classified, and obtains the class probability of each class.
Step 100: definition quadratic loss function,Represent the label that the n-th sample is corresponding
Kth is tieed up,Represent the kth output of the network output that the n-th sample is corresponding
Step 110: utilize error function that parameter W of convolutional layer is asked local derviation, successively update
Parameter W.
Step 120: bring the W updated into each convolutional layer and recalculate, it is thus achieved that CNN is
Whole network output, the feature i.e. extracted.
The multilayer convolutional neural networks of the embodiment of the present invention optimizes system and method through tensor
Space transformer is added in convolutional layer output after decomposition, substitutes traditional pond layer, is conducive to
Extract the feature of space invariance;Output simultaneously for convolutional layer carries out tensor resolution,
Bigization retains under raw information and structural dependence premise, removes redundancy, improves computing
Efficiency;Application bilinear interpolation algorithm is combined with tensor, the pixel to image different directions
Carry out linear interpolation, between any two known pixels point, insert pixel, when amplifying
Avoid distortion, replacement pixels point during dimensionality reduction, can be tried to achieve;Utilize the low order tensor after tensor resolution
It is compressed processing to pixel in conjunction with bilinear interpolation algorithm, reduces computation complexity also
Scaling at image processes and maintains antialiasing function.
Described above to the disclosed embodiments, enables professional and technical personnel in the field real
Now or use the present invention.To the multiple amendment of these embodiments professional technique people to this area
Will be apparent from for Yuan, generic principles defined herein can be without departing from this
In the case of the spirit or scope of invention, realize in other embodiments.Therefore, the present invention
It is not intended to be limited to the embodiments shown herein, and is to fit to disclosed herein
Principle and the consistent the widest scope of features of novelty.