CN109754011B - Data processing method, device and Related product based on Caffe - Google Patents

Data processing method, device and Related product based on Caffe Download PDF

Info

Publication number
CN109754011B
CN109754011B CN201811639458.6A CN201811639458A CN109754011B CN 109754011 B CN109754011 B CN 109754011B CN 201811639458 A CN201811639458 A CN 201811639458A CN 109754011 B CN109754011 B CN 109754011B
Authority
CN
China
Prior art keywords
caffe
file
input data
cnn
convolutional layer
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
CN201811639458.6A
Other languages
Chinese (zh)
Other versions
CN109754011A (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.)
Cambricon Technologies Corp Ltd
Original Assignee
Beijing Zhongke Cambrian Technology 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 Beijing Zhongke Cambrian Technology Co Ltd filed Critical Beijing Zhongke Cambrian Technology Co Ltd
Priority to CN201811639458.6A priority Critical patent/CN109754011B/en
Publication of CN109754011A publication Critical patent/CN109754011A/en
Application granted granted Critical
Publication of CN109754011B publication Critical patent/CN109754011B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application involves a kind of data processing method based on Caffe, device and Related products, the operator type of normalizing parameter and CNN first floor convolutional layer is defined in Caffe file according to configuration order, it obtains matching and postpones Caffe file, then to being compiled as executable file with postponing Caffe file, and executable file is run on artificial intelligence process device, so that artificial intelligent processor is carried out feature normalization to the input data of convolutional layer, and convolution algorithm is executed to the data after feature normalization.This method is to be placed into the feature normalization of input data in layer to carry out, and the operator defined in Caffe file is the operator that artificial intelligent processor can be operated directly, in this way, the standardization of input data and convolution algorithm can be fused together progress by artificial intelligence process device, the efficiency that convolutional neural networks carry out picture number identification is substantially increased, deep learning related application task may further be made more efficient.

Description

Data processing method, device and Related product based on Caffe
Technical field
This application involves depth learning technology fields, more particularly to a kind of data processing method based on Caffe, device And Related product.
Background technique
Deep learning, which refers to, solves the problems, such as that image, text etc. are various with various machine learning algorithms on multilayer neural network Algorithm set.In the relevant task of progress deep learning, such as: the handling image domains of the task can use convolutional Neural net Network, convolutional neural networks are a kind of depth feed forward-fuzzy controls, have been applied successfully to image recognition.
First layer is convolutional layer in convolutional neural networks, for extracting some features in image, is extracted in convolutional layer special Before sign, need to carry out image data feature normalization (normalizing), feature normalization refers to making each of image data A dimension has zero-mean and unit variance.Currently, feature normalization is carried out to image data in convolutional neural networks, it can be with By central processing unit call open source code computer vision library (Open source Computer Vision Library, OpenCV it) carries out mean value and variance to image data to handle, and using treated image data as the defeated of convolutional neural networks Enter data, then is successively compiled and runs behaviour to every layer of convolutional neural networks according to the input data by central processing unit Make.
But above-mentioned use convolutional neural networks carry out picture number recognition methods and there are problems that inefficiency.
Summary of the invention
Based on this, it is necessary to for it is above-mentioned using convolutional neural networks carry out picture number recognition methods there are inefficiency Technical problem provides a kind of data processing method based on Caffe, device and Related product.
In a first aspect, the embodiment of the invention provides a kind of data processing methods based on Caffe, which comprises
Obtain configuration order;The configuration order, which is used to indicate, carries out parameter configuration to Caffe file;
According to the configuration order, normalizing parameter and the convolutional neural networks CNN first floor are defined in the Caffe file The operator type of convolutional layer is obtained with postponing Caffe file;The normalizing parameter indicates the input data to CNN convolutional layer Carry out the parameter of feature normalization;
It is compiled to described with postponing Caffe file, obtains executable file, and by the executable file artificial It is run on intelligent processor;The executable file is used to indicate the artificial intelligence process device to the defeated of the CNN convolutional layer Enter data and carry out feature normalization, and convolution algorithm is executed to the data after the feature normalization.
Described in one of the embodiments, with Caffe file is postponed further includes artificial intelligence process device logic and general Processor logic;Language when the artificial intelligence process device logical expressions execute artificial intelligence process device layer in the Caffe file The sequence that sentence executes;Sentence executes when the general processor logical expressions execute general processor layer in the Caffe file Sequence;
Then, before the executable file being run on artificial intelligence process device, which comprises
Increase logic switch mark in the executable file according to switching command;The logic switch mark is for referring to The operation for showing the CNN convolutional layer is the artificial intelligence process device logic.
The calculation of normalizing parameter and CNN first floor convolutional layer is defined in the Caffe file in one of the embodiments, Subtype is obtained with postponing Caffe file, comprising:
The normalizing parameter is added in the convolution layer parameter in the Caffe file respectively, in the Caffe file In factory mode in define the operator type of the CNN first floor convolutional layer, constitute described with postponing Caffe file.
The normalizing parameter is the parameter obtained according to preset model training in one of the embodiments,.
The normalizing parameter includes: to subtract Mean Parameters and zooming parameter in one of the embodiments,;
Described to subtract Mean Parameters, characterization carries out the input data to subtract averaging operation;
The zooming parameter characterizes the data after subtract to the input data averaging operation and zooms in and out operation.
The Mean Parameters that subtract include the first Mean Parameters or the second Mean Parameters in one of the embodiments,;
First Mean Parameters, characterization subtract to pixel of the input data on the same spatial position Value;Alternatively,
Second Mean Parameters, characterization carry out subtracting mean value to the channel of the input data.
Second aspect, the embodiment of the present invention provide a kind of data processing method based on Caffe, which comprises
Receive executable file, the executable file, which is computer equipment, to be postponed Caffe file and be compiled according to matching Obtain file;Described includes the operator type of normalizing parameter and CNN first floor convolutional layer with the Caffe file postponed;
According to the executable file, feature normalization processing is carried out to input data, and to feature normalization processing after Input data execute convolution algorithm.
It is described that input data is carried out at feature normalization in one of the embodiments, according to the executable file Reason, comprising:
According to the respective function of the operator type calling carried in executable file and subtract Mean Parameters, to the input number According to carrying out subtracting averaging operation;
Processing is zoomed in and out to the data subtracted after averaging operation according to zooming parameter.
In one of the embodiments, the respective function called according to the operator type that is carried in executable file and Subtract Mean Parameters, the input data carried out to subtract averaging operation, comprising:
If the Mean Parameters that subtract are first to subtract Mean Parameters, according to the operator type carried in the executable file The respective function of calling and described first subtracts Mean Parameters, carries out to pixel of the input data on the same spatial position Subtract averaging operation.
In one of the embodiments, the respective function called according to the operator type that is carried in executable file and Subtract Mean Parameters, the input data carried out to subtract averaging operation, comprising:
If the Mean Parameters that subtract are second to subtract Mean Parameters, according to the operator type carried in the executable file Calling respective function and described second subtract Mean Parameters, the channel in the input data is carried out to subtract averaging operation.
The third aspect, the embodiment of the present invention provide a kind of data processing equipment based on Caffe, and described device includes:
Module is obtained, for obtaining configuration order;The configuration-direct, which is used to indicate, matches Caffe file progress parameter It sets;
Definition module, for defining normalizing parameter in the Caffe file and CNN being first according to the configuration-direct The operator type of layer convolutional layer, obtains with postponing Caffe file;The normalizing parameter indicates the input number to CNN convolutional layer According to the parameter for carrying out feature normalization;
Processing module obtains executable file for being compiled to described with postponing Caffe file, and will described in can File is executed to run on artificial intelligence process device;The executable file is used to indicate the artificial intelligence process device to described The input data of CNN convolutional layer carries out feature normalization, and executes convolution algorithm to the data after the feature normalization.
Fourth aspect, the embodiment of the present invention provide a kind of data processing equipment based on Caffe, and described device includes:
Receiving module, for receiving executable file, the executable file, which is computer equipment, postpones Caffe according to matching File is compiled to obtain file;Described includes the operator of normalizing parameter and CNN first floor convolutional layer with the Caffe file postponed Type;
Computing module, for carrying out feature normalization processing to input data, and to feature according to the executable file Input data after standardization executes convolution algorithm.
5th aspect, the embodiment of the present invention provide a kind of data processing equipment based on Caffe, including memory and processing Device, the memory are stored with computer program, and the processor realizes above-mentioned first aspect when executing the computer program With the method and step in any one of second aspect embodiment.
6th aspect, the embodiment of the present invention provide a kind of combined treatment device, and the combined treatment device includes as above-mentioned Data processing equipment, general interconnecting interface described in 5th aspect embodiment based on Caffe and except the number based on Caffe According to other processing units other than processing unit;The data processing equipment based on Caffe and other processing units into Row interaction.
7th aspect, the embodiment of the present invention provide a kind of machine learning chip, and the machine learning chip includes as above-mentioned Combined treatment device described in 6th aspect.
Eighth aspect, the embodiment of the present invention provide a kind of board, and the board includes the machine as described in terms of the above-mentioned 7th Device learns chip.
9th aspect, the embodiment of the present invention provide a kind of electronic equipment, and the electronic equipment includes such as above-mentioned eighth aspect The board.
A kind of data processing method based on Caffe provided by the embodiments of the present application, device and Related product, computer are set The standby operator type for defining normalizing parameter and CNN first floor convolutional layer in Caffe file according to configuration order is obtained with postponing Then Caffe file is compiled as executable file with postponing Caffe file to this, and by the executable file in artificial intelligence It is run on processor, so that artificial intelligence process device carries out feature normalization to the input data of CNN convolutional layer, and to feature mark Data after standardization execute convolution algorithm.Since in this method, the feature normalization of the input data of CNN convolutional layer being placed into Layer the inside carries out, and, computer equipment operator type defined in Caffe file is that people's work intelligent processor can be grasped directly The operator of work, in this way, the standardization of input data and convolution algorithm can be fused together by artificial intelligence process device It carries out, substantially increases the efficiency that convolutional neural networks carry out picture number identification, further deep learning correlation can be made to answer It is more efficient with task.
Detailed description of the invention
Fig. 1 is a kind of applied environment figure for data processing method based on Caffe that one embodiment provides;
Fig. 2 is a kind of flow diagram for data processing method based on Caffe that one embodiment provides;
Fig. 3 is a kind of flow diagram for data processing method based on Caffe that one embodiment provides;
Fig. 4 is a kind of flow diagram for data processing method based on Caffe that one embodiment provides;
Fig. 5 is a kind of structural block diagram for data processing equipment based on Caffe that one embodiment provides;
Fig. 6 is a kind of structural block diagram for data processing equipment based on Caffe that one embodiment provides;
Fig. 7 is a kind of structural schematic diagram of combined treatment device in one embodiment;
Fig. 8 is the structural schematic diagram of another combined treatment device in one embodiment;
Fig. 9 is a kind of structural schematic diagram of board in one embodiment.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.
The description and claims of this application and term " first ", " second ", " third " and " in the attached drawing Four " etc. are not use to describe a particular order for distinguishing different objects.In addition, term " includes " and " having " and it Any deformation, it is intended that cover and non-exclusive include.Such as it contains the process, method of a series of steps or units, be System, product or equipment are not limited to listed step or unit, but optionally further comprising the step of not listing or list Member, or optionally further comprising other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
A kind of data processing method based on Caffe provided by the present application can be applied to application environment as shown in Figure 1 In, which can be server, the computer equipment include by system bus connect processor, memory, Network interface and database.Wherein, the processor is for providing calculating and control ability.The memory includes non-volatile memories Medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and database.The built-in storage Operation for operating system and computer program in non-volatile memory medium provides environment.The database is based on for storing The data of the data processing method of Caffe.The network interface is used to communicate with external other equipment by network connection.The meter To realize a kind of data processing method based on Caffe when calculation machine program is executed by processor.
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.The data processing method based on Caffe that embodiments herein provides, it is intended to solve in the prior art Carrying out picture number recognition methods using convolutional neural networks there is technical issues that.Embodiment will be passed through below and tied Attached drawing is closed specifically to carry out in detail to how the technical solution of the technical solution of the application and the application solves above-mentioned technical problem It describes in detail bright.These specific embodiments can be combined with each other below, may be at certain for the same or similar concept or process It is repeated no more in a little embodiments.It should be noted that a kind of data processing method based on Caffe provided by the invention, Fig. 2's Executing subject is computer equipment, and the executing subject of Fig. 3 and Fig. 4 are artificial intelligent processor, wherein the execution master of Fig. 2-Fig. 4 Body can also be the data processing equipment based on Caffe, which can pass through the side of software, hardware or software and hardware combining Formula is implemented as some or all of of the data processing based on Caffe.
Below using executing subject as computer equipment, a kind of data processing method embodiment based on Caffe is said It is bright.
In one embodiment, Fig. 2 provides a kind of data processing method based on Caffe, the present embodiment what is involved is Computer equipment configures Caffe file, and will be compiled as executable file in artificial intelligence with the Caffe file postponed It is run on processor, so that artificial intelligence process device carries out feature normalization to the input data of convolutional layer, and to the feature Data after standardization execute the detailed process of convolution algorithm.As shown in Fig. 2, this method comprises:
S101 obtains configuration order;The configuration order, which is used to indicate, carries out parameter configuration to Caffe file.
Wherein, configuration order is used to indicate the order that parameter configuration is carried out to Caffe file, in the present embodiment, computer Equipment is after getting the configuration order, so that it may carry out parameter configuration to Caffe file.Wherein, computer equipment, which obtains, is somebody's turn to do The mode of configuration order can be, and computer equipment directly receives the configuration order of user's input, be also possible to computer equipment A configuration file is actively obtained, then parses configuration order from the configuration file, there are also other modes, this implementations certainly Example is to this and without limitation.
S102 defines normalizing parameter and convolutional neural networks in the Caffe file according to the configuration order The operator type of CNN first floor convolutional layer is obtained with postponing Caffe file;The normalizing parameter is indicated to the CNN convolutional layer Input data carry out feature normalization parameter.
Based in above-mentioned S101 step, the configuration order that computer equipment obtains is literary in Caffe according to the configuration order Normalizing parameter and convolutional neural networks ((Convolutional Neural Network), abbreviation CNN) first floor are defined in part The operator type of convolutional layer is obtained with the Caffe file postponed.Wherein, normalizing parameter indicates the input number to CNN convolutional layer According to the parameter for carrying out feature normalization, such as: the normalizing parameter can be Mean Parameters or zooming parameter etc., can also be Other parameters, the present embodiment do not limit this.Wherein, the operator type of CNN first floor convolutional layer indicates to carry out input data The operator used when feature normalization, such as: ConvFirstOp, wherein ConvFirstOp is an operator in cnml, that is, First layer convolution operation.Cnml is referred to as machine learning library, is the application programming interfaces of a deep learning reasoning (Application Program Interface, abbreviation API), i.e. cnml can be a series of behaviour of ConvFirstOp operator Offer API is provided, according to the API, the corresponding function of ConvFirstOp operator can be called directly from cnml.
S103 is compiled to described with postponing Caffe file, obtains executable file, and by the executable file It is run on artificial intelligence process device;The executable file is used to indicate the artificial intelligence process device to the CNN convolution The input data of layer carries out feature normalization, and executes first floor convolution algorithm to the data after the feature normalization.
In the present embodiment, based on the Caffe file postponed is matched obtained in above-mentioned S102, computer equipment, which matches this, to be postponed Caffe file be compiled, obtain an executable file, and the executable file is transported on artificial intelligence process device Row.Artificial intelligence process device carries out feature normalization according to input data of the executable file to CNN first floor convolutional layer, and right Data after feature normalization execute first floor convolution algorithm.Wherein, artificial intelligence process device, such as may is that machine learning list First (Machine Learning Unit, abbreviation MLU).By taking artificial intelligence process device is MLU as an example, in practical applications, MLU It can be provided according to the operator (such as ConvFirstOp) for carrying first floor convolutional layer in executable file according to cnml The API of ConvFirstOp calls the corresponding function of ConvFirstOp from cnml, carries out to the input data of CNN convolutional layer special Sign standardization, and convolution algorithm is executed to the data after the standardization.It should be noted that when in CNN first floor convolutional layer When operator type is set to ConvFirstOp, then when CNN convolutional layer input data carries out feature normalization, so that it may user Work intelligent processor (MLU) makes inferences.
A kind of data processing method based on Caffe provided in this embodiment, computer equipment exist according to configuration order The operator type that normalizing parameter and CNN first floor convolutional layer are defined in Caffe file is obtained with postponing Caffe file, then right It should be compiled as executable file with Caffe file is postponed, and the executable file was run on artificial intelligence process device, so that Artificial intelligence process device carries out feature normalization to the input data of CNN convolutional layer, and executes to the data after feature normalization Convolution algorithm.Due to the feature normalization of the input data of CNN convolutional layer being placed into inside layer and is carried out in this method, and, meter Calculating machine equipment operator type defined in Caffe file is the operator that people's work intelligent processor can be operated directly, in this way, people The standardization of input data and convolution algorithm can be fused together progress by work intelligent processor, substantially increase volume Product neural network carries out the efficiency of picture number identification, can further make deep learning related application task more efficient.
On the basis of the above embodiments, optionally, described with to postpone Caffe file further include that artificial intelligence process device is patrolled It collects and general processor logic;The artificial intelligence process device logical expressions execute artificial intelligence process in the Caffe file The sequence that sentence executes when device layer;When the general processor logical expressions execute general processor layer in the Caffe file The sequence that sentence executes;Then, before the executable file being run on artificial intelligence process device, which comprises root Increase logic switch mark in the executable file according to switching command;The logic switch mark is used to indicate the CNN The operation of convolutional layer is the artificial intelligence process device logic.
In the present embodiment, artificial intelligence process device by taking MLU as an example, then match by taking CPU as an example and postpone Caffe by general processor File further includes artificial intelligence process device logic and general processor logic, to further include MLU logic with the Caffe file postponed And cpu logic, wherein the sequence that each sentence executes in MLU layers in the Caffe file of MLU logical expressions, what cpu logic indicated It is the sequence that each sentence executes in CPU layers in Caffe file.In practical applications, due to further including with the Caffe file postponed MLU logic and cpu logic, computer equipment can increase logic switch mark according to switching command in executable file;It should Logic switch mark can indicate that the operation of CNN convolutional layer is to execute with MLU logic.Wherein, switching command can be user It is manually entered, carries the instruction of logic switch mark, computer equipment will be carried wherein when receiving the switching command Logic switch mark be added in executable file.Wherein, illustratively, logic switch mark can be indicated with 0 or 1, when The logic switch is identified as 0 or when for 1, and the operation of CNN convolutional layer is to be executed with MLU logic by computer equipment.It needs Understand, carries out logic switch if do not identified according to logic switch, computer equipment can default CNN first floor convolutional layer Operation is to be performed with cpu logic, it is of course also possible to be also provided with another logic switch mark to cpu logic, works as needs With cpu logic come when executing operation, computer equipment switches mark according to increased cpu logic and carries out logic switch.Wherein, it patrols Collecting switching mark can be the MLU that number, letter or the digital combination with letter are formed or the mark that CPU can be identified, The concrete form that the present embodiment identifies logic switch is without limitation.
A kind of data processing method based on Caffe provided in this embodiment, computer equipment exist by executable file Before running on artificial intelligence process device, increase logic switch mark in executable file according to switching command, and according to this The operation of CNN convolutional layer is switched to artificial intelligence process device logic by logic switch mark, in this way, passing through setting logic switch mark Know and freely switched between artificial intelligence process device and general processor, the operation of suitable artificial intelligence process device is switched Artificial intelligence process device is given, the efficiency that convolutional neural networks carry out picture number identification is substantially increased, further, so that depth It is more efficient to learn related application task.
For the calculation of normalizing parameter and CNN first floor convolutional layer is defined described in above-described embodiment in Caffe file Subtype is obtained with Caffe file is postponed, and the embodiment of the present application provides a kind of data processing method based on Caffe, then exists In one embodiment, a kind of achievable mode of above-mentioned S102 step, comprising: the convolutional layer in the Caffe file respectively The normalizing parameter is added in parameter, the CNN first floor convolutional layer is defined in the factory mode in the Caffe file Operator type is constituted described with postponing Caffe file.
Wherein, the convolution layer parameter in Caffe file, i.e. convolutionParameter in Caffe proto. Factory mode in Caffe file, i.e. layer_factory, such as: src/caffe/layer_factory.cpp.Then this reality It applies in example, computer equipment adds normalizing parameter, the work in Caffe file in the convolution layer parameter in Caffe file The operator type that CNN first floor convolutional layer is defined in factory's mode is obtained with the Caffe file postponed, in Caffe proto Normalizing parameter is added in convolutionParameter, and the operator of CNN first floor convolutional layer is defined in layer_factory Then type is obtained with postponing Caffe file.In the present embodiment, computer equipment defines standardization in determining position The operator type of parameter and CNN first floor convolutional layer, can make artificial intelligent processor according to postpone Caffe file compiling can File is executed, standardization and convolution algorithm to input data are fused together progress, substantially increase convolutional Neural net The efficiency of network progress picture number identification.
Due to needing to provide specific numerical value to normalizing parameter, so that artificial intelligence process device is according to executable file When being standardized to input data, the feature normalization processing to data can be favorably accomplished, then is implemented at one In example, the value of the normalizing parameter is the data obtained according to preset model training.Wherein, the value of normalizing parameter For the data obtained according to preset model training, what which constructed in advance carries out standard to training set Change the model of parameter training.Certainly, the present embodiment is that one kind is enumerated according to the value of preset model training normalizing parameter Mode is also possible to user rule of thumb or the obtained numerical value of big data of other methods statistics, the present embodiment to this not yet It limits.In the present embodiment, computer equipment carries out value to normalizing parameter according to preset model training, realizes artificial Intelligent processor is standardized input data according to the normalizing parameter, substantially reduce in input data each feature it Between otherness.
In addition, feature normalization indicates so that each dimension of input data has zero-mean and unit variance, then institute Stating normalizing parameter includes: to subtract Mean Parameters and zooming parameter;The Mean Parameters characterization that subtracts carries out input data to subtract mean value Operation;The zooming parameter characterizes the data that the input data subtract after averaging operation and zooms in and out operation.Optionally, The Mean Parameters that subtract include first subtracting Mean Parameters or second subtracting Mean Parameters;Described first subtracts Mean Parameters characterization to defeated Enter pixel of the data on the same spatial position to carry out subtracting mean value;Alternatively, described second subtracts Mean Parameters characterization to input number According to channel carry out subtracting mean value.
Wherein, feature normalization processing is carried out to input data to average and contract in each dimension of input data It puts, then normalizing parameter includes: to subtract Mean Parameters and zooming parameter, wherein subtract Mean Parameters characterization and all training sets are carried out Subtract averaging operation;Zooming parameter characterization subtract to all training sets the data after averaging operation and zooms in and out operation, wherein Subtracting Mean Parameters includes first subtracting Mean Parameters and second and subtracting Mean Parameters, and first subtracts Mean Parameters characterization to input data same Pixel on one spatial position carries out subtracting mean value, and second subtracts Mean Parameters characterization carries out subtracting mean value to the channel of input data, Illustratively, first subtracts Mean Parameters and can be mean_file parameter;Second, which subtracts Mean Parameters, can be mean_value parameter; It is specified it should be noted that the definition of mean_file parameter can be through mean_file:mymean.binaryproto Mean value file.Illustratively, zooming parameter is set as std parameter, and value std=0.017 is if then subtracting Mean Parameters Mean_file parameter, artificial intelligence process device carry out subtracting averaging operation to the pixel on the same spatial position of input data, and 0.017 is scaled again to the data after averaging operation are subtracted, and obtaining final data is the data after input data feature normalization. In addition, if subtracting Mean Parameters is mean_value parameter, the specific value of mean_value parameter is set as 104,117,123, Then the channel of artificial intelligence process device input data carries out subtracting mean value that (all channels R subtract 104, all channels G and subtract 117, institute There is channel B to subtract the data after 123) obtaining subtracting mean value, 0.017 then is zoomed in and out to the data, obtains final data i.e. Input data after being characterized standardization, such as: first layer convolutional layer can be with is defined as:
It is to be appreciated that artificial intelligence process device is according to mean_file parameter and mean_value parameter to input number According to carrying out subtracting averaging operation being that one is only selected to carry out.Again illustratively, it in conjunction with the obtaining value method of above-mentioned standard parameter, is actually answering Standardized data (subtracting Mean Parameters and zooming parameter) is obtained according to preset model training with middle elder generation, is if subtracting Mean Parameters Mean, zooming parameter std, then assume that it is ConvFirstOp that an operator is provided on artificial intelligence process device, then according to formula Out=((data-mean)/stdt) * filter+bias can be realized to carry out input data to subtract mean operation first, after And it carries out finally obtaining output data except zoom operation.Wherein filter is convolution kernel, and bias is biasing, all by training nerve What network obtained.
In the present embodiment, artificial intelligence process device subtracts Mean Parameters (mean_file parameter or mean_ according to setting Value parameter) input data is carried out to subtract averaging operation, then read to subtract the data after averaging operation zoom in and out processing realize it is defeated The standardization for entering data substantially reduces the otherness in input data between each feature.
Below with executing subject be artificial intelligent processor, to a kind of data processing method embodiment based on Caffe into Row explanation.It should be noted that due to artificial intelligence process device, normalizing parameter, the operator type of CNN convolutional layer, subtracting mean value Specific solution has been carried out in interactive process between the nouns such as parameter, zooming parameter and some data in the above-described embodiments It releases, repeats no more in the examples below here.
In one embodiment, Fig. 3 provides a kind of data processing method based on Caffe, the present embodiment what is involved is Artificial intelligence process device according to executable file to input data carry out feature normalization processing, and to feature normalization processing after Input data execute convolution algorithm detailed process.As shown in figure 3, this method comprises:
S201, receive executable file, the executable file be computer equipment according to postpone Caffe file progress Compiling obtains file;Described includes the operator type of normalizing parameter and CNN first floor convolutional layer with the Caffe file postponed.
In the present embodiment, artificial intelligence process device is by taking MLU as an example, then MLU receives executable file.Wherein executable file It is compiled to obtain file according to postponing Caffe file for computer equipment, wherein with postponing Caffe representation of file in original Caffe file after defining normalizing parameter and the operator type of CNN first floor convolutional layer in Caffe file.
S202 carries out feature normalization processing to input data according to the executable file, and to feature normalization at Input data after reason executes convolution algorithm.
In this step, based in above-mentioned S201 step, the received executable file of artificial intelligence process device can be held according to this Compose a piece of writing part, artificial intelligence process device to input data carry out feature normalization processing, and to feature normalization treated input Data execute first floor convolution algorithm.Illustratively, by taking artificial intelligence process device is MLU as an example, MLU can be according in executable file The operator (such as ConvFirstOp) for carrying first floor convolutional layer calls the API of ConvFirstOp to roll up the CNN first floor from cnml The input data of lamination carries out feature normalization, and executes first floor convolution algorithm to the data after feature normalization.
A kind of data processing method based on Caffe provided in this embodiment, artificial intelligence process device based on the received may be used File is executed, feature normalization processing is carried out to input data, and convolution is executed to feature normalization treated input data Operation, in this method, since executable file is computer equipment according to being configured with normalizing parameter and the calculation of CNN first floor convolutional layer The Caffe file compiling of subtype, and, the feature normalization of the input data of CNN convolutional layer is placed into inside layer and is carried out, So that the standardization of input data and convolution algorithm can be fused together progress by artificial intelligence process device, mention significantly High convolutional neural networks carry out the efficiency of picture number identifications, further, so that deep learning related application task is more increased Effect.
In view of artificial intelligence process device to input data carry out feature normalization processing be include subtract averaging operation and Two steps of zoom operations, then in one embodiment, as shown in figure 4, above-mentioned S202 includes:
S301 according to the respective function of the operator type calling carried in executable file and subtracts Mean Parameters, to described Input data carries out subtracting averaging operation.
In the present embodiment, respective function that artificial intelligence process device is called according to the operator type that carries in executable file With subtract Mean Parameters, input data is carried out to subtract averaging operation, since executable file is according to computer equipment according to configuration The compiling of the Caffe file of normalizing parameter (including subtracting Mean Parameters and zooming parameter) and CNN first floor convolutional layer operator type , so, artificial intelligence process device can obtain CNN first floor convolutional layer operator directly from the executable file and subtract mean value ginseng Then number calls corresponding function according to the operator, and carries out subtracting averaging operation to input data.
Wherein, the Mean Parameters that subtract of definition can be first and subtract Mean Parameters or second subtract Mean Parameters, so should S301 step includes two kinds of implementations:
Optionally, one of implementation of S301 step, comprising: if it is described subtract Mean Parameters be first subtract mean value ginseng Number then subtracts Mean Parameters according to the respective function and described first that the operator type carried in the executable file is called, right Pixel of the input data on the same spatial position carries out subtracting averaging operation.
Wherein, first subtracts Mean Parameters, such as: the definition of mean_file parameter, which can be, passes through mean_file: Mymean.binaryproto specifies mean value file.Illustratively, if subtracting Mean Parameters is mean_file parameter, artificial intelligence Processor carries out pixel of the input data on the same spatial position to subtract averaging operation, i.e., to each pixel of all pictures Point carries out subtracting averaging operation, and obtained data are that input data subtracts the data after mean value.
Optionally, another implementation of S301 step, comprising:
If the Mean Parameters that subtract are second to subtract Mean Parameters, according to the operator type carried in the executable file The respective function of calling and described second subtracts Mean Parameters, carries out subtracting averaging operation to the channel of the input data.
Wherein, second subtracts Mean Parameters, such as: mean_value parameter respectively represents three channel (i.e. R there are three value Channel, the channel G and channel B) mean value illustratively set the value of mean_value as 104,117,123, then artificial intelligence Processor carries out subtracting mean value to the channel of input data, that is, all channels R subtract 104, all channels G, and to subtract 117, all B logical It is that input data subtracts the data after mean value that road, which subtracts 123 and obtains data,.
S302 zooms in and out processing to the data subtracted after averaging operation according to zooming parameter.
In this step, averaging operation is subtracted to what input data carried out based on artificial intelligence process device in above-mentioned S301 step, Artificial intelligence process device subtracts the data after mean value to this again, zooms in and out processing according to zooming parameter, obtains final data i.e. Input data after being characterized standardization.Wherein, zooming parameter is the same with the above-mentioned Mean Parameters that subtract, and is included in normalizing parameter In, artificial intelligence process device directly can directly acquire use according to execution file.
A kind of data processing method based on Caffe provided in this embodiment, artificial intelligence process device is according to executable text Respective function that the operator type that carries in part is called and subtracts Mean Parameters first input data is carried out to subtract averaging operation, it is then right Data are zoomed in and out according to zooming parameter after subtracting mean value, and the input data after obtaining final sign standardization greatly reduces defeated Enter the otherness in data between each feature.
It should be understood that although each step in the flow chart of Fig. 2-4 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-4 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 5, providing a kind of data processing equipment based on Caffe, comprising: obtain Module 10, definition module 11 and processing module 12, in which:
Module 10 is obtained, for obtaining configuration order;The configuration-direct, which is used to indicate, matches Caffe file progress parameter It sets;
Definition module 11, for defining normalizing parameter and convolution in the Caffe file according to the configuration-direct The operator type of neural network CNN first floor convolutional layer is obtained with postponing Caffe file;The normalizing parameter is indicated to described The input data of CNN convolutional layer carries out the parameter of feature normalization;
Processing module 12 obtains executable file, and will be described for being compiled to described with postponing Caffe file Executable file is run on artificial intelligence process device;The executable file is used to indicate the artificial intelligence process device to institute The input data for stating CNN convolutional layer carries out feature normalization, and executes convolution algorithm to the data after the feature normalization.
A kind of data processing equipment based on Caffe provided in this embodiment, implementing principle and technical effect with it is above-mentioned The embodiment of data processing method based on Caffe is similar, and details are not described herein.
In one embodiment, as shown in fig. 6, providing a kind of data processing equipment based on Caffe, comprising: receive Module 13 and computing module 14, in which:
Receiving module 13, for receiving executable file, the executable file, which is computer equipment, to be postponed according to matching Caffe file is compiled to obtain file;Described with the Caffe file postponed includes normalizing parameter and CNN first floor convolutional layer Operator type;
Computing module 14, for carrying out feature normalization processing to input data, and to spy according to the executable file Input data after levying standardization executes convolution algorithm.
A kind of data processing equipment based on Caffe provided in this embodiment, implementing principle and technical effect with it is above-mentioned The embodiment of data processing method based on Caffe is similar, and details are not described herein.
Specific restriction about the data processing equipment based on Caffe may refer to above for the number based on Caffe According to the restriction of processing method, details are not described herein.Modules in the above-mentioned data processing equipment based on Caffe can all or It is realized by software, hardware and combinations thereof part.Above-mentioned each module can be embedded in the form of hardware or set independently of computer It in processor in standby, can also be stored in a software form in the memory in computer equipment, in order to processor calling Execute the corresponding operation of the above modules.
In one embodiment, the embodiment of the present application also provides a kind of data set based on Caffe, including processor and Memory, the memory are stored with computer program, and the processor performs the steps of when executing the computer program
Obtain configuration order;The configuration order, which is used to indicate, carries out parameter configuration to Caffe file;
According to the configuration order, the operator of normalizing parameter and CNN first floor convolutional layer is defined in the Caffe file Type is obtained with postponing Caffe file;The normalizing parameter indicates to carry out feature to the input data of the CNN convolutional layer Standardized parameter;
It is compiled to described with postponing Caffe file, obtains executable file, and by the executable file artificial It is run on intelligent processor;The executable file is used to indicate the artificial intelligence process device to the defeated of the CNN convolutional layer Enter data and carry out feature normalization, and convolution algorithm is executed to the data after the feature normalization.
Alternatively,
Receive executable file, the executable file, which is computer equipment, to be postponed Caffe file and be compiled according to matching Obtain file;Described includes the operator type of normalizing parameter and CNN convolutional layer with the Caffe file postponed;
According to the executable file, feature normalization processing is carried out to input data, and to feature normalization processing after Input data execute convolution algorithm.
A kind of data processing equipment based on Caffe provided in this embodiment, implementing principle and technical effect with it is above-mentioned The embodiment of data processing method based on Caffe is similar, and details are not described herein.
Referring to shown in Fig. 7, the embodiment of the present application also provides a kind of combined treatment devices comprising above-mentioned to be based on Caffe Data processing equipment, general interconnecting interface and other processing units in addition to the above-mentioned data processing equipment based on Caffe; It is interacted based on the data processing equipment of Caffe and other processing units, the common calculating operation completing user and specifying.Its In, the general/dedicated processes such as other processing units, including central processor CPU, graphics processor GPU, neural network processor One of device or above processor type.Processor quantity included by other processing units is with no restrictions.Other processing Interface of the device as data processing equipment and external data and control based on Caffe, including data are carried, and are completed to this number It is controlled substantially according to the unlatching of processing unit, stopping etc.;Other processing units can also be assisted with the data processing equipment based on Caffe Make common completion processor active task.General interconnecting interface, for being filled in the data processing equipment based on Caffe and other processing Data and control instruction are transmitted between setting.This is obtained from other processing units required defeated based on the data processing equipment of Caffe Enter data, the shared memory of the data processing equipment on piece based on Caffe is written;Control can be obtained from other processing units System instruction, is written the machine learning device of data processing equipment on piece;The data processing equipment based on Caffe can also be read Data in shared memory are simultaneously transferred to other processing units.
Optionally, referring to shown in Fig. 8, said combination processing unit can also include storage device, storage device respectively with It is described to be connected based on the data processing equipment of Caffe with other described processing units.Storage device is for being stored in described be based on The data of the data processing equipment of Caffe and other processing units, the data of operation required for being particularly suitable for are in this base The data that can not be all saved in the storage inside of the data processing equipment of Caffe or other processing units.
The combined treatment device can be used as the SOC on piece of the equipment such as mobile phone, robot, unmanned plane, video monitoring equipment The die area of control section is effectively reduced in system, improves processing speed, reduces overall power.When this situation, the combined treatment The general interconnecting interface of device is connected with certain components of equipment.Certain components for example camera, display, mouse, keyboard, Network interface card, wifi interface.
In one embodiment, the embodiment of the present application also provides a kind of machine learning chips comprising above-mentioned to be based on The data processing equipment and/or combined treatment device of Caffe.
In one embodiment, the embodiment of the present application also provides a kind of chip-packaging structures comprising said chip.
In one embodiment, the embodiment of the present application also provides a kind of boards comprising said chip encapsulating structure. Referring to shown in Fig. 9, above-mentioned board can also include other matching components other than including said chip encapsulating structure 81, The matching component includes but is not limited to: memory device 82, interface arrangement 83 and control device 84;The memory device 82 with it is described Machine learning chip 811 in chip-packaging structure 81 is connected by bus, and for storing data, the memory device 82 can be with Including multiple groups storage unit 821.Storage unit 821 described in each group is connect with the machine learning chip 811 by bus.It can To understand, storage unit 821 described in each group can be DDR SDRAM, and (Double Data Rate SDRAM, Double Data Rate are same Walk dynamic RAM).
DDR, which does not need raising clock frequency, can double to improve the speed of SDRAM.DDR allows the rising in clock pulses Edge and failing edge read data.The speed of DDR is twice of standard SDRAM.In one embodiment, the storage device can be with Including storage unit described in 4 groups.Storage unit described in each group may include multiple DDR4 particles (chip).In one embodiment In, the machine learning chip interior may include 4 72 DDR4 controllers, and 64bit is used in above-mentioned 72 DDR4 controllers In transmission data, 8bit is used for ECC check.It is appreciated that using DDR4-3200 particle in storage unit described in working as each group When, the theoretical bandwidth of data transmission can reach 25600MB/s.In one embodiment, storage unit described in each group includes more A Double Data Rate synchronous DRAM being arranged in parallel.DDR can transmit data twice within a clock cycle.In The controller of setting control DDR in the chip, the control for data transmission and data storage to each storage unit System.
The interface arrangement 83 is electrically connected with the machine learning chip 811 in the chip-packaging structure 81.The interface Device 83 passes for realizing the data between the machine learning chip 811 and external equipment (such as server or computer) It is defeated.Such as in one embodiment, the interface arrangement 83 can be standard PCIE (peripheral component Interconnect express, a kind of high speed serialization computer expansion bus standard) interface.For example, data to be processed by Server is transferred to the machine learning chip by standard PCIE interface, realizes data transfer.Preferably, when using PCIE When 16 interface of 3.0X transmits, theoretical bandwidth can reach 16000MB/s.In another embodiment, the interface arrangement 83 may be used also To be other interfaces, the embodiment of the present application is not intended to limit the specific manifestation form of above-mentioned other interfaces, the interface arrangement It can be realized signaling transfer point.In addition, the calculated result of the machine learning chip 811 is still transmitted by the interface arrangement 83 It returns external equipment (such as server).
The control device 84 is electrically connected with the machine learning chip 811.The control device 84 is used for the core The state of piece is monitored.Specifically, the machine learning chip 811 can pass through SPI (Serial with the control device 84 Peripheral Interface, Serial Peripheral Interface (SPI)) interface electrical connection.The control device may include single-chip microcontroller (Micro Controller Unit, MCU).As the machine learning chip may include multiple data processing equipments based on Caffe and/ Or combined treatment device, multiple loads can be driven.Therefore, the machine learning chip may be at multi-load and light load etc. Different working conditions.It may be implemented by the control device 84 to multiple data processing equipments in the machine learning chip And/or the regulation of the working condition of combined treatment device.
In some embodiments, a kind of electronic equipment has been applied for comprising above-mentioned board.Electronic equipment includes at data Manage device, robot, computer, printer, scanner, tablet computer, intelligent terminal, mobile phone, automobile data recorder, navigator, biography Sensor, server, cloud server, camera, video camera, projector, wrist-watch, earphone, mobile storage, wearable is set camera The standby, vehicles, household electrical appliance, and/or Medical Devices.The vehicles include aircraft, steamer and/or vehicle;The family Electrical appliance includes TV, air-conditioning, micro-wave oven, refrigerator, electric cooker, humidifier, washing machine, electric light, gas-cooker, kitchen ventilator;It is described Medical Devices include Nuclear Magnetic Resonance, B ultrasound instrument and/or electrocardiograph.
Those skilled in the art should also know that embodiment described in this description belongs to alternative embodiment, it is involved And actions and modules not necessarily the application necessary to.In the above-described embodiments, all each to the description of each embodiment Have and stress, there is no the part being described in detail in some embodiment, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the application substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the application Step.And memory above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part for the treatment of process of above-described embodiment is can to pass through journey Sequence is completed to instruct relevant hardware, which can store in a computer-readable memory, memory may include: Flash disk, read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, referred to as: RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the application and Embodiment is expounded, the description of the example is only used to help understand the method for the present application and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the application There is change place, in conclusion the contents of this specification should not be construed as limiting the present application.

Claims (17)

1. a kind of data processing method based on Caffe, which is characterized in that the described method includes:
Obtain configuration order;The configuration order, which is used to indicate, carries out parameter configuration to Caffe file;
According to the configuration order, normalizing parameter and convolutional neural networks C NN first floor volume are defined in the Caffe file The operator type of lamination is obtained with postponing Caffe file;The normalizing parameter indicate to the input data of CN N convolutional layer into The parameter of row feature normalization;Wherein, according to the operator type of the CNN first floor convolutional layer in the CNN first floor convolutional layer The input data is standardized;
It is compiled to described with postponing Caffe file, obtains executable file, and by the executable file in artificial intelligence It is run on processor;The executable file is used to indicate the artificial intelligence process device to the input number of the CNN convolutional layer Convolution algorithm is executed according to progress feature normalization, and to the data after the feature normalization;The calculation of the CNN first floor convolutional layer Subtype is the operator that the artificial intelligence process device can be operated directly.
2. the method according to claim 1, wherein described with to postpone Caffe file further include at artificial intelligence Manage device logic and general processor logic;The artificial intelligence process device logical expressions execute artificial intelligence in the Caffe file The sequence that sentence executes when energy processor layer;The general processor logical expressions execute general procedure in the Caffe file The sequence that sentence executes when device layer;
Then, before the executable file being run on artificial intelligence process device, which comprises
Increase logic switch mark in the executable file according to switching command;The logic switch mark is used to indicate institute The operation for stating CNN convolutional layer is the artificial intelligence process device logic.
3. the method according to claim 1, wherein defining normalizing parameter and CNN in the Caffe file The operator type of first floor convolutional layer is obtained with postponing Caffe file, comprising:
The normalizing parameter is added in the convolution layer parameter in the Caffe file respectively, in the Ca ffe file Factory mode in define the operator type of the CNN first floor convolutional layer, constitute described with postponing Caffe file.
4. the method according to claim 1, wherein the value of the normalizing parameter is according to preset model The data that training obtains.
5. the method according to claim 1, wherein the normalizing parameter includes: to subtract Mean Parameters and scaling Parameter;
Described to subtract Mean Parameters, characterization carries out the input data to subtract averaging operation;
The zooming parameter characterizes the data after subtract to the input data averaging operation and zooms in and out operation.
6. according to the method described in claim 5, it is characterized in that, it is described subtract Mean Parameters include first subtract Mean Parameters or Second subtracts Mean Parameters;
Described first subtracts Mean Parameters, and characterization carries out subtracting mean value to pixel of the input data on the same space position;
Described second subtracts Mean Parameters, and characterization carries out subtracting mean value to the channel of the input data.
7. a kind of data processing method based on Caffe, which is characterized in that the described method includes:
Receive executable file, the executable file, which is computer equipment, to be postponed Caffe file and be compiled to obtain according to matching File;Described includes the operator type of normalizing parameter and CNN first floor convolutional layer with the Caffe file postponed;Wherein, described The operator type of CNN first floor convolutional layer is the operator that people's work intelligent processor can be operated directly;
Input data is rolled up in the CNN first floor according to the operator type of the executable file and the CNN first floor convolutional layer Feature normalization processing is carried out in lamination, and convolution algorithm is executed to feature normalization treated input data.
8. the method according to the description of claim 7 is characterized in that being carried out to input data special according to the executable file Levy standardization, comprising:
Call corresponding function according to the operator type that carries in executable file and subtract Mean Parameters, to the input data into Row subtracts averaging operation;
Processing is zoomed in and out to the data subtracted after averaging operation according to zooming parameter.
9. according to the method described in claim 8, it is characterized in that, described according to the operator type tune carried in executable file With corresponding function and subtract Mean Parameters, the input data carried out to subtract averaging operation, comprising:
If the Mean Parameters that subtract are first to subtract Mean Parameters, called according to the operator type carried in the executable file Respective function and described first subtract Mean Parameters, pixel of the input data on the same space position is carried out subtracting mean value Operation.
10. according to the method described in claim 8, it is characterized in that, described according to the operator type carried in executable file The respective function of calling and subtract Mean Parameters, the input data carried out to subtract averaging operation, comprising:
If the Mean Parameters that subtract are second to subtract Mean Parameters, called according to the operator type carried in the executable file Respective function and described second subtract Mean Parameters, the channel in the input data is carried out to subtract averaging operation.
11. a kind of data processing equipment based on Caffe, which is characterized in that described device includes:
Module is obtained, for obtaining configuration order;The configuration-direct, which is used to indicate, carries out parameter configuration to Caffe file;
Definition module, for defining normalizing parameter and CNN first floor volume in the Caffe file according to the configuration-direct The operator type of lamination is obtained with postponing Caffe file;The normalizing parameter indicate to the input data of CNN convolutional layer into The parameter of row feature normalization;Wherein, according to the operator type of the CNN first floor convolutional layer in the CNN first floor convolutional layer The input data is standardized;
Processing module obtains executable file, and described will can be performed for being compiled to described with postponing Caffe file File is run on artificial intelligence process device;The executable file is used to indicate the artificial intelligence process device to the CNN The input data of convolutional layer carries out feature normalization, and executes convolution algorithm to the data after the feature normalization;The CNN The operator type of first floor convolutional layer is the operator that the artificial intelligence process device can be operated directly.
12. a kind of data processing equipment based on Caffe, which is characterized in that described device includes:
Receiving module, for receiving executable file, the executable file, which is computer equipment, postpones Caffe file according to matching It is compiled to obtain file;Described includes the operator class of normalizing parameter and C NN first floor convolutional layer with the Caffe file postponed Type;Wherein, the operator type of the CNN first floor convolutional layer is the operator that people's work intelligent processor can be operated directly;
Computing module, for being existed according to the operator type of the executable file and the CNN first floor convolutional layer to input data Feature normalization processing is carried out in the CNN first floor convolutional layer, and convolution is executed to feature normalization treated input data Operation.
13. a kind of data processing equipment based on Caffe, including memory and processor, the memory are stored with computer Program, which is characterized in that the processor realizes side described in any one of claims 1 to 10 when executing the computer program The step of method.
14. a kind of combined treatment device, which is characterized in that the combined treatment device includes being based on as claimed in claim 13 The data processing equipment of Caffe, general interconnecting interface and other processing in addition to the data processing equipment based on Caffe Device;It is described to be interacted based on the data processing equipment of Caffe and other processing units.
15. a kind of machine learning chip, which is characterized in that the machine learning chip includes combination as claimed in claim 14 Processing unit.
16. a kind of board, which is characterized in that the board includes machine learning chip as claimed in claim 15.
17. a kind of electronic equipment, which is characterized in that the electronic equipment includes board as claimed in claim 16.
CN201811639458.6A 2018-12-29 2018-12-29 Data processing method, device and Related product based on Caffe Active CN109754011B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811639458.6A CN109754011B (en) 2018-12-29 2018-12-29 Data processing method, device and Related product based on Caffe

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811639458.6A CN109754011B (en) 2018-12-29 2018-12-29 Data processing method, device and Related product based on Caffe

Publications (2)

Publication Number Publication Date
CN109754011A CN109754011A (en) 2019-05-14
CN109754011B true CN109754011B (en) 2019-11-12

Family

ID=66404395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811639458.6A Active CN109754011B (en) 2018-12-29 2018-12-29 Data processing method, device and Related product based on Caffe

Country Status (1)

Country Link
CN (1) CN109754011B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766996A (en) * 2018-12-29 2019-05-17 北京中科寒武纪科技有限公司 Optimization method, device, storage medium and the system of convolutional neural networks
CN110289862B (en) * 2019-06-20 2023-04-28 成都有据量化科技有限公司 Compression and decompression method and device for financial data and storage medium
WO2021000638A1 (en) * 2019-07-03 2021-01-07 上海寒武纪信息科技有限公司 Compiling method and device for deep learning algorithm, and related product
CN110458286B (en) * 2019-08-14 2022-02-08 中科寒武纪科技股份有限公司 Data processing method, data processing device, computer equipment and storage medium
CN112667303B (en) * 2019-09-27 2023-04-07 杭州海康威视数字技术股份有限公司 Method and device for processing artificial intelligence task
CN111325339A (en) * 2020-02-13 2020-06-23 上海寒武纪信息科技有限公司 Method for executing learning task by artificial intelligence processor and related product
CN113326942A (en) * 2020-02-28 2021-08-31 上海商汤智能科技有限公司 Model reasoning method and device, electronic equipment and storage medium
CN113361703B (en) * 2020-03-06 2023-09-05 杭州海康威视数字技术股份有限公司 Data processing method and device
CN113762518A (en) * 2020-06-02 2021-12-07 中科寒武纪科技股份有限公司 Data processing method, data processing device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107016405A (en) * 2017-02-24 2017-08-04 中国科学院合肥物质科学研究院 A kind of insect image classification method based on classification prediction convolutional neural networks
CN107563439A (en) * 2017-08-31 2018-01-09 湖南麓川信息科技有限公司 A kind of model for identifying cleaning food materials picture and identification food materials class method for distinguishing
CN108280397A (en) * 2017-12-25 2018-07-13 西安电子科技大学 Human body image hair detection method based on depth convolutional neural networks
US20180314935A1 (en) * 2017-04-28 2018-11-01 Intel Corporation Training with adaptive runtime and precision profiling
CN108986125A (en) * 2017-11-30 2018-12-11 成都通甲优博科技有限责任公司 Object edge extracting method, device and electronic equipment
CN109063569A (en) * 2018-07-04 2018-12-21 北京航空航天大学 A kind of semantic class change detecting method based on remote sensing image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106507188A (en) * 2016-11-25 2017-03-15 南京中密信息科技有限公司 A kind of video TV station symbol recognition device and method of work based on convolutional neural networks
CN106980817A (en) * 2017-02-27 2017-07-25 南京邮电大学 A kind of terrified video frequency identifying method based on Caffe frameworks
CN108108746B (en) * 2017-09-13 2021-04-09 湖南理工学院 License plate character recognition method based on Caffe deep learning framework

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107016405A (en) * 2017-02-24 2017-08-04 中国科学院合肥物质科学研究院 A kind of insect image classification method based on classification prediction convolutional neural networks
US20180314935A1 (en) * 2017-04-28 2018-11-01 Intel Corporation Training with adaptive runtime and precision profiling
CN107563439A (en) * 2017-08-31 2018-01-09 湖南麓川信息科技有限公司 A kind of model for identifying cleaning food materials picture and identification food materials class method for distinguishing
CN108986125A (en) * 2017-11-30 2018-12-11 成都通甲优博科技有限责任公司 Object edge extracting method, device and electronic equipment
CN108280397A (en) * 2017-12-25 2018-07-13 西安电子科技大学 Human body image hair detection method based on depth convolutional neural networks
CN109063569A (en) * 2018-07-04 2018-12-21 北京航空航天大学 A kind of semantic class change detecting method based on remote sensing image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Caffe2-CPU/GPU部署模式切换;AIHGF;《https://blog.csdn.net/zziahgf/article/details/78952761》;20180102;参见代码 *
Caffe学习(四)数据层及参数设置;遍地流金;《https://blog.csdn.net/u012177034/article/details/52134205》;20160806;参见第一、二节 *
数据预处理--输入归一化/标准化/放缩;whitenightwu;《https://blog.csdn.net/wydbyxr/article/details/84750887》;20181203;参见第三节 *

Also Published As

Publication number Publication date
CN109754011A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109754011B (en) Data processing method, device and Related product based on Caffe
EP3660628B1 (en) Dynamic voltage frequency scaling device and method
CN109543832A (en) A kind of computing device and board
CN110096310A (en) Operation method, device, computer equipment and storage medium
CN110321761A (en) A kind of Activity recognition method, terminal device and computer readable storage medium
CN109739703A (en) Adjust wrong method and Related product
CN109725700A (en) Dynamic voltage adjustment frequency modulation device and method
CN109754084A (en) Processing method, device and the Related product of network structure
CN110163349A (en) A kind of calculation method and device of network model
CN109726800B (en) Operation method, device and related product
CN110059797A (en) A kind of computing device and Related product
CN109670581A (en) A kind of computing device and board
CN109711540A (en) A kind of computing device and board
CN109670578A (en) Neural network first floor convolution layer data processing method, device and computer equipment
CN109739514A (en) Parameter processing method and Related product
CN109740746A (en) Operation method, device and Related product
CN110059812A (en) Impulsive neural networks operation chip and related operation method
CN109740730A (en) Operation method, device and Related product
CN111340202B (en) Operation method, device and related product
CN110020720B (en) Operator splicing method and device
CN111949317B (en) Instruction processing method and device and related product
CN111047030A (en) Operation method, operation device, computer equipment and storage medium
CN111061507A (en) Operation method, operation device, computer equipment and storage medium
CN112396169B (en) Operation method, device, computer equipment and storage medium
CN111353595A (en) Operation method, device and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100190 room 644, comprehensive research building, No. 6 South Road, Haidian District Academy of Sciences, Beijing

Patentee after: Zhongke Cambrian Technology Co., Ltd

Address before: 100190 room 644, comprehensive research building, No. 6 South Road, Haidian District Academy of Sciences, Beijing

Patentee before: Beijing Zhongke Cambrian Technology Co., Ltd.