CN110489344A - Engine test method and Related product - Google Patents

Engine test method and Related product Download PDF

Info

Publication number
CN110489344A
CN110489344A CN201910712797.0A CN201910712797A CN110489344A CN 110489344 A CN110489344 A CN 110489344A CN 201910712797 A CN201910712797 A CN 201910712797A CN 110489344 A CN110489344 A CN 110489344A
Authority
CN
China
Prior art keywords
operator
network model
neural network
api
engine
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
CN201910712797.0A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910712797.0A priority Critical patent/CN110489344A/en
Publication of CN110489344A publication Critical patent/CN110489344A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present application discloses a kind of engine test method and Related product, it is compiled by the way that the first operator and the first operand to be tested in first nerves network engine are added to default neural network model, first object neural network model after being compiled, call the application programming interfaces API of preset neural network framework, the first object neural network model is run by the API, obtain operation result, according to operation result and the preset correctness for checking the first operator described in data test, so, it can be by integrating preset neural network framework in first nerves network engine, it is whether correct for the single verifying operation result in first nerves network engine.

Description

Engine test method and Related product
Technical field
This application involves field of artificial intelligence, and in particular to a kind of engine test method and Related product.
Background technique
Currently, some company's independent research neural network engines, for example, the mobile AI computing engines of MACE are millet exploitations A deep learning Framework for Reasoning for mobile heterogeneous computing platforms optimization, in another example, TF Lite is the nerve of Google's exploitation Network engine.Wherein, neural network engine can realize many operators required for neural network, such as depth convolution, point-by-point volume Product, average pond, nonlinear activation function etc., still, user does not know that the correctness of operator in neural network engine.
Summary of the invention
The embodiment of the present application provides a kind of engine test method and Related product, for the operator in neural network engine Whether the operation result for testing the operator is correct.
In a first aspect, the embodiment of the present application provides a kind of engine test method, which comprises
First operator and the first operand to be tested in first nerves network engine are added to default neural network Model is compiled, the first object neural network model after being compiled;
The application programming interfaces API for calling preset neural network framework runs the first object mind by the API Through network model, operation result is obtained;
According to the operation result and the preset correctness for checking the first operator described in data test.
Second aspect, the embodiment of the present application provide a kind of engine test device, and the engine test device includes:
First operator and the first operand to be tested in first nerves network engine are added to default by compilation unit Neural network model is compiled, the first object neural network model after being compiled;
Running unit is run for calling the application programming interfaces API of preset neural network framework by the API The first object neural network model, obtains operation result;
Test cell, for the correct of the first operator according to the operation result and preset inspection data test Property.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, comprising: processor, memory and communication interface; And one or more programs, one or more of programs are stored in the memory, and are configured to by described Processor executes, and described program includes the finger for the step some or all of as described in the embodiment of the present application first aspect It enables.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein described computer-readable Storage medium is for storing computer program, wherein the computer program executes computer such as the embodiment of the present application the The instruction of step some or all of described in one side.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein the computer program product Non-transient computer readable storage medium including storing computer program, the computer program are operable to make to calculate Machine executes the step some or all of as described in the embodiment of the present application first aspect.The computer program product can be one A software installation packet.
Implement the embodiment of the present application, has the following beneficial effects:
As can be seen that engine test method and Related product described in the embodiment of the present application, by by first nerves The first operator to be tested and the first operand are added to default neural network model and are compiled in network engine, are compiled First object neural network model after translating calls the application programming interfaces API of preset neural network framework, is transported by API The row first object neural network model, obtains operation result, according to operation result and preset inspection data test The correctness of first operator, in this way, can be by integrating preset neural network framework in first nerves network engine, for Whether the single operator verifying operation result in one neural network engine is correct.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Figure 1A is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Figure 1B is a kind of flow diagram of engine test method provided by the embodiments of the present application;
Fig. 1 C is that a kind of first nerves network engine provided by the embodiments of the present application calls drilling for Android neural network framework Show schematic diagram;
Fig. 2 is the flow diagram of another engine test method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another engine test method provided by the embodiments of the present application;
Fig. 4 is the structural schematic diagram of another electronic equipment provided by the embodiments of the present application;
Fig. 5 A is a kind of structural schematic diagram of engine test device provided by the embodiments of the present application;
Fig. 5 B is the modification structures of engine test device as shown in Figure 5A provided by the embodiments of the present application;
Fig. 5 C is the modification structures of engine test device as shown in Figure 5 B provided by the embodiments of the present application;
Fig. 6 is another structural schematic diagram of electronic equipment provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include 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.
Firstly, to the invention relates to some concepts be briefly described.
Android neural network framework (Android Neural Networks, AndroidNN) is 8.1 version of Android platform The a set of interface frame for supporting artificial intelligence neural networks to calculate introduced.The nerve that it can be constructed according to upper layer user Operator to be used is needed in network, is found the operator registered in systems and is realized, then delivers specific processor active task It is realized to the operator.
Electronic equipment involved by the embodiment of the present application may include the various handheld devices with wireless communication function, Mobile unit, wearable device calculate equipment or are connected to other processing equipments and various forms of radio modem User equipment (user equipment, UE), mobile station (mobile station, MS), terminal device (terminal Device) etc..For convenience of description, apparatus mentioned above is referred to as electronic equipment.
It describes in detail below to the embodiment of the present application.
Figure 1A is please referred to, Figure 1A is the structural schematic diagram of a kind of electronic equipment 100 provided by the embodiments of the present application, above-mentioned electricity The circuit board 120 that sub- equipment 100 includes: shell 110, is set in the shell 110 is provided with place on the circuit board 120 Manage device and memory 122.
Wherein, processor may include following indicating one kind: central processing unit (Center Processing Unit, CPU), Graphics processor (Graphics Processing Unit, GPU), digital signal processor (Digital Signal Processor, DSP) etc..It may include instruction set in memory, processor can be realized in neural network model by instruction set Operator.The operator realized in this way finally operates on above-mentioned processor.
Figure 1B is please referred to, Figure 1B is a kind of flow diagram of engine test method provided by the embodiments of the present application, this reality Engine test method described in example is applied, which includes:
101, the first operator and the first operand to be tested in first nerves network engine are added to default nerve Network model is compiled, the first object neural network model after being compiled.
Wherein, the first operator may include following any: convolution operator (such as point-by-point convolution of depth convolution sum etc.), Chi Hua Operator (such as averagely pond), activation primitive (such as nonlinear activation function etc.).
Operand can include: operand, input data, weight etc., wherein operand, input data, weight can wrap Include tensor or scalar.
In the embodiment of the present application, first nerves network engine can run multiple operators, and the first operator can be multiple calculation Any operator in son, in order to test the first operator operation correctness, the first operator and the first operand can be added Extremely default neural network model, and be compiled, the first object neural network model after being compiled.
Optionally, in the embodiment of the present application, default neural network model can be the neural network model being pre-created, or Person directly can establish the neural network model when testing.
102, the application programming interfaces API for calling preset neural network framework runs first mesh by the API Neural network model is marked, operation result is obtained.
Wherein, preset neural network framework can be Android neural network framework, it is of course also possible to be that other can be real Other neural network frameworks of existing similar function, are not construed as limiting herein.
It is that a kind of first nerves network provided by the embodiments of the present application draws as shown in Figure 1 C by taking AndroidNN frame as an example The demonstration schematic diagram for calling Android neural network framework is held up, in the embodiment of the present application, neural network engine can be in AndroidNN frame It is registered in frame, thus, the application programming interfaces in AndroidNN frame can be called by AndroidNN frame (Application Programming Interface, API) runs first object neural network model.
Optionally, in above-mentioned steps 102, the first object neural network model is run by the API, it may include with Lower step:
21, first operator and first operand are formatted by the API, after obtaining conversion The first operator and the first operand;
22, the first object neural network mould of the operation comprising the first operator and the first operand after the conversion Type.
In the embodiment of the present application, it is contemplated that the mode for realizing the first operator in first nerves network engine is customized reality Existing mode, in first nerves network engine, the data organization knot of operand, weight, input data in the first operand Structure or data format are also customized data organizational structure or data format, and AndroidNN neural network framework may The format of the first operator and the first operand in first nerves network engine is not supported, it therefore, can be by the first operator and One operand formats, the first operator and the first operand after being converted, wherein AndroidNN nerve Network frame can support the first operator and the first operand after conversion that can pass through AndroidNN neural network framework in turn API operation comprising conversion after the first operator and the first operand first object neural network model.
103, according to the operation result and the preset correctness for checking the first operator described in data test.
In the embodiment of the present application, inspection data can be preset, in operation first object neural network model, obtain operation As a result after, operation result and preset inspection data can be compared, it is whether correct according to inspection data detection operation result, And then determine the correctness of the first operator.
In the concrete realization, multiple operators can be run in first nerves network engine, thus, it can be in multiple operators Any operator, by calling the API isolated operation of AndroidNN neural network framework by any operator, thus, it can test one by one Whether the operation result for demonstrate,proving each operator in multiple operators is correct, prevents the default neural network model comprising multiple operators from transporting It calculates under result error situation, it is difficult to check questions and prospect.
Optionally, in above-mentioned steps 103, according to the first operator described in the operation result and preset inspection data test Correctness, it may include following steps:
31, the first trueness error of first operator is determined according to the inspection data and the operation result;
If 32, first trueness error is less than default trueness error, determine that the first operator operation is correct.
Wherein, the first trueness error of the first operator can be determined according to inspection data and operation result, specifically, it is determined that the One trueness error can calculate mean square error (mean-square error, MSE) by inspection data and operation result, alternatively, The first trueness error can be determined with other modes, herein with no restrictions.
If the first trueness error is less than default trueness error, show that the first trueness error, therefore, can be true in controlled range Fixed first operator operation is correct.
Optionally, it in the embodiment of the present application, can comprise the further steps of:
A1, by the API run the first object neural network model when, record the first object nerve net Corresponding first runing time of network model;
A2, first operator and at least one other operator are added to the default neural network model, and carried out Compiling, the second target nerve network model after being compiled run the second target nerve network mould by the API Type, and record corresponding second runing time of the second target nerve network model;
A3, the first operation effect that first operator is determined according to first runing time and second runing time Rate.
Wherein, the first operator and at least one other operator are to realize neural network model needed for corresponding calculation function All operators.
In the embodiment of the present application, when running first object neural network model by API, also recordable first object mind Through corresponding first runing time of network model.And the first operator and at least one other operator can be added to default mind It through network model, and is compiled, the second target nerve network model after being compiled, and records the second target nerve network Corresponding second runing time of model.In turn, the of the first operator can be determined according to the first runing time and the second runing time One operation efficiency, specifically, it may be determined that the ratio between the first runing time and the second runing time obtains the first operation effect Rate.And so on, it can determine for each operator in multiple operators in first object neural network model in AndroidNN Operation efficiency in neural network framework, it may be appreciated which short slab of the operation efficiency of entire default neural network model appears in Operator, thus, it can more targetedly optimization neural network model.
Optionally, it in the embodiment of the present application, can comprise the further steps of:
B1, first operator in nervus opticus network engine is added to described preset with first operand Neural network model, and be compiled, the third target nerve network model after being compiled;
B2, the third target nerve network model is run by the API, and records the third target nerve network The corresponding third runing time of model;
B3, second of first operator in the nervus opticus network engine is determined according to the third runing time Operation efficiency;
If B4, first operation efficiency are lower than second operation efficiency, prompting message is issued, the prompting message is used First operator is optimized in instruction.
In the embodiment of the present application, first nerves network engine can be also compared with nervus opticus network engine, specifically The first operator in nervus opticus network engine can be added to the default neural network mould with first operand by ground Type, and be compiled, the third target nerve network model after being compiled, wherein first nerves network engine realizes first The mode of operator realizes that the mode of the first operator is different from nervus opticus network engine, the first operation of first nerves network engine First operation of the institutional framework or data format and nervus opticus network engine of weight, input data, operand in object The institutional framework or data format of weight, input data, operand in object are also different, therefore, by first nerves network The first operator to be tested and the first operand are added to default neural network model and are compiled in engine, after obtaining compiling First object neural network model, with by nervus opticus network engine the first operator and first operand add Extremely default neural network model, and be compiled, the third target nerve network model after being compiled has differences.
Wherein, the third target nerve network model can be run by API, and records third target nerve network model Corresponding third runing time, and, determine second operation efficiency of first operator in nervus opticus network engine, in turn, First operation efficiency can be compared with the second operation efficiency, it, can if the first operation efficiency is lower than second operation efficiency Prompting message is issued, tester is prompted to optimize the first operator.
For example, in the process of development, may be selected to call first nerves network engine or nervus opticus network engine The first operator realized, and more different first nerves network engines and nervus opticus network engine call the first operator respectively First operation efficiency, thus, can quickly in tuning first nerves network engine the first operator implementation method.
As can be seen that engine test method described in the embodiment of the present application, by will be in first nerves network engine First operator and the first operand to be tested is added to default neural network model and is compiled, and first after being compiled Target nerve network model calls the application programming interfaces API of preset neural network framework, runs first object by API Neural network model obtains operation result, according to operation result and the preset correctness for checking the first operator of data test, such as This, can be by integrating preset neural network framework, in first nerves network engine in first nerves network engine Whether single operator verifying operation result is correct, prevents the neural network model comprising multiple operators in operation result error situation Under, it is difficult to check questions and prospect.
Referring to Fig. 2, Fig. 2 is the flow diagram of another engine test method provided by the embodiments of the present application, this reality Applying engine test method, this method described in example can comprise the following steps that
201, the first operator and the first operand to be tested in first nerves network engine are added to default nerve Network model is compiled, the first object neural network model after being compiled.
202, the application programming interfaces API for calling preset neural network framework, by the API by first operator It is formatted with first operand, the first operator and the first operand after being converted.
203, the first object neural network of the operation comprising the first operator and the first operand after the conversion Model.
204, according to the operation result and the preset correctness for checking the first operator described in data test.
Wherein, the specific implementation process of above-mentioned steps 201-204 can refer to describes accordingly in step 101-103, herein It repeats no more.
As can be seen that engine test method described in the embodiment of the present application, by will be in first nerves network engine First operator and the first operand to be tested is added to default neural network model and is compiled, and first after being compiled Target nerve network model calls the application program API of preset neural network framework, by API by the first operator and described First operand formats, the first operator and the first operand after being converted, after operation is comprising conversion The first object neural network model of first operator and the first operand, according to operation result and preset inspection data test The correctness of first operator, in this way, can be by integrating preset neural network framework in first nerves network engine, for Whether the single operator verifying operation result in one neural network engine is correct, prevents the neural network model comprising multiple operators Under operation result error situation, it is difficult to check questions and prospect.
Consistent with the abovely, referring to Fig. 3, the process for another engine test method provided by the embodiments of the present application is shown It is intended to, engine test method as described in this embodiment, this method can comprise the following steps that
301, the first operator and the first operand to be tested in first nerves network engine are added to default nerve Network model is compiled, the first object neural network model after being compiled.
302, the application programming interfaces API for calling preset neural network framework, by the API by first operator It is formatted with first operand, the first operator and the first operand after being converted.
303, the first object neural network of the operation comprising the first operator and the first operand after the conversion Model.
304, according to the operation result and the preset correctness for checking the first operator described in data test.
305, when running the first object neural network model by the API, the first object nerve is recorded Corresponding first runing time of network model.
306, first operator and at least one other operator are added to the default neural network model, and carried out Compiling, the second target nerve network model after being compiled run the second target nerve network mould by the API Type, and record corresponding second runing time of the second target nerve network model.
307, the first operation of first operator is determined according to first runing time and second runing time Efficiency.
Wherein, the specific implementation process of step 301-307 can be found in describes accordingly in step 101-103, herein no longer It repeats.
As can be seen that engine test method described in the embodiment of the present application, by will be in first nerves network engine First operator and the first operand to be tested is added to default neural network model and is compiled, and first after being compiled Target nerve network model calls the application programming interfaces API of preset neural network framework, by API by the first operator and First operand formats, the first operator and the first operand after being converted, and operation includes conversion The first object neural network model of the first operator and the first operand afterwards, according to operation result and preset inspection data Test the correctness of the first operator, corresponding first runing time of record first object neural network model, by the first operator and At least one other operator is added to default neural network model, and is compiled, the second target nerve net after being compiled Network model runs the second target nerve network model by API, and records corresponding second fortune of the second target nerve network model The row time determines the first operation efficiency of the first operator according to the first runing time and the second runing time, in this way, can by Preset neural network framework is integrated in first nerves network engine, it can be for multiple calculations in first object neural network model Each operator in son determines the operation efficiency in preset neural network framework, it may be appreciated that entirely presets neural network model The short slab of operation efficiency which operator appeared in, thus, can more targetedly optimization neural network model.
It is the device for implementing above-mentioned engine test method below, specific as follows:
Consistent with the abovely, referring to Fig. 4, Fig. 4 is the structural representation of a kind of electronic equipment provided by the embodiments of the present application Figure, which includes: processor 410, communication interface 430 and memory 420;And one or more programs 421, it is described One or more programs 421 are stored in the memory 420, and are configured to be executed by the processor, the journey Sequence 421 includes the instruction for executing following steps:
First operator and the first operand to be tested in first nerves network engine are added to default neural network Model is compiled, the first object neural network model after being compiled;
The application programming interfaces API for calling preset neural network framework runs the first object mind by the API Through network model, operation result is obtained;
According to the operation result and the preset correctness for checking the first operator described in data test.
In a possible example, in terms of the first object neural network model by API operation, Described program 421 includes the instruction for executing following steps:
First operator and first operand are formatted by the API, after being converted First operator and the first operand;
The first object neural network model of the operation comprising the first operator and the first operand after the conversion.
In a possible example, described first according to the operation result and preset inspection data test In terms of the correctness of operator, described program 421 includes the instruction for executing following steps:
The first trueness error of first operator is determined according to the inspection data and the operation result;
If first trueness error is less than default trueness error, determine that the first operator operation is correct.
In a possible example, described program 421 further includes the instruction for executing following steps:
When running the first object neural network model by the API, the first object neural network is recorded Corresponding first runing time of model;
First operator and at least one other operator are added to the default neural network model, and compiled It translates, the second target nerve network model after being compiled, the second target nerve network model is run by the API, And record corresponding second runing time of the second target nerve network model;
The first operation efficiency of first operator is determined according to first runing time and second runing time.
In a possible example, described program 421 further includes the instruction for executing following steps:
First operator in nervus opticus network engine is added to the default mind with first operand It through network model, and is compiled, the third target nerve network model after being compiled;
The third target nerve network model is run by the API, and records the third target nerve network mould The corresponding third runing time of type;
Second fortune of first operator in the nervus opticus network engine is determined according to the third runing time Calculate efficiency;
If first operation efficiency is lower than second operation efficiency, prompting message is issued, the prompting message is used for Instruction optimizes first operator.
Fig. 5 A is please referred to, Fig. 5 A is a kind of structural schematic diagram of engine test device provided in this embodiment, the engine Test device includes compilation unit 501, running unit 502 and test cell 503, wherein
The compilation unit 501 adds the first operator and the first operand to be tested in first nerves network engine It adds to default neural network model to be compiled, the first object neural network model after being compiled;
The running unit 502 runs described the by the API for calling the API of preset neural network framework One target nerve network model, obtains operation result;
The test cell 503 is used for the first operator according to the operation result and preset inspection data test Correctness.
Optionally, in terms of the first object neural network model by API operation, the running unit 502 are specifically used for:
First operator and first operand are formatted by the API, after being converted First operator and the first operand;
The first object neural network model of the operation comprising the first operator and the first operand after the conversion.
Optionally, described according to the operation result and it is preset check data test described in the first operator correctness Aspect, the test cell 503 are specifically used for:
The first trueness error of first operator is determined according to the inspection data and the operation result;
If first trueness error is less than default trueness error, determine that the first operator operation is correct.
Optionally, as shown in Figure 5 B, Fig. 5 B is the modification structures of engine test device shown in Fig. 5 A, compared with Fig. 5 A Compared with can also include: recording unit 504, wherein
The recording unit 504, for recording when running the first object neural network model by the API Corresponding first runing time of the first object neural network model;
The compilation unit 501 is also used to for first operator and at least one other operator being added to described default Neural network model, and be compiled, the second target nerve network model after being compiled;
The running unit 502 is also used to run the second target nerve network model by the API;
The recording unit 504 is also used to record corresponding second runing time of the second target nerve network model;
The test cell 503 is also used to according to first runing time and second runing time determination First operation efficiency of the first operator.
Optionally, as shown in Figure 5 C, Fig. 5 C is the modification structures of engine test device shown in Fig. 5 A or Fig. 5 B, with figure 5B compares, and can also include: prompt unit 505, wherein
The compilation unit, be also used to by nervus opticus network engine first operator and first operation pair It as being added to the default neural network model, and is compiled, the third target nerve network model after being compiled;
The running unit 502 is also used to run the third target nerve network model by the API;
The recording unit 504 is also used to record the corresponding third runing time of the third target nerve network model;
The test cell 503 is also used to determine first operator described second according to the third runing time The second operation efficiency in neural network engine;
The prompt unit 505, for issuing prompt when first operation efficiency is lower than second operation efficiency Message, the prompting message, which is used to indicate, optimizes first operator.
As can be seen that engine test device described in the embodiment of the present application, by will be in first nerves network engine First operator and the first operand to be tested is added to default neural network model and is compiled, and first after being compiled Target nerve network model, calls the application program API of preset neural network framework, runs the first object by API Neural network model obtains operation result, according to the correct of the first operator described in operation result and preset inspection data test Property, in this way, can be by integrating preset neural network framework in first nerves network engine, for first nerves network engine In single operator verifying operation result it is whether correct, prevent the neural network model comprising multiple operators from malfunctioning in operation result In the case of, it is difficult to check questions and prospect.
It is understood that the function of each program module of the engine test device of the present embodiment can be according to above method reality The method specific implementation in example is applied, specific implementation process is referred to the associated description of above method embodiment, herein no longer It repeats.
The embodiment of the present application also provides another electronic equipments, as shown in fig. 6, for ease of description, illustrate only with The relevant part of the embodiment of the present application, it is disclosed by specific technical details, please refer to the embodiment of the present application method part.The electronics Equipment can be include mobile phone, tablet computer, PDA (personal digital assistant, personal digital assistant), POS Any terminal device such as (point of sales, point-of-sale terminal), vehicle-mounted computer, by taking electronic equipment is mobile phone as an example:
Fig. 6 shows the block diagram of the part-structure of mobile phone relevant to electronic equipment provided by the embodiments of the present application.Ginseng Fig. 6 is examined, mobile phone includes: radio frequency (Radio Frequency, RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, voicefrequency circuit 960, Wireless Fidelity (Wireless Fidelity, Wi-Fi) module 970, processor 980 And the equal components of power supply 990.It will be understood by those skilled in the art that handset structure shown in Fig. 6 is not constituted to mobile phone It limits, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
It is specifically introduced below with reference to each component parts of the Fig. 6 to mobile phone:
RF circuit 910 can be used for sending and receiving for information.In general, RF circuit 910 includes but is not limited to antenna, at least one A amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier, LNA), duplexer etc..In addition, RF circuit 910 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to global system for mobile communications (Global System of Mobile Communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code it is point more Location (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), Email, short message service (Short Messaging Service, SMS) etc..
Memory 920 can be used for storing software program and module, and processor 980 is stored in memory 920 by operation Software program and module, thereby executing the various function application and data processing of mobile phone.Memory 920 can mainly include Storing program area and storage data area, wherein storing program area can application journey needed for storage program area, at least one function Sequence etc.;Storage data area, which can be stored, uses created data etc. according to mobile phone.In addition, memory 920 may include high speed Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or Other volatile solid-state parts.
Input unit 930 can be used for receiving the number or character information of input, and generate with the user setting of mobile phone with And the related key signals input of function control.Specifically, input unit 930 may include fingerprint recognition mould group 931 and other are defeated Enter equipment 932.Fingerprint recognition mould group 931 can acquire the finger print data of user on it.In addition to fingerprint recognition mould group 931, input Unit 930 can also include other input equipments 932.Specifically, other input equipments 932 can include but is not limited to touch-control One of screen, physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. Or it is a variety of.
Display unit 940 can be used for showing information input by user or be supplied to user information and mobile phone it is various Menu.Display unit 940 may include display screen 941, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), the forms such as organic or inorganic light emitting diode (Organic Light-Emitting Diode, OLED) come Configure display screen 941.
Mobile phone may also include at least one sensor 950, wherein sensor includes environmental sensor, and environmental sensor can Including temperature sensor, humidity sensor and ambient light sensor.In addition to environmental sensor 951, sensor 950 can also include Other sensors 952, such as motion sensor, pressure sensor etc..Wherein, ambient light sensor can also be according to ambient light Light and shade adjust the backlight illumination of mobile phone, and then adjust the brightness of display screen 941, proximity sensor can be moved to ear in mobile phone Bian Shi closes display screen 941 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions The size of (generally three axis) acceleration, can detect that size and the direction of gravity, can be used to identify mobile phone posture when static Using (such as horizontal/vertical screen switching, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;As for The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor that mobile phone can also configure, it is no longer superfluous herein It states.
Voicefrequency circuit 960, loudspeaker 961, microphone 962 can provide the audio interface between user and mobile phone.Audio-frequency electric Electric signal after the audio data received conversion can be transferred to loudspeaker 961, be converted to sound by loudspeaker 961 by road 960 Signal plays;On the other hand, the voice signal of collection is converted to electric signal by microphone 962, is turned after being received by voicefrequency circuit 960 It is changed to audio data, then by after the processing of audio data playback process device 980, such as another mobile phone is sent to through RF circuit 910, Or audio data is played to memory 920 to be further processed.
Wi-Fi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronics by Wi-Fi module 970 Mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 6 is shown Wi-Fi module 970, but it is understood that, and it is not belonging to must be configured into for mobile phone, it can according to need completely not Change in the range of the essence of invention and omits.
Processor 980 is the control centre of mobile phone, using the various pieces of various interfaces and connection whole mobile phone, is led to It crosses operation or executes the software program and/or module being stored in memory 920, and call and be stored in memory 920 Data execute the various functions and processing data of mobile phone, to carry out integral monitoring to mobile phone.Optionally, processor 980 can wrap Include one or more processing units;Preferably, processor 980 can integrate application processor and modem processor, wherein answer With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication. It is understood that above-mentioned modem processor can not also be integrated into processor 980.
Mobile phone further includes the power supply 990 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe Reason system and processor 980 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system Etc. functions.
Mobile phone can also include camera, and camera is passed for shooting image and video, and by the image of shooting and video It is defeated to be handled to processor 980.
Mobile phone can also be including bluetooth module etc., and details are not described herein.
In earlier figures 1B, Fig. 2 and embodiment shown in Fig. 3, each step method process can be based on the structure reality of the mobile phone It is existing.
The embodiment of the present application also provides a kind of computer readable storage medium, wherein the computer readable storage medium is deposited Storage is used for the computer program of electronic data interchange, which execute computer as above-mentioned engine test method is real Applying some or all of either record method step, above-mentioned computer in example includes electronic equipment.
The embodiment of the present application also provides a kind of computer program product, and above-mentioned computer program product includes storing calculating The non-transient computer readable storage medium of machine program, above-mentioned computer program are operable to that computer is made to execute such as above-mentioned side Some or all of any engine test method recorded in method embodiment step.The computer program product can be soft for one Part installation kit, above-mentioned computer include electronic equipment.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, related actions and modules not necessarily the application It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, 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 said units, 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.
Above-mentioned 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 realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit 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 above method of 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 of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory May include: flash disk, read-only memory (English: Read-Only Memory, referred to as: 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 (10)

1. a kind of engine test method, which is characterized in that the described method includes:
First operator and the first operand to be tested in first nerves network engine are added to default neural network model It is compiled, the first object neural network model after being compiled;
The application programming interfaces API for calling preset neural network framework runs the first object nerve net by the API Network model, obtains operation result;
According to the operation result and the preset correctness for checking the first operator described in data test.
2. the method according to claim 1, wherein described run the first object nerve by the API Network model, comprising:
First operator and first operand are formatted by the API, first after being converted Operator and the first operand;
The first object neural network model of the operation comprising the first operator and the first operand after the conversion.
3. method according to claim 1 or 2, which is characterized in that described according to the operation result and preset inspection The correctness of first operator described in data test, comprising:
The first trueness error of first operator is determined according to the inspection data and the operation result;
If first trueness error is less than default trueness error, determine that the first operator operation is correct.
4. method according to claim 1-3, which is characterized in that the method also includes:
When running the first object neural network model by the API, the first object neural network model is recorded Corresponding first runing time;
First operator and at least one other operator are added to the default neural network model, and are compiled, is obtained The second target nerve network model after to compiling runs the second target nerve network model by the API, and records Corresponding second runing time of the second target nerve network model;
The first operation efficiency of first operator is determined according to first runing time and second runing time.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
First operator in nervus opticus network engine is added to the default nerve net with first operand Network model, and be compiled, the third target nerve network model after being compiled;
The third target nerve network model is run by the API, and records the third target nerve network model pair The third runing time answered;
Second operation effect of first operator in the nervus opticus network engine is determined according to the third runing time Rate;
If first operation efficiency is lower than second operation efficiency, prompting message is issued, the prompting message is used to indicate First operator is optimized.
6. a kind of engine test device, which is characterized in that the engine test device includes:
First operator and the first operand to be tested in first nerves network engine are added to default nerve by compilation unit Network model is compiled, the first object neural network model after being compiled;
Running unit, for calling the application programming interfaces API of preset neural network framework, by described in API operation First object neural network model, obtains operation result;
Test cell, for according to the operation result and the preset correctness for checking the first operator described in data test.
7. engine test device according to claim 6, which is characterized in that run described the by the API described In terms of one target nerve network model, the running unit is specifically used for:
First operator and first operand are formatted by the API, first after being converted Operator and the first operand;
The first object neural network model of the operation comprising the first operator and the first operand after the conversion.
8. engine test device according to claim 6, which is characterized in that described according to the operation result and default The correctness for checking the first operator described in data test in terms of, the test cell is specifically used for:
The first trueness error of first operator is determined according to the inspection data and the operation result;
If first trueness error is less than default trueness error, determine that the first operator operation is correct.
9. a kind of electronic equipment characterized by comprising processor, memory and communication interface;And one or more journeys Sequence, one or more of programs are stored in the memory, and are configured to be executed by the processor, the journey Sequence includes the instruction for the method according to claim 1 to 5.
10. a kind of computer readable storage medium, which is characterized in that it is used to store computer program, wherein the computer Program makes computer execute the method according to claim 1 to 5.
CN201910712797.0A 2019-08-02 2019-08-02 Engine test method and Related product Pending CN110489344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910712797.0A CN110489344A (en) 2019-08-02 2019-08-02 Engine test method and Related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910712797.0A CN110489344A (en) 2019-08-02 2019-08-02 Engine test method and Related product

Publications (1)

Publication Number Publication Date
CN110489344A true CN110489344A (en) 2019-11-22

Family

ID=68549227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910712797.0A Pending CN110489344A (en) 2019-08-02 2019-08-02 Engine test method and Related product

Country Status (1)

Country Link
CN (1) CN110489344A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178512A (en) * 2019-12-31 2020-05-19 中国科学院自动化研究所南京人工智能芯片创新研究院 Device operation neural network test method and device
CN111274158A (en) * 2020-02-27 2020-06-12 北京首汽智行科技有限公司 Data verification method
CN111582459A (en) * 2020-05-18 2020-08-25 Oppo广东移动通信有限公司 Method, electronic device, apparatus and storage medium for executing operation
CN111737159A (en) * 2020-08-27 2020-10-02 苏州浪潮智能科技有限公司 Software debugging method, device, equipment and computer readable storage medium
CN112016665A (en) * 2020-10-20 2020-12-01 深圳云天励飞技术股份有限公司 Method and device for calculating running time of neural network on processor
CN112101529A (en) * 2020-10-14 2020-12-18 杭州海康威视数字技术股份有限公司 Cross-platform deployment method and framework for neural network model inference
CN113033762A (en) * 2019-12-09 2021-06-25 中科寒武纪科技股份有限公司 Method, apparatus and computer-readable storage medium for testing operator precision in neural networks
WO2021238006A1 (en) * 2020-05-29 2021-12-02 上海商汤智能科技有限公司 Artificial intelligence chip verification

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202192A (en) * 2016-06-28 2016-12-07 浪潮软件集团有限公司 Workflow-based big data analysis method
CN106682268A (en) * 2016-11-28 2017-05-17 深圳市紫光同创电子有限公司 Programmable logic device configuration method and equipment
CN108874662A (en) * 2017-05-15 2018-11-23 丰田自动车株式会社 The non-transitory computer-readable medium of test method and storage program
CN109213677A (en) * 2018-07-06 2019-01-15 华东师范大学 The mutation testing method relied on based on Android multi-thread data
CN109670586A (en) * 2018-12-29 2019-04-23 北京中科寒武纪科技有限公司 Operation method, device and Related product
WO2019080732A1 (en) * 2017-10-25 2019-05-02 Oppo广东移动通信有限公司 Network management method and related products
CN109754073A (en) * 2018-12-29 2019-05-14 北京中科寒武纪科技有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing
CN109800855A (en) * 2018-12-14 2019-05-24 合肥阿巴赛信息科技有限公司 A kind of convolutional neural networks building method based on geometry operator
CN109871809A (en) * 2019-02-22 2019-06-11 福州大学 A kind of machine learning process intelligence assemble method based on semantic net

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202192A (en) * 2016-06-28 2016-12-07 浪潮软件集团有限公司 Workflow-based big data analysis method
CN106682268A (en) * 2016-11-28 2017-05-17 深圳市紫光同创电子有限公司 Programmable logic device configuration method and equipment
CN108874662A (en) * 2017-05-15 2018-11-23 丰田自动车株式会社 The non-transitory computer-readable medium of test method and storage program
WO2019080732A1 (en) * 2017-10-25 2019-05-02 Oppo广东移动通信有限公司 Network management method and related products
CN109213677A (en) * 2018-07-06 2019-01-15 华东师范大学 The mutation testing method relied on based on Android multi-thread data
CN109800855A (en) * 2018-12-14 2019-05-24 合肥阿巴赛信息科技有限公司 A kind of convolutional neural networks building method based on geometry operator
CN109670586A (en) * 2018-12-29 2019-04-23 北京中科寒武纪科技有限公司 Operation method, device and Related product
CN109754073A (en) * 2018-12-29 2019-05-14 北京中科寒武纪科技有限公司 Data processing method, device, electronic equipment and readable storage medium storing program for executing
CN109871809A (en) * 2019-02-22 2019-06-11 福州大学 A kind of machine learning process intelligence assemble method based on semantic net

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
叶力洪: "《CBIR算法测试平台及其相关技术研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 March 2011 (2011-03-15), pages 3 *
田小林等: "《光学相干层析图像处理及应用》", 北京理工大学出版社, pages: 55 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113033762A (en) * 2019-12-09 2021-06-25 中科寒武纪科技股份有限公司 Method, apparatus and computer-readable storage medium for testing operator precision in neural networks
CN113033762B (en) * 2019-12-09 2024-05-10 中科寒武纪科技股份有限公司 Method, apparatus and computer readable storage medium for testing operator accuracy in neural networks
CN111178512A (en) * 2019-12-31 2020-05-19 中国科学院自动化研究所南京人工智能芯片创新研究院 Device operation neural network test method and device
CN111274158A (en) * 2020-02-27 2020-06-12 北京首汽智行科技有限公司 Data verification method
CN111582459A (en) * 2020-05-18 2020-08-25 Oppo广东移动通信有限公司 Method, electronic device, apparatus and storage medium for executing operation
CN111582459B (en) * 2020-05-18 2023-10-20 Oppo广东移动通信有限公司 Method for executing operation, electronic equipment, device and storage medium
WO2021238006A1 (en) * 2020-05-29 2021-12-02 上海商汤智能科技有限公司 Artificial intelligence chip verification
CN111737159A (en) * 2020-08-27 2020-10-02 苏州浪潮智能科技有限公司 Software debugging method, device, equipment and computer readable storage medium
CN111737159B (en) * 2020-08-27 2021-02-09 苏州浪潮智能科技有限公司 Software debugging method, device, equipment and computer readable storage medium
CN112101529A (en) * 2020-10-14 2020-12-18 杭州海康威视数字技术股份有限公司 Cross-platform deployment method and framework for neural network model inference
CN112016665A (en) * 2020-10-20 2020-12-01 深圳云天励飞技术股份有限公司 Method and device for calculating running time of neural network on processor

Similar Documents

Publication Publication Date Title
CN110489344A (en) Engine test method and Related product
CN107943683B (en) Test script generation method and device, electronic equipment and storage medium
CN110515626A (en) The code compiling method and Related product of deep learning Computational frame
CN106126174B (en) A kind of control method and electronic equipment of scene audio
CN107770596A (en) A kind of special efficacy synchronous method, device and mobile terminal
CN110210605A (en) Hardware operator matching process and Related product
CN105955700A (en) Sound effect adjusting method and user terminal
CN106155750A (en) The loading method of a kind of resource file and device
CN107908407B (en) Compiling method and device and terminal equipment
CN106227588A (en) The creation method of a kind of multi-instance object, device and mobile terminal
CN105959482B (en) A kind of control method and electronic equipment of scene audio
CN106126165B (en) A kind of audio stream processing method and mobile terminal
CN108156508A (en) Method, apparatus, mobile terminal, server and the system of barrage information processing
CN107273139A (en) A kind of method for updating system, equipment and computer-readable recording medium
CN109254793A (en) Engine partition method, relevant device and computer readable storage medium
CN109348467A (en) Emergency call realization method, electronic device and computer readable storage medium
CN107276602A (en) Radio frequency interference processing method, device, storage medium and terminal
CN107943685A (en) A kind of traverse path generation method, device, server and storage medium
CN108600516A (en) Collecting method, mobile terminal and computer readable storage medium
CN110378107A (en) A kind of method and relevant apparatus of installation kit detection
CN107147767A (en) In Call control method, device, storage medium and terminal
CN109126124A (en) Engine adaptation method, relevant device and computer readable storage medium
CN104102560B (en) The method and device of system performance testing
CN108196968A (en) Mobile terminal restarts localization method, mobile terminal and computer readable storage medium
CN106933636A (en) Start method, device and the terminal device of plug-in services

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