WO2018068623A1 - 一种机器学习方法及系统 - Google Patents

一种机器学习方法及系统 Download PDF

Info

Publication number
WO2018068623A1
WO2018068623A1 PCT/CN2017/102836 CN2017102836W WO2018068623A1 WO 2018068623 A1 WO2018068623 A1 WO 2018068623A1 CN 2017102836 W CN2017102836 W CN 2017102836W WO 2018068623 A1 WO2018068623 A1 WO 2018068623A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage space
layer
computing architecture
size
parameter
Prior art date
Application number
PCT/CN2017/102836
Other languages
English (en)
French (fr)
Inventor
赵凌
李季檩
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018068623A1 publication Critical patent/WO2018068623A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present application relates to the field of information processing technologies, and in particular, to a machine learning method and system.
  • Deep Learning is a type of machine learning. Deep learning techniques learn the mechanisms of the biological nervous system by building neural networks, learning various representations from a large amount of data, and interpreting data such as images, sounds, texts, and so on. Deep learning techniques can be applied to fields such as computer vision, speech recognition, natural language processing, social network filtering, machine translation, bioinformatics, and the like. Deep learning uses a series of multiple levels of nonlinear processing units to extract features and transform them. Among them, the nonlinear processing unit in each level can be called a computing architecture. The computational architecture at each level uses the output of the previous layer of computing architecture as input to extract higher level data features from lower level data features. The storage space of each level of computing architecture is independent of each other. In the deep learning algorithm, the composition of the nonlinear processing units of each level is related to the problem solved by the level. The higher the complexity of the algorithm, the larger the total storage space required.
  • the embodiment of the present application provides a machine learning method and system, which is implemented as a machine learning module.
  • the type allocates the overall storage space so that the various layers of the machine learning model are recycled.
  • the embodiment of the present application provides a machine learning method, including:
  • Each layer of the computing framework of the machine learning model utilizes the storage space for corresponding calculations.
  • the embodiment of the present application further provides a computing device, including: a processor and a memory, wherein the memory stores machine readable instructions, and the processor can be:
  • the computing layers of the layers of the machine learning model are each calculated using the storage space.
  • the computing layers of the layers of the machine learning model are each calculated using the storage space.
  • the machine learning system is based on the machine learning model.
  • the storage value of the storage space corresponding to each layer of the computing architecture is allocated an overall storage space, so that each layer computing architecture can recycle the overall storage space.
  • the corresponding storage space needs to be allocated for each layer computing architecture.
  • the method in this embodiment can reduce storage fragmentation caused by allocating multiple storage spaces, and greatly reduces the operation of the machine learning model.
  • the storage space required at the time improves system performance, so that the machine learning method can be run on a storage-limited terminal device.
  • FIG. 1 is a flowchart of a machine learning method provided by an embodiment of the present application.
  • 2a is a flowchart of a method for determining a storage value of a storage space corresponding to a certain layer computing architecture in the embodiment of the present application;
  • 2b is a flowchart of a method for determining a storage value of a storage space corresponding to a certain layer computing architecture in the embodiment of the present application;
  • FIG. 3 is a flowchart of a method for calculating a certain layer of computing architecture by using an overall storage space in the embodiment of the present application;
  • FIG. 4 is a schematic diagram of recycling computing space of each layer in the computing architecture of each layer in the embodiment of the present application;
  • FIG. 5 is a flowchart of a machine learning method provided in an application embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a machine learning system according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another machine learning system according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of an embedded device according to an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a scenario of using a machine learning system according to an embodiment of the present application.
  • FIG. 12 is a flow chart of a method for computing calculations by using a allocated storage space by each layer computing architecture in some embodiments
  • FIG. 13 is a flowchart of a method for calculating calculations by using a allocated storage space by each layer computing architecture in some embodiments
  • each layer computing architecture utilizing a storage space in some embodiments.
  • 15 is a flow chart of a method for computing by each layer computing architecture using allocated storage spaces, respectively, in some embodiments.
  • the embodiment of the present application provides a machine learning method.
  • the method can be performed by a machine learning system, such as a deep learning system.
  • the machine learning system can be implemented by a computing device.
  • the computing device can be a server, a terminal device (such as a PC, a smart phone, a tablet, etc.), an embedded device, or the like. As shown in FIG. 1, the method can include the following steps.
  • Step 101 Determine the size of the storage space required by each layer of the computing architecture of the machine learning model.
  • the machine learning model is a computing module that includes a multi-tier computing architecture.
  • Each layer of computing architecture can use different computing architectures, such as convolutional layer, additive layer, subtraction layer, etc. These layers are combined to form the computational architecture of the machine learning model to achieve certain functions, such as through deep learning. To predict and other functions.
  • a machine learning system is a computing system that includes a machine learning model and peripheral functions. Peripheral functions may include, but are not limited to, an initialization function, a storage space allocation function, a calculation result output function, and the like.
  • Each layer of computing architecture includes an input unit, a computing unit, and an output unit. These units occupy a certain storage space at runtime. Therefore, the storage space corresponding to a certain layer of computing architecture includes the units included in the computing framework of the layer. The storage space required at runtime. When you perform this step, the machine learning system is obtained from the configuration file of the machine learning model.
  • Step 102 The storage value of the storage space of each layer computing architecture determined according to step 101 is a machine storage model corresponding to the storage space, so that the storage space can store information required for any layer computing architecture to run.
  • the machine learning system allocates a storage space (also referred to as an overall storage space) for the machine learning model, so that each layer of the computing architecture runs back to utilize the storage space, and the storage space needs to be sufficient to store any layer of computing architecture.
  • a storage space also referred to as an overall storage space
  • the size of the storage space also known as the storage value of the storage space
  • the size of the largest storage space is the same.
  • step 103 the computing layers of each layer of the machine learning model are respectively calculated by using the allocated storage space.
  • the machine learning system allocates a storage space according to the size of the storage space corresponding to each layer of the computing structure of the machine learning model, so that the computing architecture of each layer can recycle the storage space, which can be largely
  • the storage space required for the machine learning model to run is reduced, so that the machine learning method can run on devices with limited storage, such as terminal devices and embedded devices.
  • it can also avoid the computing platform to allocate storage space for each layer of computing architecture one by one, reducing the formation of storage fragments.
  • the machine learning system determines the size of the storage space corresponding to a certain layer of computing architecture in performing the above step 101, which may be implemented by the method shown in FIG. 2a.
  • Step 201 Acquire a configuration file of a machine learning model, where the configuration file includes information of calculation parameters of a certain layer of computing architecture, information of input parameters, and structural information.
  • the calculation parameter refers to a parameter with a fixed value used in the calculation of the layer calculation architecture, such as some coefficients.
  • the information of the calculation parameters may include information such as the size and type of the calculation parameters.
  • the structure information may include description information of the layer computing architecture, and the like.
  • the input parameter refers to an unknown value that the calculation architecture needs in the calculation, and its value needs to be obtained from the outside.
  • the information of the input parameters may include information such as the size and type of the input parameters.
  • Step 202 Determine the size of the output parameter of a certain layer of the computing architecture according to the information of the input parameter, the information of the calculated parameter, and the structural information.
  • the machine learning system can assign input parameters according to the information of the input parameters, and calculate the output parameters according to the structural information and the assignment of the input parameters, and then determine the size of the output parameters.
  • the size of the input parameter of the computing architecture refers to the size of the input data required in the calculation process of the computing architecture; the size of the output parameter refers to the calculated output in the computing architecture.
  • the size of the data is a value obtained as an input parameter obtained by the calculation architecture for calculation, that is, an input parameter value; the output data is a value of an output parameter calculated by the calculation architecture, that is, an output parameter value.
  • Step 203 The sum of the size of the input parameter, the size of the output parameter, and the size of the calculated parameter is taken as the size of the storage space corresponding to a certain layer computing architecture.
  • the machine learning system can determine the maximum size of the storage space in the storage space corresponding to each layer of the computing architecture when performing the above step 102, so that the size of the allocated storage space is maximized when the storage space is allocated.
  • the size of the storage space is the same.
  • the machine learning system determines the size of the storage space corresponding to a certain layer of computing architecture in performing the above step 101, which may be implemented by the method shown in FIG. 2b.
  • Steps 201 and 202 in FIG. 2b are the same as steps 201 and 202 in FIG. 2a, and are not described again.
  • Step 204 Determine a size of a storage space corresponding to a certain layer computing architecture, including: a size of a storage space required to store the input parameter, a size of a storage space required to store the calculation parameter, and a size of a storage space required to store the output parameter, That is, the size of the storage space occupied by the input unit, the calculation unit, and the output unit included in the layer computing architecture.
  • the machine learning system may specifically determine the storage value of the first maximum space in which the input parameters are stored in the storage space corresponding to each layer of the computing architecture (ie, each layer computing architecture needs to store the input parameters.
  • the maximum value of the storage space size hereinafter referred to as the first maximum value
  • stores the storage value of the second largest space of the calculation parameter ie, the maximum value of the storage space required for each layer computing architecture to store the calculation parameters, hereinafter referred to as It is the second maximum value
  • stores the stored value of the third maximum space of the output parameter ie, the maximum value of the storage space required for each layer calculation architecture to store the output parameter, hereinafter referred to as the third maximum value.
  • the size of the overall storage space is the sum of the first maximum value, the second maximum value, and the third maximum value.
  • a machine learning model has a three-layer computing architecture.
  • the first layer of computing architecture needs to store input parameters, the storage parameters of the calculation parameters and output parameters are a1, a2, and a3, respectively.
  • the storage parameters required for the second layer computing architecture are stored.
  • the storage space size of the calculation parameter and the output parameter are respectively b1, b2 and b3, and the storage input parameters required by the third layer calculation architecture, the storage space of the calculation parameter and the output parameter are respectively c1, c2 and c3, wherein a1 If the value is greater than b1 and greater than c1, b2 is greater than a2 and greater than c2, and c3 is greater than a2 and greater than b2, the first maximum value is determined, and the second maximum value and the third maximum value are respectively a1, b2, and c3, and thus, the allocated storage space is The size is a1+b2+c3.
  • the first maximum value, the second maximum value, and the third maximum value do not refer to the size of the space in the first three positions, but the maximum space in different dimensions, that is, respectively, for storing input parameters, calculating parameters, and The maximum size of the three storage spaces for the output parameters.
  • FIG. 12 is a flow chart of a method for computing by each layer computing architecture using allocated storage spaces, respectively, in some embodiments. As shown in FIG. 12, the method can include the following steps.
  • Step 501 Write first output data of the first layer computing architecture to the storage space.
  • Step 502 The second layer computing architecture uses the first output data as input data, and performs calculation of the second layer computing architecture by using the storage space.
  • Step 503 Write second output data of the second layer computing architecture to the storage space.
  • first layer “second layer”, etc. do not refer to the computing architecture in which the execution order is preceded, but refers to any computing architecture in each computing architecture, “first”, “second”, “ The third "is only used to distinguish between several computing architectures involved in the description.
  • the first output data is used as input data of a second layer computing architecture, and performing the calculation of the second layer computing architecture by using the storage space may include:
  • the second layer computing architecture reads the first output data as the input data from the storage location, and writes the calculation result as the second output data to the storage space.
  • the storage location of the first output data can be passed as a parameter from the first layer computing architecture to the second layer computing architecture.
  • the storage location of the first output data can be passed by assigning a preset variable.
  • the pointer variable of the input data of the second layer computing architecture may be assigned a storage address of the first output data, and the second layer computing architecture may directly use the pointer for calculation.
  • the data transfer process does not require data copying and transmission, which saves computational complexity and improves computational efficiency.
  • the assignment of pointers can also be done in the preprocessing stage.
  • the input data pointer and the output data pointer of each computing architecture can be assigned, so that the value of the pointer of the output data of the previous layer in the adjacent two layers is the same as that of the latter layer.
  • the value of the pointer to the input data is the same. In this way, the processing steps can be further reduced and the processing efficiency can be improved.
  • the allocated storage space may be divided into two or more sub-storage spaces, and each layer of the computing architecture may sequentially use the sub-storage spaces to store the output data.
  • FIG. 13 is a flow chart of a method for computing by each layer computing architecture using allocated storage spaces, respectively, in some embodiments. As shown in FIG. 13, the method may include the following steps.
  • Step 601 Store input data of the first layer computing architecture into a first storage space in the storage space.
  • Step 602 The first layer computing architecture stores the calculated first output data into a second storage space in the storage space.
  • Step 603 The second layer computing architecture stores the first output data stored in the second storage space as input data, and stores the calculated second output data in the first storage space.
  • Step 604 the third layer computing architecture stores the second output number of the first storage space. According to as input data.
  • the processing layer n-1 may store the output data in a sub-memory space in the allocated storage space, such as the storage space B (ie, the second In the storage space) (step 602).
  • the second layer computing architecture that is, the processing layer n, takes the data in the storage space B as input data, and stores the calculated output data into another sub-storage space in the allocated storage space, that is, the storage space A (first storage) Space) (step 603).
  • the third layer computing architecture, processing layer n+1 takes the data stored in storage space A as input data (step 604).
  • the first storage space and the second storage space are sub-storage spaces in the allocated storage space.
  • the sizes of the first storage space and the second storage space are each a maximum value of a storage space size used by each layer computing architecture to store input parameters and output parameters, that is, in the first maximum value and the third maximum value. Larger value.
  • FIG. 15 is a flow chart of a method for computing by each layer computing architecture using allocated storage spaces, respectively, in some embodiments. As shown in FIG. 15, the method may include the following steps.
  • Step 701 Store input data of the first layer computing architecture into a first storage space in the storage space.
  • Step 702 Store calculation parameters of the first layer computing architecture into a second storage space in the storage space.
  • Step 703 storing, by the first layer computing architecture, the first output data calculated according to the input data and the calculation parameter into a third storage space in the storage space;
  • Step 704 The first output data stored in the third storage space is used as input data of the second layer computing architecture, and the second output data calculated by the second layer computing architecture is stored in the first storage space or The second storage space;
  • Step 705 The second output data stored in the first storage space or the second storage space is used as input data of a third layer computing architecture.
  • the first storage space, the second storage space, and the third storage space are all sub-storage spaces in the allocated storage space.
  • the sizes of the first storage space, the second storage space, and the third storage space are maximum values of three storage space sizes used by each layer computing architecture to store input parameters, calculation parameters, and output parameters, that is, the foregoing The maximum of a maximum value, a second maximum value, and a third maximum value.
  • each of the above sub-storage spaces can also be used to notify each layer of the computational architecture by parameter assignment.
  • the pointer of the input data of each layer computing architecture and the pointer of the output data may be respectively assigned, as described above, and will not be described again here.
  • the process of computing by a certain layer of computing architecture using the allocated storage space may be as shown in FIG. 3.
  • Step 301 The machine learning system stores the calculation parameters of a certain layer of the computing architecture into the second storage space in the storage space.
  • Step 302 A layer computing architecture uses the first storage space in the storage space as a space for storing corresponding input parameters.
  • Step 303 A layer computing architecture calculates an output parameter according to the input parameter and the calculation parameter, and stores the output parameter into a third storage space in the storage space.
  • a layer of computing architecture is a first layer computing architecture, ie a layer computing architecture ranked first in the machine learning model
  • the input parameters of the first layer computing architecture may be user input to the machine learning system
  • the first layer computing architecture is a non-first layer computing architecture, and the non-first layer computing architecture performs the foregoing steps 301 to 303.
  • the first storage space in the foregoing step 301 is a previous layer computing architecture storage output of a certain layer computing architecture.
  • a storage space allocated by the machine learning system may include a first storage space, a second storage space, and a third storage space.
  • machine learning The system stores the input parameters of the first layer computing architecture into the first storage space, and stores the calculation parameters of the first layer computing architecture into the second storage space, so that the first layer computing architecture is calculated according to the input parameters and the calculation parameters.
  • Output parameters output output parameters to the third layer storage space.
  • the machine learning system can directly assign the address pointer of the third storage space to the space for storing the input parameters of the second layer computing architecture, and directly assign the address pointer of the second layer storage space to the calculation parameter for storing the second layer computing architecture.
  • Space the address pointer of the first storage space is assigned to the space of the output parameters of the second layer computing architecture.
  • the machine learning system can store the calculation parameters of the second layer computing architecture into the second storage space according to the address pointer of the second layer storage space, and adopt the overlay storage mode, that is, the calculation parameter of the second layer computing architecture.
  • the second layer computing architecture uses the information stored in the third layer storage space as an input parameter of the second layer computing architecture, and according to the input parameters and the calculation stored in the second storage space
  • the parameter calculates the output parameter and outputs the output parameter to the first storage space. It can be seen that the second layer computing architecture can recycle the storage space by using the pointer assignment method.
  • the machine learning system directly assigns the address pointer of the first storage space to the space for storing the input parameters of the third layer computing architecture, and directly assigns the address pointer of the second layer storage space to the calculation parameter for storing the third layer computing architecture.
  • the space allocates the address pointer of the third storage space to the space of the output parameter of the third layer computing architecture, so that the third layer computing architecture can recycle the storage space for corresponding calculation.
  • the computational architecture of each layer of the machine learning model utilizes the storage space to perform corresponding calculations layer by layer, which greatly reduces the storage space required for the machine learning model to run, thereby improving system performance.
  • the machine learning system is a deep learning system and the machine learning model is a deep learning model.
  • the deep learning model includes an n-layer computing architecture. In this embodiment, n is 3 as an example.
  • the flowchart of the method in this embodiment is as shown in FIG. 5, and includes the following steps.
  • Step 401 The deep learning system acquires a configuration file of the deep learning model, in the configuration file.
  • the device includes information of the calculation parameters corresponding to the three-layer computing architecture, information of the input parameters, and structural information.
  • Step 402 The depth learning system calculates the architecture for each layer, assigns an input parameter according to the information of the input parameter, and calculates an output parameter according to the structural information and the assignment of the input parameter, thereby determining the size of the output parameter of the corresponding layer computing architecture.
  • Step 403 The depth learning system uses the sum of the size of the input parameter of each layer of the computing architecture, the size of the output parameter, and the size of the calculated parameter as the size of the storage space corresponding to the computing layer of the corresponding layer.
  • the depth learning system determines the size of the storage space corresponding to each layer of the computing architecture, including: determining the size of the storage space required to store the input parameters, storing the size of the storage space required to calculate the parameters, and storing the storage space required for the output parameters. the size of.
  • Step 404 allocating storage space for the deep learning model.
  • the size of the storage space of each layer of the computing architecture determined by the deep learning system is the size of the input parameter corresponding to one layer of the computing architecture, the sum of the size of the output parameter and the size of the calculated parameter, the storage space allocated by the deep learning system The size is the same as the maximum storage space in the storage space of the 3-tier computing architecture.
  • the size of the storage space allocated by the deep learning system is The sum of the first maximum space, the second largest space, and the third largest space.
  • the first maximum space is the maximum space size of the input parameter stored in the storage space corresponding to the 3-layer computing architecture
  • the second maximum space is the maximum space size of the storage parameter stored in the storage space corresponding to the 3-layer computing architecture
  • the third The maximum space is the size of the maximum space in which the output parameters are stored in the storage space corresponding to the 3-layer computing architecture.
  • the deep learning system assigns a deep learning model to the deep learning model through steps 401 to 404 above After storing the space, the deep learning system can recycle the storage space according to the following steps 405 to 407.
  • Step 405 The deep learning system receives the parameter input by the user (ie, input data), and stores the parameter input by the user as an input parameter of the first layer computing architecture into the first storage space of the storage space, and calculates the calculation parameter of the first layer computing architecture.
  • the second storage space is stored in the storage space; the deep learning system calculates the output parameters of the first layer computing architecture according to the input parameters and the calculation parameters of the first layer computing architecture, and stores the output parameters into the third storage space of the storage space.
  • Step 406 The deep learning system directly assigns the address pointer of the third storage space to the space for storing the input parameters of the second layer computing architecture, and uses the output parameter of the first layer computing architecture as an input parameter of the second layer computing architecture;
  • the address pointer of the second layer storage space is directly assigned to the space for storing the calculation parameters of the second layer computing architecture, and the calculation parameters of the second layer computing architecture are stored in the second layer storage space;
  • the address pointer of the first storage space is assigned The space for outputting the output parameters of the second layer is stored in the first storage space according to the input parameters of the second layer computing architecture and the output parameters obtained by the calculation parameters.
  • Step 407 The deep learning system directly assigns the address pointer of the first storage space to the space for storing the input parameter of the third layer computing architecture, and uses the output parameter of the second layer computing architecture as the input parameter of the third layer computing architecture;
  • the address pointer of the second layer storage space is directly assigned to the space for storing the calculation parameters of the third layer computing architecture, and the calculation parameters of the third layer computing architecture are stored in the second layer storage space;
  • the address pointer of the third storage space is assigned The space of the output parameter of the third layer computing architecture is stored in the third storage space according to the input parameters obtained by the input parameters and the calculation parameters of the third layer computing architecture, and the output parameter is the final output parameter of the deep learning model.
  • the embodiment of the present application further provides a machine learning system, and a schematic structural diagram thereof is shown in FIG. 6 , which may include:
  • a storage determining unit 10 configured to respectively determine a size of a storage space corresponding to each layer computing architecture of the machine learning model
  • the allocating unit 11 is configured to allocate a corresponding storage space to the machine learning model according to the size of the storage space of each layer computing architecture determined by the storage determining unit 10, so that the storage space can store any layer computing architecture runtime Required information;
  • each layer computing architecture for the machine learning model uses the storage space allocated by the allocating unit 11 to perform corresponding calculations.
  • the computing unit 12 is configured to store the calculation parameters corresponding to the certain layer computing architecture into the second storage space in the storage space; the certain layer computing architecture stores the first storage in the storage space
  • the space is used as a space for storing corresponding input parameters, and an output parameter is calculated according to the input parameter and the calculation parameter, and the output parameter is stored in a third storage space in the storage space.
  • the first storage space is a space of a previous layer computing architecture storing output parameters of the layer computing architecture, and the layer computing The input parameter of the architecture is an output parameter of the previous layer computing architecture; the third storage space is a space for the previous layer computing architecture to store input parameters.
  • the allocating unit 11 allocates a storage space according to the size of the storage space corresponding to each layer of the computing learning model, so that the computing layers of the computing unit 12 can recycle the storage. space.
  • the machine learning system of the embodiment can reduce storage fragmentation caused by allocating multiple storage spaces, and greatly reduces machine learning.
  • the storage determining unit 10 may pass the output determining unit 110 and the final determining unit 120, wherein:
  • An output determining unit 110 configured to acquire a configuration file of the machine learning model, where the configuration file includes information of a calculation parameter of the certain layer computing architecture, information of input parameters, and structural information; and according to the input parameter Information, calculation parameter information and structural information determine the size of the output parameter of the layer computing architecture;
  • the final determining unit 120 is configured to use, as the size of the input parameter, the sum of the size of the output parameter determined by the output determining unit 110 and the size of the calculated parameter as the size of the storage space corresponding to the computing layer of the certain layer; or, determine The size of the storage space corresponding to the computing layer of the certain layer includes: a space size for storing the input parameter, a space size for storing the calculation parameter, and a space size for storing the output parameter.
  • the allocating unit 11 is configured to determine the The size of the maximum storage space in the storage space corresponding to the layer computing architecture; the storage space is allocated such that the size of the storage space is consistent with the size of the maximum storage space.
  • the allocating unit 11 is configured to determine a size of a first maximum space in which an input parameter is stored in a storage space corresponding to each layer computing architecture, a size of a second maximum space in which the calculation parameter is stored, and a third maximum space in which the output parameter is stored.
  • the storage space is allocated such that the size of the storage space is the sum of the sizes of the first maximum space, the second maximum space, and the third maximum space.
  • Embodiments of the present application also provide a computing device.
  • the computing device can be a different type of device, such as a server, a terminal device (such as a PC, a smart phone, a tablet, etc.), an embedded device (such as a monitoring device, an attendance device, etc.).
  • the structure of the terminal device of each embodiment is as shown in FIG.
  • the terminal device may be configured or Can make a big difference and make a big difference.
  • the terminal device may include one or more central processing units (CPUs) 20 (eg, one or more processors) and memory 21, one or more storage media 22 that store application 221 or data 222 ( For example, one or one storage device in Shanghai).
  • the memory 21 and the storage medium 22 may be short-term storage or persistent storage.
  • the program stored on the storage medium 22 may include one or more modules (not shown), each of which may include a series of instruction operations in the terminal device.
  • central processor 20 may be arranged to communicate with storage medium 22 to perform a series of instruction operations in storage medium 22 on the terminal device.
  • the terminal device may also include one or more power sources 23, one or more wired or wireless network interfaces 24, one or more input and output interfaces 25, and/or one or more operating systems 223, such as Windows ServerTM, Mac OS. XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the machine learning system can be stored in the storage medium 22, either as stand-alone executable code or as part of an application or application.
  • the machine learning system when the machine learning system is part of a camera application, the machine learning system can be a system for face detection; when the machine learning system is part of a photo landscaping application, the machine learning system can be used for face matching A quasi-system; when the machine learning system is part of a social application, the machine learning system can be a system for speech recognition, natural language processing, etc., and the like.
  • the structure of the embedded device of each embodiment is as shown in FIG.
  • the embedded device is a stand-alone device that integrates software and hardware.
  • the embedded device can include a controller 31, a random access memory (RAM) 321, a read only memory (ROM) 322, and an I/O interface 33.
  • Controller 31 is an embedded processor, such as a microcontroller or microcontroller (MCU). Instructions for implementing the machine learning system 323 are stored in the ROM 322.
  • the embedded device may further include a communication module, a display module, and the like.
  • the embedded device can be a monitoring device, an attendance device, a portable translation device, and the like.
  • the machine learning system 323 may be a system for target tracking; when the embedded device is an attendance device, the machine learning system 323 may be a system for biometric verification; when the embedded device is a portable translation device, the machine learning system 323 can be a system for speech recognition, machine translation.
  • the structure of the server of each embodiment is as shown in FIG.
  • the server can include a processor 41, a memory 42, and a network interface 43.
  • the memory 42 stores an operating system 421, a network communication module 422 for transmitting and receiving information via a network, and an instruction corresponding to the machine learning system 423.
  • Various data such as a configuration file of the machine learning system 423, and the like can also be stored in the memory 42.
  • FIG. 11 is a schematic diagram of a scenario of using a machine learning system according to an embodiment of the present application.
  • server system 51 can communicate with terminal device 53 and data storage device 54 over network 52.
  • Server system 51 may include one or more server devices.
  • the server system 51 includes a processor 511, a memory 512, and a communication interface 514.
  • Computer readable instructions are stored in memory 512, which may cause processor 511 to perform operations of machine learning system 513.
  • server system 511 can execute instructions corresponding to machine learning system 513, retrieve tagged training data from data storage device 54, and train machine learning system 513. This process, that is, causes the machine learning system 513 to perform deep learning using the tagged training data stored in the data storage device 54 to improve the performance of the machine learning system 513.
  • the server system 511 can provide the trained machine learning system 513 to the terminal device 53.
  • the terminal device 53 may be a PC, a smartphone, a tablet, or the like.
  • the machine learning system 513 can be provided to the terminal device 53 as executable code, or as part of an application.
  • End The end device 53 stores the machine learning system 533 in the memory 532 and causes the processor 531 to execute the code corresponding to the machine learning system 533 as needed to process the data collected by the terminal device 53.
  • the machine learning system 533 is a system for voice recognition
  • the terminal device 53 can acquire voice data through an input device such as a microphone or the like, and call the machine learning system 533.
  • the size of the storage space that needs to be allocated is calculated, and the storage space of the size is acquired in the storage 532; the voice data is stored in the storage space as input data of the multi-layer computing architecture.
  • the multi-tier computing architecture sequentially performs the calculation using the allocated storage space, and outputs the final calculation result to the program or process that invokes the machine learning system 533.
  • the terminal device 53 can acquire voice data through an input device such as a microphone or the like, and call the machine learning system 533.
  • the machine learning system 533 is running, the size of the storage space that needs to be allocated is calculated, and the storage space of the size is acquired in the storage 532; the voice data is stored in the storage space as input data of the multi-layer computing architecture.
  • the multi-tier computing architecture sequentially performs the calculation using the allocated storage space, and outputs the final calculation result to the program or process that invokes the machine learning system 533.
  • the photo beautification application can acquire image data through an input device (such as a camera, etc.) of the terminal device 53 and invoke the machine learning system 533.
  • an input device such as a camera, etc.
  • the machine learning system 533 is running, the size of the storage space to be allocated is calculated, and the storage space of the size is acquired in the storage 532; the image data is stored in the storage space as input data of the multi-layer computing architecture.
  • the multi-layer computing architecture sequentially uses the allocated storage space for calculation, and outputs the final calculation result (for example, facial five-point position information in the image data) to the photo landscaping application.
  • the sub-steps may be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, which may include: a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. .
  • ROM read only memory
  • RAM random access memory
  • magnetic disk or an optical disk etc.

Abstract

本申请各实施例公开了机器学习方法及系统,应用于信息处理技术领域。在本实施例的方法中,机器学习系统会根据机器学习模型的各层计算架构对应的存储空间的大小分配一个存储空间,这样各层计算架构可以循环利用该存储空间。本实施例的方法可以很大程度地减少了机器学习模型运行时所需的存储空间,从而提升了系统性能。

Description

一种机器学习方法及系统
相关文件
本申请要求2016年10月14日提交中国专利局、申请号为201610898838.6、申请各实施例名称为“一种机器学习方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息处理技术领域,特别涉及一种机器学习方法及系统。
背景
深度学习(Deep Learning)是机器学习的一种。深度学习技术通过建立神经网络,模拟生物神经系统的机制,从大量的数据中学习各种表征(representations),用于解释数据,如图像、声音、文本,等。深度学习技术可以应用于诸如计算机视觉、语音识别、自然语言处理、社交网络过滤、机器翻译、生物信息学等领域。深度学习使用一连串多个层级的非线性处理单元来提取特征并进行变换。其中,每个层级中的非线性处理单元可以称为一个计算架构。各层级的计算架构使用前一层计算架构的输出作为输入,从而从较低层级的数据特征中提取出更高层级的数据特征。各层级的计算架构的存储空间相互独立。深度学习算法中,各层级的非线性处理单元的组成与该层级解决的问题有关。算法的复杂度越高,所需的总存储空间越大。
技术内容
本申请实施例提供一种机器学习方法及系统,实现了为机器学习模 型分配整体存储空间,以便机器学习模型的各层计算架构循环利用。
本申请实施例提供一种机器学习方法,包括:
分别确定机器学习模型的各层计算架构所需的存储空间的大小;
根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够储存任一层计算架构运行时所需的信息且小于所述各层计算架构所需的存储空间的大小之和;
所述机器学习模型的各层计算架构分别利用所述存储空间进行相应计算。
本申请实施例还提供一种计算设备,包括:处理器和存储器,所述存储器中存储有机器可读指令,可以使所述处理器:
分别确定机器学习模型的各层计算架构所需的存储空间的大小;
根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够储存任一层计算架构运行时所需的信息且小于所述各层计算架构所需的存储空间的大小之和;
所述机器学习模型的各层计算架构分别利用所述存储空间进行计算。
本申请实施例还提供一种机器可读存储介质,其中存储有机器可读指令,所述指令可以由处理器执行用于:
分别确定机器学习模型的各层计算架构所需的存储空间的大小;
根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够储存任一层计算架构运行时涉及的信息且小于所述各层计算架构所需的存储空间的大小之和;
所述机器学习模型的各层计算架构分别利用所述存储空间进行计算。
可见,在本实施例的方法中,机器学习系统会根据机器学习模型的 各层计算架构对应的存储空间的存储值分配一个整体存储空间,这样各层计算架构可以循环利用该整体存储空间。相比现有技术中,需要为各层计算架构分别分配对应的存储空间,本实施例的方法可以减少因分配多个存储空间而造成的存储碎片,且很大程度地减少了机器学习模型运行时所需的存储空间,从而提升了系统性能,这样就可以将该机器学习方法运行于存储受限的终端设备。
附图简要说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种机器学习方法的流程图;
图2a是本申请实施例中确定某一层计算架构对应的存储空间的存储值的方法流程图;
图2b是本申请实施例中确定某一层计算架构对应的存储空间的存储值的方法流程图;
图3是本申请实施例中某一层计算架构利用整体存储空间进行相应计算的方法流程图;
图4是本申请实施例中各层计算架构循环利用整体存储空间的示意图;
图5是本申请应用实施例中提供的一种机器学习方法的流程图;
图6是本申请实施例提供的一种机器学习系统的结构示意图;
图7是本申请实施例提供的另一种机器学习系统的结构示意图;
图8是本申请实施例提供的一种终端设备的结构示意图;
图9是本申请实施例提供的一种嵌入式设备的结构示意图;
图10是本申请实施例提供的一种服务器的结构示意图;
图11是本申请实施例提供的一种使用机器学习系统的场景示意图;
图12为一些实施例中各层计算架构分别利用分配的存储空间进行计算的方法流程图;
图13为一些实施例中各层计算架构分别利用分配的存储空间进行计算的方法流程图;
图14为一些实施例中各层计算架构分别利用存储空间的示意图;
图15为一些实施例中,各层计算架构分别利用分配的存储空间进行计算的方法流程图。
实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)仅仅是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排它的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单 元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例提供一种机器学习方法。该方法可以由机器学习系统,比如深度学习系统等执行。该机器学习系统可以由计算设备实现。计算设备可以是服务器、终端设备(如PC、智能手机、平板电脑,等)、嵌入式设备等。如图1所示,该方法可以包括以下步骤。
步骤101,分别确定机器学习模型的各层计算架构所需存储空间的大小。
机器学习模型是包括多层计算架构的计算模块。各层计算架构可以是采用不同的计算架构,如卷积层,相加层,相减层等,这些层组合起来形成机器学习模型的计算架构,以实现一定的功能,比如通过深度学习进行前向预测等功能。机器学习系统是指包括机器学习模型及周边功能的计算系统。周边功能可以包括,但不限于,初始化功能、存储空间分配功能、计算结果输出功能,等。
每一层计算架构都包括输入单元、计算单元和输出单元,这些单元在运行时都会占用一定的存储空间,因此,某一层计算架构对应的存储空间包括该层计算架构所包括的各个单元在运行时所需的存储空间。在执行本步骤时,机器学习系统会根据机器学习模型的配置文件来获取。
步骤102,根据步骤101确定的各层计算架构的存储空间的存储值为机器学习模型分配对应的存储空间,使得该存储空间能储存任一层计算架构运行时所需的信息。
本实施例中,机器学习系统为机器学习模型分配一个存储空间(也称为整体存储空间),使得各层计算架构运行时循环利用该存储空间,该存储空间需要足够储存任一层计算架构运行时所需的信息。比如该存储空间的大小(也称为存储空间的存储值)与各层计算架构的存储空间 中最大存储空间的大小一致。
步骤103,机器学习模型的各层计算架构分别利用分配的存储空间进行计算。
可见,在本实施例的方法中,机器学习系统会根据机器学习模型的各层计算架构对应的存储空间的大小分配一个存储空间,这样各层计算架构可以循环利用该存储空间,可以很大程度地减少机器学习模型运行时所需的存储空间,使得该机器学习方法可以运行于存储受限的设备,如终端设备、嵌入式设备中。同时,还可以避免计算平台逐个为各层计算架构分配存储空间,减少了存储碎片的形成。
在一些实施例中,机器学习系统在执行上述步骤101中确定某一层计算架构对应的存储空间的大小,可以通过图2a所示的方法来实现。
步骤201,获取机器学习模型的配置文件,配置文件中包括某一层计算架构的计算参数的信息,输入参数的信息及结构信息。
其中,计算参数是指该层计算架构在计算时所用到的具有固定值的参数,比如一些系数等。计算参数的信息可以包括计算参数的大小和类型等信息。结构信息可以包括该层计算架构的描述信息等。输入参数是指计算架构在计算时需要的一个未知数值,其取值需要从外部获得。输入参数的信息可以包括输入参数的大小和类型等信息。
步骤202,根据输入参数的信息,计算参数的信息及结构信息确定某一层计算架构的输出参数的大小。
例如,机器学习系统可以根据输入参数的信息对输入参数进行赋值,并根据结构信息及输入参数的赋值计算出输出参数,然后即可确定输出参数的大小。
这里,计算架构的输入参数的大小是指在该计算架构的计算过程中所需的输入数据的大小;输出参数的大小是指在该计算架构计算输出的 数据的大小。输入数据为计算架构为进行计算而获取的作为输入参数的值,即输入参数值;输出数据是计算架构计算得到的输出参数的值,即输出参数值。
步骤203,将输入参数的大小,输出参数的大小及计算参数的大小之和作为某一层计算架构对应的存储空间的大小。
在这种情况下,机器学习系统在执行上述步骤102时,可以确定各层计算架构对应的存储空间中存储空间大小的最大值,这样在分配存储空间时,使得分配的存储空间的大小与最大存储空间的大小一致。
在一些实施例中,机器学习系统在执行上述步骤101中确定某一层计算架构对应的存储空间的大小,可以通过图2b所示的方法来实现。
图2b中的步骤201、202与图2a中的步骤201、202相同,不再赘述。
步骤204,确定某一层计算架构对应的存储空间的大小包括:储存输入参数所需的存储空间的大小,储存计算参数所需的存储空间的大小及储存输出参数所需的存储空间的大小,即该层计算架构所包括的输入单元、计算单元和输出单元分别占用的存储空间的大小。
在这种情况下,机器学习系统在执行上述步骤102时,具体可以确定各层计算架构对应的存储空间中储存输入参数的第一最大空间的存储值(即各层计算架构储存输入参数所需存储空间大小中的最大值,以下称为第一最大值),储存计算参数的第二最大空间的存储值(即各层计算架构储存计算参数所需的存储空间大小中的最大值,以下称为第二最大值)及储存输出参数的第三最大空间的存储值(即各层计算架构储存输出参数所需的存储空间大小中的最大值,以下称为第三最大值)。这样在分配整体存储空间时,使得整体存储空间的大小是第一最大值,第二最大值及第三最大值之和。
比如,一个机器学习模型有3层计算架构,第一层计算架构需要的储存输入参数,计算参数和输出参数的存储空间大小分别为a1,a2和a3,第二层计算架构需要的储存输入参数,计算参数和输出参数的存储空间大小分别为b1,b2和b3,第三层计算架构需要的储存输入参数,计算参数和输出参数的存储空间的大小分别为c1,c2和c3,其中,a1大于b1且大于c1,b2大于a2且大于c2,c3大于a2且大于b2,则确定第一最大值,第二最大值及第三最大值分别为a1,b2和c3,因此,分配的存储空间的大小为a1+b2+c3。
其中,第一最大值,第二最大值和第三最大值并不是指大小排在前面三个位置的空间大小,而是指不同维度的最大空间,即分别用于存储输入参数、计算参数和输出参数的三个存储空间大小的最大值。
图12为一些实施例中,各层计算架构分别利用分配的存储空间进行计算的方法流程图。如图12所示,该方法可以包括以下步骤。
步骤501,将第一层计算架构的第一输出数据写入所述存储空间。
步骤502,第二层计算架构将所述第一输出数据作为输入数据,利用所述存储空间执行所述第二层计算架构的计算。
步骤503,将所述第二层计算架构的第二输出数据写入所述存储空间。
本文中,“第一层”、“第二层”等并不是指执行顺序排在前面的计算架构,而是指各计算架构中任意的计算架构,“第一”、“第二”、“第三”仅用于区分描述中涉及的几个计算架构。
一些实施例中,步骤502中,将所述第一输出数据作为第二层计算架构的输入数据,利用所述存储空间执行所述第二层计算架构的计算可以包括:
将所述第一输出数据的存储位置提供给所述第二层计算架构;
所述第二层计算架构从所述存储位置读取所述第一输出数据作为所述输入数据,并将计算结果作为所述第二输出数据写入所述存储空间。
第一输出数据的存储位置可以作为参数由第一层计算架构传递给第二层计算架构。第一输出数据的存储位置可以通过对预设变量进行赋值进行传递。例如,可以将第二层计算架构的输入数据的指针变量赋值为第一输出数据的存储地址,第二层计算架构可以直接利用该指针进行计算。这样,该数据传递过程不需要数据拷贝和传输,节约了计算量,提高了计算效率。此外,指针的赋值还可以在预处理阶段完成。例如,在为机器学习模型分配存储空间后,就可以为各计算架构的输入数据指针和输出数据指针进行赋值,使得相邻两层中前一层的输出数据的指针的值与后一层的输入数据的指针的值相同。这样,可以进一步减少处理步骤,提高处理效率。
一些实施例中,可以将分配的存储空间划分出两个或更多个子存储空间,各层计算架构可以依次轮换使用这些子存储空间来存储输出数据。
图13为一些实施例中,各层计算架构分别利用分配的存储空间进行计算的方法流程图。如图13所示,该方法可以包括以下步骤。
步骤601,将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间。
步骤602,所述第一层计算架构将计算得到的第一输出数据储存到所述存储空间中的第二存储空间。
步骤603,第二层计算架构将所述第二存储空间存储的第一输出数据作为输入数据,将计算得到的第二输出数据存储到所述第一存储空间。
步骤604,第三层计算架构将所述第一存储空间存储的第二输出数 据作为输入数据。
如图14所示,当第一层计算架构为处理层n-1时,处理层n-1可以将输出数据存储到分配的存储空间中的一个子存储空间,如存储空间B(即第二存储空间)中(步骤602)。第二层计算架构,即处理层n,将存储空间B中的数据作为输入数据,将计算得到的输出数据存储到分配的存储空间中的另一个子存储空间,即存储空间A(第一存储空间)(步骤603)。第三层计算架构,即处理层n+1,将存储空间A中存储的数据作为输入数据(步骤604)。
在该实施例中,第一存储空间和第二存储空间为分配的存储空间中的子存储空间。一些例子中,第一存储空间和第二存储空间的大小均为各层计算架构用于存储输入参数和输出参数的存储空间大小的最大值,即上述第一最大值和第三最大值中的较大的值。
图15为一些实施例中,各层计算架构分别利用分配的存储空间进行计算的方法流程图。如图15所示,该方法可以包括以下步骤。
步骤701,将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
步骤702,将所述第一层计算架构的计算参数储存到所述存储空间中的第二存储空间;
步骤703,将所述第一层计算架构根据所述输入数据和所述计算参数计算得到的第一输出数据储存到所述存储空间中的第三存储空间;
步骤704,将所述第三存储空间存储的第一输出数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间或所述第二存储空间;
步骤705,将所述第一存储空间或所述第二存储空间存储的第二输出数据作为第三层计算架构的输入数据。
在该实施例中,第一存储空间、第二存储空间和第三存储空间均为分配的存储空间中的子存储空间。一些例子中,第一存储空间、第二存储空间和第三存储空间的大小均为各层计算架构用于存储输入参数、计算参数和输出参数的三个存储空间大小的最大值,即上述第一最大值、第二最大值、第三最大值中的最大值。
以上各子存储空间的位置也可以通过参数赋值来通知各层计算架构。例如,可以对各层计算架构的输入数据的指针和输出数据的指针分别进行赋值,如前所述,这里不再赘述。
在一些实施例中,机器学习系统在执行上述步骤103时,某一层计算架构利用上述分配的存储空间进行计算的过程可以如图3所示。
步骤301,机器学习系统将某一层计算架构的计算参数储存到存储空间中的第二存储空间。
步骤302,某一层计算架构将存储空间中的第一存储空间作为储存对应输入参数的空间。
步骤303,某一层计算架构根据输入参数和计算参数计算得到输出参数,将输出参数储存到存储空间中的第三存储空间。
如果某一层计算架构为第一层计算架构,即排在机器学习模型的第一位置的一层计算架构,则第一层计算架构的输入参数可以是用户输入到机器学习系统的;如果某一层计算架构为非第一层计算架构,非第一层计算架构在执行上述步骤301到303时,上述步骤301中的第一存储空间为某一层计算架构的前一层计算架构储存输出参数的空间,且某一层计算架构的输入参数为前一层计算架构的输出参数;而上述步骤303中的第三存储空间为前一层计算架构储存输入参数的空间。
例如,参考图4所示为机器学习系统分配的存储空间,可以包括第一存储空间,第二存储空间和第三存储空间,在初始计算时,机器学习 系统会将第一层计算架构的输入参数储存到第一存储空间,将第一层计算架构的计算参数储存到第二存储空间,这样第一层计算架构就会根据输入参数和计算参数计算得到输出参数,将输出参数输出到第三层存储空间。之后,机器学习系统可以将第三存储空间的地址指针直接赋给储存第二层计算架构的输入参数的空间,将第二层存储空间的地址指针直接赋给存储第二层计算架构的计算参数的空间,将第一存储空间的地址指针赋给第二层计算架构的输出参数的空间。
这样机器学习系统可以根据第二层存储空间的地址指针,将第二层计算架构的计算参数储存到第二存储空间中,是采用覆盖式地储存方式,即用第二层计算架构的计算参数直接覆盖第二存储空间中已经的信息,然后第二层计算架构将第三层存储空间中储存的信息作为第二层计算架构的输入参数,并根据输入参数及第二存储空间中储存的计算参数计算得到输出参数,将输出参数输出到第一存储空间。可见,采用指针赋值的方法,第二层计算架构可以循环利用存储空间。
之后,机器学习系统会将第一存储空间的地址指针直接赋给储存第三层计算架构的输入参数的空间,将第二层存储空间的地址指针直接赋给存储第三层计算架构的计算参数的空间,将第三存储空间的地址指针赋给第三层计算架构的输出参数的空间,这样第三层计算架构就可以循环利用存储空间进行相应计算。按照上述的方法,以此类推,机器学习模型的各层计算架构逐层地利用存储空间进行相应计算,很大程度地减少了机器学习模型运行时所需的存储空间,从而提升了系统性能。
在一些实施例中,机器学习系统为深度学习系统,机器学习模型为深度学习模型。该深度学习模型包括n层计算架构,本实施例中以n为3为例说明。则本实施例的方法流程图如图5所示,包括如下步骤。
步骤401,深度学习系统获取深度学习模型的配置文件,在配置文 件中包括3层计算架构分别对应的计算参数的信息,输入参数的信息及结构信息。
步骤402,深度学习系统针对每一层计算架构,根据输入参数的信息对输入参数进行赋值,并根据结构信息及输入参数的赋值计算出输出参数,从而确定对应一层计算架构的输出参数的大小。
步骤403,深度学习系统将每一层计算架构的输入参数的大小,输出参数的大小及计算参数的大小之和作为对应一层计算架构对应的存储空间的大小。
或者,深度学习系统确定每一层计算架构对应的存储空间的大小包括:确定储存输入参数所需的存储空间的大小,储存计算参数所需的存储空间的大小及储存输出参数所需的存储空间的大小。
步骤404,为深度学习模型分配存储空间。
其中,如果深度学习系统确定的每一层计算架构的存储空间的大小为对应一层计算架构的输入参数的大小,输出参数的大小及计算参数的大小之和,则深度学习系统分配的存储空间的大小与3层计算架构的存储空间中最大存储空间的大小一致。
如果深度学习系统确定的每一层计算架构的存储空间的大小包括:储存输入参数的空间大小,储存计算参数的空间大小及储存输出参数的空间大小,则深度学习系统分配的存储空间的大小为第一最大空间,第二最大空间及第三最大空间的大小之和。其中,第一最大空间为3层计算架构对应的存储空间中储存输入参数的最大空间的大小,第二最大空间为3层计算架构对应的存储空间中储存计算参数的最大空间的大小,第三最大空间为3层计算架构对应的存储空间中储存输出参数的最大空间的大小。
当深度学习系统通过上述步骤401到404为深度学习模型分配一个 存储空间后,深度学习系统可以按照如下步骤405到407的方法,循环利用该存储空间。
步骤405,深度学习系统接收用户输入的参数(即输入数据),将用户输入的参数作为第一层计算架构的输入参数储存到存储空间的第一存储空间,将第一层计算架构的计算参数储存到存储空间的第二存储空间;深度学习系统根据第一层计算架构的输入参数和计算参数计算得到第一层计算架构的输出参数,并将输出参数储存到存储空间的第三存储空间。
步骤406,深度学习系统将第三存储空间的地址指针直接赋给储存第二层计算架构的输入参数的空间,将第一层计算架构的输出参数作为第二层计算架构的输入参数;将第二层存储空间的地址指针直接赋给存储第二层计算架构的计算参数的空间,并将第二层计算架构的计算参数储存到第二层存储空间中;将第一存储空间的地址指针赋给第二层计算架构的输出参数的空间,将根据第二层计算架构的输入参数和计算参数得到的输出参数储存到第一存储空间中。
步骤407,深度学习系统将第一存储空间的地址指针直接赋给储存第三层计算架构的输入参数的空间,将第二层计算架构的输出参数作为第三层计算架构的输入参数;将第二层存储空间的地址指针直接赋给存储第三层计算架构的计算参数的空间,并将第三层计算架构的计算参数储存到第二层存储空间中;将第三存储空间的地址指针赋给第三层计算架构的输出参数的空间,将根据第三层计算架构的输入参数和计算参数得到的输出参数储存到第三存储空间中,则该输出参数为深度学习模型的最终输出参数。
本申请各实施例实施例还提供一种机器学习系统,其结构示意图如图6所示,可以包括:
存储确定单元10,用于分别确定机器学习模型的各层计算架构对应的存储空间的大小;
分配单元11,用于根据所述存储确定单元10确定的各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间能储存任一层计算架构运行时所需的信息;
计算单元12,用于所述机器学习模型的各层计算架构分别利用所述分配单元11分配的存储空间进行相应计算。
地,计算单元12,用于将所述某一层计算架构对应的计算参数储存到所述存储空间中的第二存储空间;所述某一层计算架构将所述存储空间中的第一存储空间作为储存对应输入参数的空间,根据所述输入参数和计算参数计算得到输出参数,将所述输出参数储存到所述存储空间中的第三存储空间。
如果所述某一层计算架构为非第一层计算架构,则所述第一存储空间为所述某一层计算架构的前一层计算架构储存输出参数的空间,且所述某一层计算架构的输入参数为所述前一层计算架构的输出参数;所述第三存储空间为所述前一层计算架构储存输入参数的空间。
可见,在本实施例的机器学习系统中,分配单元11会根据机器学习模型的各层计算架构对应的存储空间的大小分配一个存储空间,这样计算单元12的各层计算架构可以循环利用该存储空间。相比现有技术中,需要为各层计算架构分别分配对应的存储空间,本实施例的机器学习系统可以减少因分配多个存储空间而造成的存储碎片,且很大程度地减少了机器学习模型运行时所需的存储空间,从而提升了系统性能,这样就可以将该机器学习系统运行于存储受限的终端设备。
参考图7所示,在一个的实施例中,存储确定单元10可以通过输出确定单元110和最终确定单元120,其中:
输出确定单元110,用于获取所述机器学习模型的配置文件,所述配置文件中包括所述某一层计算架构的计算参数的信息,输入参数的信息及结构信息;根据所述输入参数的信息,计算参数的信息及结构信息确定所述某一层计算架构的输出参数的大小;
最终确定单元120,用于将所述输入参数的大小,输出确定单元110确定的输出参数的大小及计算参数的大小之和作为所述某一层计算架构对应的存储空间的大小;或者,确定所述某一层计算架构对应的存储空间的大小包括:储存所述输入参数的空间大小,储存所述计算参数的空间大小及储存所述输出参数的空间大小。
其中,如果最终确定单元120将所述输入参数的大小,输出参数的大小及计算参数的大小之和作为所述某一层计算架构对应的存储空间的大小则分配单元11用于确定所述各层计算架构对应的存储空间中最大存储空间的大小;分配存储空间,使得所述存储空间的大小与所述最大存储空间的大小一致。
如果最终确定单元120确定所述某一层计算架构对应的存储空间的大小包括:储存所述输入参数的空间大小,储存所述计算参数的空间大小及储存所述输出参数的空间大小,则所述分配单元11,用于确定所述各层计算架构对应的存储空间中储存输入参数的第一最大空间的大小,储存计算参数的第二最大空间的大小及储存输出参数的第三最大空间的大小;分配存储空间,使得所述存储空间的大小是所述第一最大空间,第二最大空间及第三最大空间的大小之和。
本申请各实施例还提供一种计算设备。各实施例中,计算设备可以为不同类型的设备,例如服务器、终端设备(如PC、智能手机、平板电脑,等)、嵌入式设备(如监控设备、考勤设备等)。
各实施例的终端设备的结构如图8所示。该终端设备可因配置或性 能不同而产生比较大的差异。该终端设备可以包括一个或一个以上中央处理器(central processing units,CPU)20(例如,一个或一个以上处理器)和存储器21,一个或一个以上存储应用程序221或数据222的存储介质22(例如一个或一个以上海量存储设备)。其中,存储器21和存储介质22可以是短暂存储或持久存储。存储在存储介质22的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对终端设备中的一系列指令操作。更进一步地,中央处理器20可以设置为与存储介质22通信,在终端设备上执行存储介质22中的一系列指令操作。
终端设备还可以包括一个或一个以上电源23,一个或一个以上有线或无线网络接口24,一个或一个以上输入输出接口25,和/或,一个或一个以上操作系统223,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
机器学习系统可以存储在存储介质22中,可以是独立的可执行代码,也可以是应用程序或应用程序的一部分。例如,当机器学习系统是相机应用程序的一部分时,机器学习系统可以是用于人脸检测的系统;当机器学习系统是照片美化应用程序的一部分时,机器学习系统可以是用于人脸配准的系统;当机器学习系统是社交应用程序的一部分时,机器学习系统可以是用于语音识别、自然语言处理等的系统,等。
各实施例的嵌入式设备的结构如图9所示。该嵌入式设备为集软硬件于一体的可独立工作的器件。该嵌入式设备可以包括控制器31、随机存取存储器(RAM)321、只读存储器(ROM)322和I/O接口33。控制器31是嵌入式处理器,例如单片机或微控制器(MCU)。ROM 322中存储有用于实现机器学习系统323的指令。其它实施例中,嵌入式设备还可以包括通讯模块、显示模块等。该嵌入式设备可以是监控设备、考勤设备、便携式翻译设备,等。例如,当该嵌入式设备为监控设备时, 机器学习系统323可以是用于目标跟踪的系统;当该嵌入式设备为考勤设备时,机器学习系统323可以是用于活体检验的系统;当该嵌入式设备为便携式翻译设备时,机器学习系统323可以是用于语音识别、机器翻译的系统。
各实施例的服务器的结构如图10所示。该服务器可以包括处理器41、存储器42、网络接口43。存储器42中存储有操作系统421,用于通过网络收发信息的网络通信模块422,和机器学习系统423对应的指令。存储器42中还可以存储各种数据,例如机器学习系统423的配置文件,等。
上述方法实施例中所述的由机器学习系统所执行的步骤可以由该图8、9、10中任一设备执行。
图11为本申请实施例的一种使用机器学习系统的场景的示意图。如图11所示,服务器系统51可以通过网络52与终端设备53和数据存储设备54通信。
服务器系统51可以包括一台或多台服务器设备。服务器系统51包括处理器511、存储器512和通信接口514。存储器512中存储有计算机可读指令,可以使处理器511执行机器学习系统513的操作。
一些实施例中,服务器系统511可以执行机器学习系统513对应的指令,从数据存储设备54获取已标记的训练数据,对机器学习系统513进行训练。这个过程也就是,使机器学习系统513利用数据存储设备54中存储的已标记的训练数据进行深度学习,以改善机器学习系统513的性能。当机器学习系统513的性能达到预设要求时,服务器系统511可以将训练后的机器学习系统513提供给终端设备53。
终端设备53可以是PC、智能手机、平板电脑等。机器学习系统513可以作为可执行的代码,或者应用程序的一部分提供给终端设备53。终 端设备53将机器学习系统533存储在存储器532中,并在需要时使处理器531执行该机器学习系统533对应的代码,对终端设备53采集的数据进行处理。例如,当机器学习系统533为用于语音识别的系统时,终端设备53可以通过输入设备(如麦克风等)采集语音数据,调用机器学习系统533。机器学习系统533运行时,计算需要分配的存储空间的大小,并在存储器532中获取该大小的存储空间;将上述语音数据存储到该存储空间,作为多层计算架构的输入数据。多层计算架构依次利用分配的该存储空间进行计算,将最终的计算结果输出给调用该机器学习系统533的程序或进程。
例如,当机器学习系统533为用于语音识别的系统时,终端设备53可以通过输入设备(如麦克风等)采集语音数据,调用机器学习系统533。机器学习系统533运行时,计算需要分配的存储空间的大小,并在存储器532中获取该大小的存储空间;将上述语音数据存储到该存储空间,作为多层计算架构的输入数据。多层计算架构依次利用分配的该存储空间进行计算,将最终的计算结果输出给调用该机器学习系统533的程序或进程。
又例如,当机器学习系统533为照片美化应用中的一部分,用于人脸配准时,照片美化应用可以通过终端设备53的输入设备(如摄像头等)采集图像数据,并调用机器学习系统533。机器学习系统533运行时,计算需要分配的存储空间的大小,并在存储器532中获取该大小的存储空间;将上述图像数据存储到该存储空间,作为多层计算架构的输入数据。多层计算架构依次利用分配的该存储空间进行计算,将最终的计算结果(例如图像数据中人脸五官位置信息)输出给照片美化应用。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部 分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM)、随机存取存储器RAM)、磁盘或光盘等。
以上对本申请各实施例实施例所提供的机器学习方法及系统进行了详细介绍,本文中应用了个例对本申请各实施例的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请各实施例的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请各实施例的思想,在实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请各实施例的限制。

Claims (22)

  1. 一种机器学习方法,其特征在于,应用于计算设备,包括:
    分别确定机器学习模型的各层计算架构所需的存储空间的大小;
    根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够储存任一层计算架构运行时涉及的信息且小于所述各层计算架构所需的存储空间的大小之和;
    所述机器学习模型的各层计算架构分别利用所述存储空间进行计算。
  2. 如权利要求1所述的方法,其特征在于,确定所述机器学习模型的各层计算架构所需的存储空间的大小包括:
    从所述机器学习模型的配置文件中获取一层计算架构的计算参数的信息,输入参数的信息及结构信息;
    根据所述输入参数的信息,计算参数的信息及结构信息确定所述某一层计算架构的输出参数的大小;
    根据所述计算参数的信息确定该层计算架构储存所述输入参数所需的存储空间的大小、储存所述计算参数所需的存储空间的大小、及储存所述输出参数所需的存储空间的大小。
  3. 如权利要求1所述的方法,其特征在于,所述根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,包括:
    确定所述各层计算架构所需的存储空间中最大存储空间的大小;
    分配所述存储空间,使得所述存储空间的大小与所述最大存储空间的大小一致。
  4. 如权利要求1所述的方法,其特征在于,所述根据所述各层计算 架构的存储空间的大小为所述机器学习模型分配对应的存储空间,包括:
    确定所述各层计算架构对应的存储空间中储存输入参数所需的存储空间大小的第一最大值,储存计算参数所需的存储空间大小的第二最大值及储存输出参数所需的存储空间大小的第三最大值;
    分配所述存储空间,使得所述存储空间的大小是所述第一最大值,第二最大值及第三最大值之和。
  5. 如权利要求1所述的方法,其特征在于,所述机器学习模型的各层计算架构分别利用所述存储空间进行计算包括:
    将第一层计算架构的第一输出数据写入所述存储空间;
    将所述第一输出数据作为第二层计算架构的输入数据,利用所述存储空间执行所述第二层计算架构的计算;
    将所述第二层计算架构的第二输出数据写入所述存储空间。
  6. 如权利要求5所述的方法,其特征在于,将所述第一输出数据作为第二层计算架构的输入数据,利用所述存储空间执行所述第二层计算架构的计算包括:
    将所述第一输出数据的存储位置提供给所述第二层计算架构;
    所述第二层计算架构从所述存储位置读取所述第一输出数据作为所述输入数据,并将计算结果作为所述第二输出数据写入所述存储空间。
  7. 如权利要求1所述的方法,其特征在于,所述机器学习模型的各层计算架构分别利用所述存储空间进行计算包括:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构计算得到的第一输出数据储存到所述存储空间中的第二存储空间;
    将所述第二存储空间中存储的所述第一输出数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间;
    将所述第一存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
  8. 如权利要求1所述的方法,其特征在于,所述机器学习模型的各层计算架构分别利用所述存储空间进行计算包括:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构的计算参数储存到所述存储空间中的第二存储空间;
    将所述第一层计算架构根据所述输入数据和所述计算参数计算得到的第一输出数据储存到所述存储空间中的第三存储空间;
    将所述第三存储空间中存储的数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间或所述第二存储空间;
    将所述第一存储空间或所述第二存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
  9. 一种计算设备,其特征在于,包括:处理器和存储器,所述存储器中存储有机器可读指令,可以使所述处理器:
    分别确定机器学习模型的各层计算架构所需的存储空间的大小;
    根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够能储存任一层计算架构运行时涉及的信息且小于所述各层计算架构所需的存储空间的大小之和;
    所述机器学习模型的各层计算架构分别利用所述存储空间进行计算。
  10. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    获取所述机器学习模型的配置文件,所述配置文件中包括所述某一层计算架构的计算参数的信息,输入参数的信息及结构信息;
    根据所述输入参数的信息,计算参数的信息及结构信息确定所述某一层计算架构的输出参数的大小;
    根据所述计算参数的信息确定该层计算架构储存所述输入参数所需的存储空间的大小、储存所述计算参数所需的存储空间的大小、及储存所述输出参数所需的存储空间的大小。
  11. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    确定所述各层计算架构对应的存储空间中最大存储空间的大小;
    分配所述存储空间,使得所述存储空间的大小与所述最大存储空间的大小一致。
  12. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    确定所述各层计算架构对应的存储空间中储存输入参数所需的存储空间大小的第一最大值,储存计算参数所需存储空间大小的第二最大值及储存输出参数所需存储空间大小的第三最大值;
    分配所述存储空间,使得所述存储空间的大小是所述第一最大值、第二最大值及第三最大值之和。
  13. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    将第一层计算架构的第一输出数据写入所述存储空间;
    将所述第一输出数据作为第二层计算架构的输入数据,利用所述存储空间执行所述第二层计算架构的计算;
    将所述第二层计算架构的第二输出数据写入所述存储空间。
  14. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构计算得到的第一输出数据储存到所述存储空间中的第二存储空间;
    将所述第二存储空间中存储的所述第一输出数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间;
    将所述第一存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
  15. 如权利要求9所述的计算设备,其特征在于,所述机器可读指令可以使所述处理器:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构的计算参数储存到所述存储空间中的第二存储空间;
    将所述第一层计算架构根据所述输入数据和所述计算参数计算得到的第一输出数据储存到所述存储空间中的第三存储空间;
    将所述第三存储空间中存储的数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存 储空间或所述第二存储空间;
    将所述第一存储空间或所述第二存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
  16. 一种机器可读存储介质,其特征在于,存储有机器可读指令,所述指令可以由处理器执行用于:
    分别确定机器学习模型的各层计算架构所需的存储空间的大小;
    根据所述各层计算架构的存储空间的大小为所述机器学习模型分配对应的存储空间,使得所述存储空间的大小足够储存任一层计算架构运行时涉及的信息且小于所述各层计算架构所需的存储空间的大小之和;
    所述机器学习模型的各层计算架构分别利用所述存储空间进行计算。
  17. 如权利要求16所述的存储介质,其特征在于,所述指令可以由处理器执行用于:
    获取所述机器学习模型的配置文件,所述配置文件中包括所述某一层计算架构的计算参数的信息,输入参数的信息及结构信息;
    根据所述输入参数的信息,计算参数的信息及结构信息确定所述某一层计算架构的输出参数的大小;
    根据所述计算参数的信息确定该层计算架构储存所述输入参数所需的存储空间的大小、储存所述计算参数所需的存储空间的大小、及储存所述输出参数所需的存储空间的大小。
  18. 如权利要求16所述的存储介质,其特征在于,所述指令可以由处理器执行用于:
    确定所述各层计算架构对应的存储空间中最大存储空间的大小;
    分配所述存储空间,使得所述存储空间的大小与所述最大存储空间的大小一致。
  19. 如权利要求16所述的存储介质,其特征在于,所述指令可以由处理器执行用于:
    确定所述各层计算架构对应的存储空间中储存输入参数所需的存储空间大小的第一最大值,储存计算参数所需存储空间大小的第二最大值及储存输出参数所需存储空间大小的第三最大值;
    分配所述存储空间,使得所述存储空间的大小是所述第一最大值、第二最大值及第三最大值之和。
  20. 如权利要求16所述的存储介质,其特征在于,所述指令可以由处理器执行用于:
    将第一层计算架构的第一输出数据写入所述存储空间;
    将所述第一输出数据作为第二层计算架构的输入数据,利用所述存储空间执行所述第二层计算架构的计算;
    将所述第二层计算架构的第二输出数据写入所述存储空间。
  21. 如权利要求16所述的存储介质,其特征在于,所述指令可以由处理器执行用于:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构计算得到的第一输出数据储存到所述存储空间中的第二存储空间;
    将所述第二存储空间中存储的所述第一输出数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间;
    将所述第一存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
  22. 如权利要求16所述的存储介质,其特征在于,所述指令可以由 处理器执行用于:
    将第一层计算架构的输入数据存储到所述存储空间中的第一存储空间;
    将所述第一层计算架构的计算参数储存到所述存储空间中的第二存储空间;
    将所述第一层计算架构根据所述输入数据和所述计算参数计算得到的第一输出数据储存到所述存储空间中的第三存储空间;
    将所述第三存储空间中存储的数据作为第二层计算架构的输入数据,将所述第二层计算架构计算得到的第二输出数据存储到所述第一存储空间或所述第二存储空间;
    将所述第一存储空间或所述第二存储空间中存储的所述第二输出数据作为第三层计算架构的输入数据。
PCT/CN2017/102836 2016-10-14 2017-09-22 一种机器学习方法及系统 WO2018068623A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610898838.6 2016-10-14
CN201610898838.6A CN106529679B (zh) 2016-10-14 2016-10-14 一种机器学习方法及系统

Publications (1)

Publication Number Publication Date
WO2018068623A1 true WO2018068623A1 (zh) 2018-04-19

Family

ID=58332197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102836 WO2018068623A1 (zh) 2016-10-14 2017-09-22 一种机器学习方法及系统

Country Status (2)

Country Link
CN (1) CN106529679B (zh)
WO (1) WO2018068623A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529679B (zh) * 2016-10-14 2020-01-14 腾讯科技(上海)有限公司 一种机器学习方法及系统
FR3089649A1 (fr) * 2018-12-06 2020-06-12 Stmicroelectronics (Rousset) Sas Procédé et dispositif de détermination de la taille mémoire globale d’une zone mémoire globale allouée aux données d’un réseau de neurones
CN110287171B (zh) * 2019-06-28 2020-05-26 北京九章云极科技有限公司 一种数据处理方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047610A (zh) * 2007-04-30 2007-10-03 华为技术有限公司 数据存储、读取、传输方法和管理服务器及网络节点
CN101681450A (zh) * 2007-06-13 2010-03-24 佳能株式会社 计算处理装置及其控制方法
US20160179434A1 (en) * 2014-12-19 2016-06-23 Intel Corporation Storage device and method for performing convolution operations
CN105869117A (zh) * 2016-03-28 2016-08-17 上海交通大学 一种针对深度学习超分辨率技术的gpu加速方法
CN106529679A (zh) * 2016-10-14 2017-03-22 腾讯科技(上海)有限公司 一种机器学习方法及系统

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1295613C (zh) * 2002-10-24 2007-01-17 华为技术有限公司 通用Windows程序运行日志信息记录方法
US7219085B2 (en) * 2003-12-09 2007-05-15 Microsoft Corporation System and method for accelerating and optimizing the processing of machine learning techniques using a graphics processing unit
US10339041B2 (en) * 2013-10-11 2019-07-02 Qualcomm Incorporated Shared memory architecture for a neural simulator
CN103617146B (zh) * 2013-12-06 2017-10-13 北京奇虎科技有限公司 一种基于硬件资源消耗的机器学习方法及装置
CN104021088B (zh) * 2014-06-24 2017-11-21 广东睿江云计算股份有限公司 日志存储方法和装置
CN105488565A (zh) * 2015-11-17 2016-04-13 中国科学院计算技术研究所 加速深度神经网络算法的加速芯片的运算装置及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047610A (zh) * 2007-04-30 2007-10-03 华为技术有限公司 数据存储、读取、传输方法和管理服务器及网络节点
CN101681450A (zh) * 2007-06-13 2010-03-24 佳能株式会社 计算处理装置及其控制方法
US20160179434A1 (en) * 2014-12-19 2016-06-23 Intel Corporation Storage device and method for performing convolution operations
CN105869117A (zh) * 2016-03-28 2016-08-17 上海交通大学 一种针对深度学习超分辨率技术的gpu加速方法
CN106529679A (zh) * 2016-10-14 2017-03-22 腾讯科技(上海)有限公司 一种机器学习方法及系统

Also Published As

Publication number Publication date
CN106529679A (zh) 2017-03-22
CN106529679B (zh) 2020-01-14

Similar Documents

Publication Publication Date Title
US11093805B2 (en) Image recognition method and apparatus, image verification method and apparatus, learning method and apparatus to recognize image, and learning method and apparatus to verify image
US10049307B2 (en) Visual object recognition
US11476869B2 (en) Dynamically partitioning workload in a deep neural network module to reduce power consumption
Tzirakis et al. End-to-end multimodal emotion recognition using deep neural networks
US20160171346A1 (en) Image recognition method and apparatus, image verification method and apparatus, learning method and apparatus to recognize image, and learning method and apparatus to verify image
WO2020062392A1 (zh) 信号处理装置、信号处理方法及相关产品
WO2016145830A1 (zh) 图像处理方法、终端及计算机存储介质
US20210304063A1 (en) Machine Learning Model For Micro-Service Compliance Requirements
CN109034206A (zh) 图像分类识别方法、装置、电子设备及计算机可读介质
WO2018068623A1 (zh) 一种机器学习方法及系统
WO2022001232A1 (zh) 一种问答数据增强方法、装置、计算机设备及存储介质
US20190259384A1 (en) Systems and methods for universal always-on multimodal identification of people and things
WO2019137391A1 (zh) 对视频进行分类匹配的方法、装置和挑选引擎
US20220374219A1 (en) Deployment of service
JP7268063B2 (ja) 低電力のリアルタイムオブジェクト検出用のシステム及び方法
US9232154B2 (en) Object selection in an image
CN113762461A (zh) 使用可逆增强算子采用有限数据训练神经网络
US11494237B2 (en) Managing workloads of a deep neural network processor
CN111368800B (zh) 手势识别方法及装置
WO2023231753A1 (zh) 一种神经网络的训练方法、数据的处理方法以及设备
EP4040378A1 (en) Burst image-based image restoration method and apparatus
CN115862607A (zh) 训练样本集的生成方法和存储介质
WO2021135454A1 (zh) 一种伪冒语音的识别方法、设备及计算机可读存储介质
CN115312043A (zh) 语音识别方法、装置、计算机设备和存储介质
WO2021238289A1 (zh) 序列处理的方法与装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17859682

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17859682

Country of ref document: EP

Kind code of ref document: A1