CN108629377A - A kind of the loss value-acquiring method and device of disaggregated model - Google Patents

A kind of the loss value-acquiring method and device of disaggregated model Download PDF

Info

Publication number
CN108629377A
CN108629377A CN201810443376.8A CN201810443376A CN108629377A CN 108629377 A CN108629377 A CN 108629377A CN 201810443376 A CN201810443376 A CN 201810443376A CN 108629377 A CN108629377 A CN 108629377A
Authority
CN
China
Prior art keywords
penalty values
sub
default
disaggregated model
classification
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.)
Pending
Application number
CN201810443376.8A
Other languages
Chinese (zh)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201810443376.8A priority Critical patent/CN108629377A/en
Publication of CN108629377A publication Critical patent/CN108629377A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/217Validation; Performance evaluation; Active pattern learning techniques

Abstract

An embodiment of the present invention provides the loss value-acquiring methods and device of a kind of disaggregated model.Method through the embodiment of the present invention, when obtaining the penalty values for presetting disaggregated model, sample data the first default classification belonging in multiple default classification is not only used, also use the sample data is not belonging in multiple default classification second default classification, and then the first sub- penalty values for presetting disaggregated model are obtained using gradient descent algorithm according to the first default classification, then the second sub- penalty values for presetting disaggregated model are obtained using gradient ascent algorithm according to the second default classification, the penalty values for presetting disaggregated model are obtained further according to the first sub- penalty values and the second sub- penalty values.Compared to the penalty values for obtaining default disaggregated model only according to the default classification of sub-fraction belonging to sample data, the embodiment of the present invention can improve the accuracy of the penalty values of the default disaggregated model got, and then improve the accuracy that optimization obtains default disaggregated model to the classification of data.

Description

A kind of the loss value-acquiring method and device of disaggregated model
Technical field
The present invention relates to field of computer technology, more particularly to the loss value-acquiring method and dress of a kind of disaggregated model It sets.
Background technology
Recently, deep learning has obtained answering extensively in related fields such as video image, speech recognition, natural language processings With.An important branch of the convolutional neural networks as deep learning is due to its superpower capability of fitting and complete end to end Office's optimization ability so that after application convolutional neural networks, precision of prediction is substantially improved video image classifier task.
Although current disaggregated model is provided with image certain classification capacity, it still will appear a large amount of pre- sniffings Accidentally the case where.Therefore, the penalty values that sample data obtains disaggregated model are often required to use, penalty values Optimum Classification mould is used Type.
Wherein, it needs that a large amount of default classification is arranged in advance, then marks the default classification belonging to sample data.Later When obtaining the penalty values of disaggregated model using sample data, can be obtained point using the default classification belonging to sample data The penalty values of class model.
However, it is found by the inventors that the default classification belonging to sample data is only often one small in a large amount of default classification Part, in this way, it is relatively low come the accuracy of the penalty values of the disaggregated model got only according to the default classification of sub-fraction, it uses The accuracy that the lower penalty values of accuracy optimize to obtain classification of the disaggregated model to data is relatively low.
Invention content
In order to improve the accuracy for optimizing classification of the obtained disaggregated model to data, then need to improve the loss got The accuracy of value, in order to improve the accuracy of the penalty values got, the embodiment of the present invention shows a kind of damage of disaggregated model Lose value-acquiring method and device.
In a first aspect, the embodiment of the present invention shows a kind of loss value-acquiring method of disaggregated model, the method includes:
In multiple default classification, determine that the first default classification that sample data belongs to and the sample data do not belong to In the second default classification;
The the first sub- penalty values for presetting disaggregated model are obtained using gradient descent algorithm according to the described first default classification;
The second son loss of the default disaggregated model is obtained using gradient ascent algorithm according to the described second default classification Value;
The penalty values of the default disaggregated model are obtained according to the described first sub- penalty values and the second sub- penalty values.
It is described to be obtained with the second sub- penalty values according to the described first sub- penalty values in an optional realization method The penalty values of the default disaggregated model, including:
Described the is obtained according to the quantity of the quantity of the default classification of first determined and the second default classification determined Corresponding first weight of one sub- penalty values and corresponding second weight of the second sub- penalty values;
Calculate the first product between first weight and the first sub- penalty values;
Calculate the second product between second weight and the second sub- penalty values;
The difference between first product and second product is calculated, and as the penalty values.
In an optional realization method, described first it is default be classified as it is multiple;
First son for being obtained default disaggregated model using gradient descent algorithm according to the described first default classification is lost Value, including:
The third that the default disaggregated model corresponds to each the first default classification respectively is obtained using gradient descent algorithm Sub- penalty values;
By the sub- penalty values summation of obtained whole thirds, the described first sub- penalty values are obtained.
In an optional realization method, described second it is default be classified as it is multiple;
Second son for obtaining the default disaggregated model using gradient ascent algorithm according to the described second default classification Penalty values, including:
The default disaggregated model, which is obtained, using gradient descent algorithm corresponds to each second default 4 to classify respectively Sub- penalty values;
All the 4th sub- penalty values summations that will be obtained, obtain the described second sub- penalty values.
Second aspect, the embodiment of the present invention show that a kind of penalty values acquisition device of disaggregated model, described device include:
Determining module determines the sample data belongs to first default classification and described in multiple default classification The second default classification that sample data is not belonging to;
First acquisition module presets disaggregated model for being obtained using gradient descent algorithm according to the described first default classification The first sub- penalty values;
Second acquisition module, for obtaining the default classification using gradient ascent algorithm according to the described second default classification Second sub- penalty values of model;
Third acquisition module, for obtaining described default point according to the described first sub- penalty values and the second sub- penalty values The penalty values of class model.
In an optional realization method, the third acquisition module includes:
First acquisition unit, for according to the determine first default quantity classified and the second default classification determined Quantity obtain corresponding first weight of the first sub- penalty values and corresponding second weight of the second sub- penalty values;
First computing unit, for calculating the first product between first weight and the first sub- penalty values;
Second computing unit, for calculating the second product between second weight and the second sub- penalty values;
Third computing unit, for calculating the difference between first product and second product, and as described Penalty values.
In an optional realization method, described first it is default be classified as it is multiple;
First acquisition module includes:
Second acquisition unit, for use gradient descent algorithm obtain the default disaggregated model correspond to respectively each The sub- penalty values of third of one default classification;
First summation unit obtains the described first sub- penalty values for the sub- penalty values of obtained whole thirds to be summed.
In an optional realization method, described second it is default be classified as it is multiple;
Second acquisition module includes:
Third acquiring unit, for use gradient descent algorithm obtain the default disaggregated model correspond to respectively each 4th sub- penalty values of two default classification;
Second summation unit, all the 4th sub- penalty values summations for that will obtain, obtains the described second sub- penalty values.
The third aspect, the embodiment of the present invention show a kind of terminal, including:Memory, processor and it is stored in described deposit On reservoir and the penalty values of disaggregated model that can run on the processor obtain program, and the penalty values of the disaggregated model obtain The step of loss value-acquiring method of disaggregated model as described in relation to the first aspect is realized when program fetch is executed by the processor.
Fourth aspect, the embodiment of the present invention show a kind of computer readable storage medium, which is characterized in that the calculating The penalty values that disaggregated model is stored on machine readable storage medium storing program for executing obtain program, and the penalty values of the disaggregated model obtain program quilt The step of loss value-acquiring method of disaggregated model as described in relation to the first aspect is realized when processor executes.
Compared with prior art, the embodiment of the present invention includes following advantages:
Method through the embodiment of the present invention not only used sample number when obtaining the penalty values for presetting disaggregated model According to belonging the first default classification in multiple default classification, also uses sample data and be not belonging in multiple default classification The second default classification, and then obtained using gradient descent algorithm according to the first default classification and to preset the first son of disaggregated model and damage Then mistake value obtains the second sub- penalty values for presetting disaggregated model, then root according to the second default classification using gradient ascent algorithm The penalty values for presetting disaggregated model are obtained according to the first sub- penalty values and the second sub- penalty values.Compared to only according to sample data institute The default classification of the sub-fraction that belongs to obtains the penalty values for presetting disaggregated model, the embodiment of the present invention can improve get it is pre- If the accuracy of the penalty values of disaggregated model, and then improve the accuracy that optimization obtains default disaggregated model to the classification of data.
Description of the drawings
Fig. 1 is a kind of step flow chart of the loss value-acquiring method embodiment of disaggregated model of the present invention;
Fig. 2 is a kind of structure diagram of the penalty values acquisition device embodiment of disaggregated model of the present invention;
Fig. 3 is a kind of structure diagram of terminal embodiment shown in the present invention.
Specific implementation mode
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings and specific real Applying mode, the present invention is described in further detail.
Referring to Fig.1, a kind of step flow chart of the loss value-acquiring method embodiment of disaggregated model of the present invention is shown, It can specifically include following steps:
In step S101, in multiple default classification, the sample data belongs to first default classification and sample are determined The second default classification that data are not belonging to;
In embodiments of the present invention, sample data can be that image also may be used for example, can be the single-frame images in video To be only a multi-media image.
In embodiments of the present invention, the taxonomic hierarchies according to data set are needed in advance, are determined multiple default classification, are then joined The default semantic hierarchical tree that knowledge mapping structure includes multiple default classification is examined, according to constructed default semantic hierarchical tree structure One default disaggregated model with different semantic levels.Default disaggregated model includes multiple model parameters, of the invention real It applies in example, in order to enable default disaggregated model reaches requirement to the accuracy of the classification of data, needs to continue to optimize default classification Model parameter in model, wherein default point can be obtained using sample data by the flow of step S101~step S104 The penalty values of class model, it includes multiple moulds that the penalty values further according to default disaggregated model, which continue to optimize default disaggregated model, later Shape parameter.
In embodiments of the present invention, in multiple default classification, technical staff can mark what sample data belonged in advance First default classification, the first default sorting group for then belonging to the sample data of the Data Identification of sample data and mark are pairs of In the first correspondence answered list item, and be stored between stored Data Identification and default classification.
In this way, in embodiments of the present invention, can be between stored Data Identification and default classification it is first corresponding Default classification corresponding with the Data Identification of sample data, and first default point belonged to as sample data are searched in relationship Class.
In embodiments of the present invention, in multiple default classification, technical staff can mark sample data and be not belonging in advance The second default classification, the second default sorting group for being then not belonging to the sample data of the Data Identification of sample data and mark At corresponding table item, and in the second correspondence being stored between stored Data Identification and default classification.
In this way, in embodiments of the present invention, can be between stored Data Identification and default classification it is second corresponding It searches corresponding with the Data Identification of sample data default classification in relationship, and second is preset as what sample data was not belonging to Classification.
For example, default classification includes:Classify " dog ", classification " cat ", classification " Ha Qishi ", classify " golden hair ", classification " Persian Cat " and classification " blue cat ".Then sample data is " blue cat ", and in multiple default classification, then sample data " blue cat " belongs to First default classification includes classification " cat " and classification " blue cat ", and the second default classification that sample data " blue cat " belongs to includes classification " dog ", classification " Ha Qishi ", classification " golden hair " and classification " Persian cat ".
In step s 102, the first son for presetting disaggregated model is obtained using gradient descent algorithm according to the first default classification Penalty values;
In embodiments of the present invention, if sample data belong to first it is default be classified as one, gradient can be used Descent algorithm, which obtains, presets the penalty values that disaggregated model corresponds to the first default classification, and as the first sub- penalty values.
If sample data belong to first it is default be classified as multiple, gradient descent algorithm can be used to obtain default point Class model corresponds to the sub- penalty values of third of each the first default classification respectively, and then whole sub- penalty values of third are summed, Obtain the first sub- penalty values.
In step s 103, the second son for presetting disaggregated model is obtained using gradient ascent algorithm according to the second default classification Penalty values;
In embodiments of the present invention, if sample data be not belonging to second it is default be classified as one, ladder can be used It spends descent algorithm and obtains the penalty values for presetting the second default classification of disaggregated model correspondence, and as the second sub- penalty values.
If sample data be not belonging to second it is default be classified as multiple, gradient descent algorithm can be used to obtain default Disaggregated model corresponds to the 4th sub- penalty values of each the second default classification respectively, then seeks the 4th whole sub- penalty values With obtain the second sub- penalty values.
In step S104, the penalty values for presetting disaggregated model are obtained according to the first sub- penalty values and the second sub- penalty values.
This step can be realized by following flow, including:
11), the is obtained according to the quantity of the quantity of the determine first default classification and the second default classification determined Corresponding first weight of one sub- penalty values and corresponding second weight of the second sub- penalty values;
In embodiments of the present invention, since the first sub- penalty values are obtained using gradient descent algorithm according to the first default classification It gets, therefore, corresponding first weight of the first sub- penalty values is negative.
And preset classification according to second due to the first sub- penalty values and got using gradient ascent algorithm, the Corresponding second weight of two sub- penalty values is positive number.
Wherein, the first weight can be the ratio of the quantity and the quantity of multiple default classification of the first negative default classification, Second weight can be the ratio of the quantity and the quantity of multiple default classification of the second default classification.Certainly, according to determining The quantity of the quantity of first default classification and the second default classification determined, can also obtain the first son otherwise Corresponding first weight of penalty values and corresponding second weight of the second sub- penalty values, the embodiment of the present invention are not limited this.
12) the first product between the first weight and the first sub- penalty values, is calculated;
13) the second product between the second weight and the second sub- penalty values, is calculated;
14) difference between the first product and the second product, is calculated, and as the penalty values of default disaggregated model.
In embodiments of the present invention, since the first sub- penalty values are obtained using gradient descent algorithm, and the first product It is multiplied to obtain with first-loss value by the first weight and the first weight is negative, therefore, being equivalent to the first product is also It is obtained using gradient descent algorithm.
Since the second sub- penalty values are obtained using gradient ascent algorithm, and the second product is by the second weight and second Penalty values are multiplied and the second weight is positive number, and therefore, it is also to be obtained using gradient ascent algorithm to be equivalent to the second product It arrives.
Therefore, the second product is subtracted using the first product, is equivalent to and adds negative sign to obtain the phase of the second product to the second product Anti- number:Third product is equivalent to and has obtained third product using negative gradient ascent algorithm, and then is equivalent to and declined using gradient Algorithm has obtained third product, and the difference between the first product of calculating and the second product is equivalent to calculating and uses gradient descent algorithm The first obtained product and the third sum of products obtained using gradient descent algorithm, thus penalty values its actually use it is first pre- What if classification and the second default classification were obtained according to gradient descent algorithm.
In embodiments of the present invention, in multiple default classification, the sample data belongs to first default classification is determined, and The second default classification that sample data is not belonging to;It is obtained using gradient descent algorithm according to the first default classification and presets disaggregated model The first sub- penalty values;The the second son loss for presetting disaggregated model is obtained using gradient ascent algorithm according to the second default classification Value;The penalty values for presetting disaggregated model are obtained according to the first sub- penalty values and the second sub- penalty values.
Method through the embodiment of the present invention not only used sample number when obtaining the penalty values for presetting disaggregated model According to belonging the first default classification in multiple default classification, also uses sample data and be not belonging in multiple default classification The second default classification, and then obtained using gradient descent algorithm according to the first default classification and to preset the first son of disaggregated model and damage Then mistake value obtains the second sub- penalty values for presetting disaggregated model, then root according to the second default classification using gradient ascent algorithm The penalty values for presetting disaggregated model are obtained according to the first sub- penalty values and the second sub- penalty values.Compared to only according to sample data institute The default classification of the sub-fraction that belongs to obtains the penalty values for presetting disaggregated model, the embodiment of the present invention can improve get it is pre- If the accuracy of the penalty values of disaggregated model, and then improve the accuracy that optimization obtains default disaggregated model to the classification of data.
It should be noted that for embodiment of the method, for simple description, therefore it is all expressed as a series of action group It closes, but those skilled in the art should understand that, the embodiment of the present invention is not limited by the described action sequence, because according to According to the embodiment of the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented Necessary to example.
With reference to Fig. 2, a kind of structure diagram of the penalty values acquisition device embodiment of disaggregated model of the present invention, the dress are shown It sets and can specifically include following module:
Determining module 11, the first default classification belonged in multiple default classification, determining sample data, Yi Jisuo State the sample data is not belonging to second default classification;
First acquisition module 12, for obtaining default classification mould using gradient descent algorithm according to the described first default classification First sub- penalty values of type;
Second acquisition module 13, for obtaining described default point using gradient ascent algorithm according to the described second default classification Second sub- penalty values of class model;
Third acquisition module 14, it is described default for being obtained according to the described first sub- penalty values and the second sub- penalty values The penalty values of disaggregated model.
In an optional realization method, the third acquisition module 14 includes:
First acquisition unit, for according to the determine first default quantity classified and the second default classification determined Quantity obtain corresponding first weight of the first sub- penalty values and corresponding second weight of the second sub- penalty values;
First computing unit, for calculating the first product between first weight and the first sub- penalty values;
Second computing unit, for calculating the second product between second weight and the second sub- penalty values;
Third computing unit, for calculating the difference between first product and second product, and as described Penalty values.
In an optional realization method, described first it is default be classified as it is multiple;
First acquisition module 12 includes:
Second acquisition unit, for use gradient descent algorithm obtain the default disaggregated model correspond to respectively each The sub- penalty values of third of one default classification;
First summation unit obtains the described first sub- penalty values for the sub- penalty values of obtained whole thirds to be summed.
In an optional realization method, described second it is default be classified as it is multiple;
Second acquisition module 13 includes:
Third acquiring unit, for use gradient descent algorithm obtain the default disaggregated model correspond to respectively each 4th sub- penalty values of two default classification;
Second summation unit, all the 4th sub- penalty values summations for that will obtain, obtains the described second sub- penalty values.
Through the embodiment of the present invention, when obtaining the penalty values for presetting disaggregated model, sample data is not only used more The first belonging default classification, also uses sample data is not belonging in multiple default classification second in a default classification Default classification, and then the first sub- penalty values for presetting disaggregated model are obtained using gradient descent algorithm according to the first default classification, Then the second sub- penalty values for presetting disaggregated model are obtained using gradient ascent algorithm according to the second default classification, further according to first Sub- penalty values and the second sub- penalty values obtain the penalty values for presetting disaggregated model.Compared to only according to belonging to sample data The default classification of sub-fraction obtains the penalty values for presetting disaggregated model, and the embodiment of the present invention can improve the default classification got The accuracy of the penalty values of model, and then improve the accuracy that optimization obtains default disaggregated model to the classification of data.
For device embodiments, since it is basically similar to the method embodiment, so fairly simple, the correlation of description Place illustrates referring to the part of embodiment of the method.
The present invention also shows a kind of terminal, which may include:Memory, processor and storage are on a memory simultaneously The penalty values for the disaggregated model that can be run on a processor obtain program, and the penalty values of disaggregated model obtain program and held by processor The step of loss value-acquiring method of any one heretofore described disaggregated model is realized when row.
Fig. 3 is a kind of block diagram of terminal 600 shown according to an exemplary embodiment.For example, terminal 600 can be mobile Phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, Personal digital assistant etc..
With reference to Fig. 3, terminal 600 may include following one or more components:Processing component 602, memory 604, power supply Component 606, multimedia component 608, audio component 610, the interface 612 of input/output (I/O), sensor module 614, and Communication component 616.
The integrated operation of 602 usual control device 600 of processing component, such as with display, call, data communication, phase Machine operates and record operates associated operation.Processing component 602 may include that one or more processors 620 refer to execute It enables, to complete all or part of step of the loss value-acquiring method of above-mentioned disaggregated model.In addition, processing component 602 can wrap One or more modules are included, convenient for the interaction between processing component 602 and other assemblies.For example, processing component 602 may include Multi-media module, to facilitate the interaction between multimedia component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in terminal 600.These data are shown Example includes instruction for any application program or method that are operated in terminal 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 606 provides electric power for the various assemblies of terminal 600.Power supply module 606 may include power management system System, one or more power supplys and other generated with for terminal 600, management and the associated component of distribution electric power.
Multimedia component 608 is included in the screen of one output interface of offer between the terminal 600 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 608 includes a front camera and/or rear camera.When terminal 600 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when terminal 600 is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loud speaker, is used for exports audio signal.
I/O interfaces 612 provide interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for terminal 600 is commented Estimate.For example, sensor module 614 can detect the state that opens/closes of terminal 600, and the relative positioning of component, for example, it is described Component is the display and keypad of terminal 600, and sensor module 614 can be with 600 1 components of detection terminal 600 or terminal Position change, the existence or non-existence that user contacts with terminal 600,600 orientation of device or acceleration/deceleration and terminal 600 Temperature change.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between terminal 600 and other equipment.Terminal 600 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.In an exemplary implementation In example, communication component 616 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 616 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 600 can be believed by one or more application application-specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, the penalty values for executing disaggregated model obtain Method is taken, specifically, this method includes:
In multiple default classification, determine that the first default classification that sample data belongs to and the sample data do not belong to In the second default classification;
The the first sub- penalty values for presetting disaggregated model are obtained using gradient descent algorithm according to the described first default classification;
The second son loss of the default disaggregated model is obtained using gradient ascent algorithm according to the described second default classification Value;
The penalty values of the default disaggregated model are obtained according to the described first sub- penalty values and the second sub- penalty values.
It is described to be obtained with the second sub- penalty values according to the described first sub- penalty values in an optional realization method The penalty values of the default disaggregated model, including:
Described the is obtained according to the quantity of the quantity of the default classification of first determined and the second default classification determined Corresponding first weight of one sub- penalty values and corresponding second weight of the second sub- penalty values;
Calculate the first product between first weight and the first sub- penalty values;
Calculate the second product between second weight and the second sub- penalty values;
The difference between first product and second product is calculated, and as the penalty values.
In an optional realization method, described first it is default be classified as it is multiple;
First son for being obtained default disaggregated model using gradient descent algorithm according to the described first default classification is lost Value, including:
The third that the default disaggregated model corresponds to each the first default classification respectively is obtained using gradient descent algorithm Sub- penalty values;
By the sub- penalty values summation of obtained whole thirds, the described first sub- penalty values are obtained.
In an optional realization method, described second it is default be classified as it is multiple;
Second son for obtaining the default disaggregated model using gradient ascent algorithm according to the described second default classification Penalty values, including:
The default disaggregated model, which is obtained, using gradient descent algorithm corresponds to each second default 4 to classify respectively Sub- penalty values;
All the 4th sub- penalty values summations that will be obtained, obtain the described second sub- penalty values.
In the exemplary embodiment, it includes the non-transitorycomputer readable storage medium instructed, example to additionally provide a kind of Such as include the memory 604 of instruction, above-metioned instruction can be executed by the processor 620 of terminal 600 to complete above-mentioned disaggregated model Lose value-acquiring method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..When the instruction in storage medium is executed by the processor of terminal When so that terminal is able to carry out the step of loss value-acquiring method of any one heretofore described disaggregated model.
Provided herein the loss value-acquiring method of disaggregated model not with any certain computer, virtual system or other Equipment is inherently related.Various general-purpose systems can also be used together with teaching based on this.As described above, construction tool Structure required by the system of the present invention program is obvious.In addition, the present invention is not also directed to any certain programmed language Speech.It should be understood that the content of various programming languages realization invention described herein can be utilized, and above to language-specific The description done is to disclose the preferred forms of the present invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, such as right As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool Thus claims of body embodiment are expressly incorporated in the specific implementation mode, wherein each claim conduct itself The separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in the one or more equipment different from the embodiment.It can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of arbitrary It mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization, or to run on one or more processors Software module realize, or realized with combination thereof.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) realize the penalty values acquisition side of disaggregated model according to the ... of the embodiment of the present invention The some or all functions of some or all components in method.The present invention is also implemented as described here for executing Method some or all equipment or program of device (for example, computer program and computer program product).This The program of the realization present invention of sample can may be stored on the computer-readable medium, or can be with one or more signal Form.Such signal can be downloaded from internet website and be obtained, and either be provided on carrier signal or with any other Form provides.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference mark between bracket should not be configured to limitations on claims.Word " comprising " does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be by the same hardware branch To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and be run after fame Claim.

Claims (10)

1. a kind of loss value-acquiring method of disaggregated model, which is characterized in that the method includes:
In multiple default classification, determine what the first default classification that sample data belongs to and the sample data were not belonging to Second default classification;
The the first sub- penalty values for presetting disaggregated model are obtained using gradient descent algorithm according to the described first default classification;
The second sub- penalty values of the default disaggregated model are obtained using gradient ascent algorithm according to the described second default classification;
The penalty values of the default disaggregated model are obtained according to the described first sub- penalty values and the second sub- penalty values.
2. according to the method described in claim 1, it is characterized in that, it is described according to the described first sub- penalty values and it is described second son Penalty values obtain the penalty values of the default disaggregated model, including:
First son is obtained according to the quantity of the quantity of the default classification of first determined and the second default classification determined Corresponding first weight of penalty values and corresponding second weight of the second sub- penalty values;
Calculate the first product between first weight and the first sub- penalty values;
Calculate the second product between second weight and the second sub- penalty values;
The difference between first product and second product is calculated, and as the penalty values.
3. according to the method described in claim 1, it is characterized in that, described first it is default be classified as it is multiple;
It is described to obtain the first sub- penalty values for presetting disaggregated model, packet using gradient descent algorithm according to the described first default classification It includes:
The third damage that the default disaggregated model corresponds to each the first default classification respectively is obtained using gradient descent algorithm Mistake value;
By the sub- penalty values summation of obtained whole thirds, the described first sub- penalty values are obtained.
4. according to the method described in claim 1, it is characterized in that, described second it is default be classified as it is multiple;
Second son for being obtained the default disaggregated model using gradient ascent algorithm according to the described second default classification is lost Value, including:
The 4th son damage that the default disaggregated model corresponds to each the second default classification respectively is obtained using gradient descent algorithm Mistake value;
All the 4th sub- penalty values summations that will be obtained, obtain the described second sub- penalty values.
5. a kind of penalty values acquisition device of disaggregated model, which is characterized in that described device includes:
Determining module is used in multiple default classification, determines the first default classification and the sample that sample data belongs to The second default classification that data are not belonging to;
First acquisition module presets the of disaggregated model for being obtained using gradient descent algorithm according to the described first default classification One sub- penalty values;
Second acquisition module, for obtaining the default disaggregated model using gradient ascent algorithm according to the described second default classification The second sub- penalty values;
Third acquisition module, for obtaining the default classification mould according to the described first sub- penalty values and the second sub- penalty values The penalty values of type.
6. device according to claim 5, which is characterized in that the third acquisition module includes:
First acquisition unit, for the number according to the determine first default quantity classified and the second default classification determined Amount obtains corresponding first weight of the first sub- penalty values and corresponding second weight of the second sub- penalty values;
First computing unit, for calculating the first product between first weight and the first sub- penalty values;
Second computing unit, for calculating the second product between second weight and the second sub- penalty values;
Third computing unit, for calculating the difference between first product and second product, and as the loss Value.
7. device according to claim 5, which is characterized in that described first it is default be classified as it is multiple;
First acquisition module includes:
Second acquisition unit, for using gradient descent algorithm to obtain the default disaggregated model, to correspond to each respectively first pre- If the sub- penalty values of third of classification;
First summation unit obtains the described first sub- penalty values for the sub- penalty values of obtained whole thirds to be summed.
8. device according to claim 5, which is characterized in that described second it is default be classified as it is multiple;
Second acquisition module includes:
Third acquiring unit, for using gradient descent algorithm to obtain the default disaggregated model, to correspond to each respectively second pre- If the 4th sub- penalty values of classification;
Second summation unit, all the 4th sub- penalty values summations for that will obtain, obtains the described second sub- penalty values.
9. a kind of terminal, which is characterized in that including:It memory, processor and is stored on the memory and can be at the place The penalty values of the disaggregated model run on reason device obtain program, and the penalty values of the disaggregated model obtain program by the processor The step of loss value-acquiring method of disaggregated model according to any one of claims 1 to 4 is realized when execution.
10. a kind of computer readable storage medium, which is characterized in that be stored with classification mould on the computer readable storage medium The penalty values of type obtain program, and the penalty values of the disaggregated model, which obtain when program is executed by processor, realizes such as claim 1 To the disaggregated model described in any one of 4 loss value-acquiring method the step of.
CN201810443376.8A 2018-05-10 2018-05-10 A kind of the loss value-acquiring method and device of disaggregated model Pending CN108629377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810443376.8A CN108629377A (en) 2018-05-10 2018-05-10 A kind of the loss value-acquiring method and device of disaggregated model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810443376.8A CN108629377A (en) 2018-05-10 2018-05-10 A kind of the loss value-acquiring method and device of disaggregated model

Publications (1)

Publication Number Publication Date
CN108629377A true CN108629377A (en) 2018-10-09

Family

ID=63692529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810443376.8A Pending CN108629377A (en) 2018-05-10 2018-05-10 A kind of the loss value-acquiring method and device of disaggregated model

Country Status (1)

Country Link
CN (1) CN108629377A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871896A (en) * 2019-02-26 2019-06-11 北京达佳互联信息技术有限公司 Data classification method, device, electronic equipment and storage medium
CN111242230A (en) * 2020-01-17 2020-06-05 腾讯科技(深圳)有限公司 Image processing method and image classification model training method based on artificial intelligence

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150235074A1 (en) * 2014-02-17 2015-08-20 Huawei Technologies Co., Ltd. Face Detector Training Method, Face Detection Method, and Apparatuses
CN105975959A (en) * 2016-06-14 2016-09-28 广州视源电子科技股份有限公司 Face characteristic extraction modeling method based on neural network, face identification method, face characteristic extraction modeling device and face identification device
CN106250866A (en) * 2016-08-12 2016-12-21 广州视源电子科技股份有限公司 Image characteristics extraction modeling based on neutral net, image-recognizing method and device
CN107273458A (en) * 2017-06-01 2017-10-20 百度在线网络技术(北京)有限公司 Depth model training method and device, image search method and device
US20170316287A1 (en) * 2015-06-05 2017-11-02 At&T Intellectual Property I, L.P. Image hash codes generated by a neural network
CN107679564A (en) * 2017-09-20 2018-02-09 北京百度网讯科技有限公司 Sample data recommends method and its device
CN107844784A (en) * 2017-12-08 2018-03-27 广东美的智能机器人有限公司 Face identification method, device, computer equipment and readable storage medium storing program for executing
CN107908635A (en) * 2017-09-26 2018-04-13 百度在线网络技术(北京)有限公司 Establish textual classification model and the method, apparatus of text classification

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150235074A1 (en) * 2014-02-17 2015-08-20 Huawei Technologies Co., Ltd. Face Detector Training Method, Face Detection Method, and Apparatuses
US20170316287A1 (en) * 2015-06-05 2017-11-02 At&T Intellectual Property I, L.P. Image hash codes generated by a neural network
CN105975959A (en) * 2016-06-14 2016-09-28 广州视源电子科技股份有限公司 Face characteristic extraction modeling method based on neural network, face identification method, face characteristic extraction modeling device and face identification device
CN106250866A (en) * 2016-08-12 2016-12-21 广州视源电子科技股份有限公司 Image characteristics extraction modeling based on neutral net, image-recognizing method and device
CN107273458A (en) * 2017-06-01 2017-10-20 百度在线网络技术(北京)有限公司 Depth model training method and device, image search method and device
CN107679564A (en) * 2017-09-20 2018-02-09 北京百度网讯科技有限公司 Sample data recommends method and its device
CN107908635A (en) * 2017-09-26 2018-04-13 百度在线网络技术(北京)有限公司 Establish textual classification model and the method, apparatus of text classification
CN107844784A (en) * 2017-12-08 2018-03-27 广东美的智能机器人有限公司 Face identification method, device, computer equipment and readable storage medium storing program for executing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871896A (en) * 2019-02-26 2019-06-11 北京达佳互联信息技术有限公司 Data classification method, device, electronic equipment and storage medium
CN109871896B (en) * 2019-02-26 2022-03-25 北京达佳互联信息技术有限公司 Data classification method and device, electronic equipment and storage medium
CN111242230A (en) * 2020-01-17 2020-06-05 腾讯科技(深圳)有限公司 Image processing method and image classification model training method based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN106202330A (en) The determination methods of junk information and device
CN109389162B (en) Sample image screening technique and device, electronic equipment and storage medium
CN104486451B (en) Application program recommends method and device
CN106528709A (en) Social information recommendation method and apparatus
CN108256549A (en) Image classification method, device and terminal
CN107582028A (en) Sleep monitor method and device
CN107330019A (en) Searching method and device
CN106775224B (en) Remark information setting method and device
CN106250430A (en) The sort method of smart machine list and device
CN108038102A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
CN104636164B (en) Start page generation method and device
CN105100197B (en) The method and device of application is installed
CN107423063A (en) Multiwindow processing method, device and equipment
CN107943266A (en) power consumption control method, device and equipment
CN108764283A (en) A kind of the loss value-acquiring method and device of disaggregated model
CN106203306A (en) The Forecasting Methodology at age, device and terminal
CN106790895A (en) A kind of fault handling method and device
CN109961094A (en) Sample acquiring method, device, electronic equipment and readable storage medium storing program for executing
CN108629377A (en) A kind of the loss value-acquiring method and device of disaggregated model
CN106886294A (en) A kind of input method error correction method and device
CN107801282A (en) Desk lamp, desk lamp control method and device
CN107845094A (en) Pictograph detection method, device and computer-readable recording medium
CN107424130A (en) Picture U.S. face method and apparatus
CN105551047A (en) Picture content detecting method and device
CN104219360B (en) Information processing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181009

RJ01 Rejection of invention patent application after publication