CN112784962A - Training method and device for hyper network, electronic equipment and storage medium - Google Patents

Training method and device for hyper network, electronic equipment and storage medium Download PDF

Info

Publication number
CN112784962A
CN112784962A CN202110080434.7A CN202110080434A CN112784962A CN 112784962 A CN112784962 A CN 112784962A CN 202110080434 A CN202110080434 A CN 202110080434A CN 112784962 A CN112784962 A CN 112784962A
Authority
CN
China
Prior art keywords
network
sub
preset
hyper
super
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
CN202110080434.7A
Other languages
Chinese (zh)
Inventor
希滕
张刚
温圣召
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110080434.7A priority Critical patent/CN112784962A/en
Publication of CN112784962A publication Critical patent/CN112784962A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • G06V10/95Hardware or software architectures specially adapted for image or video understanding structured as a network, e.g. client-server architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure provides a training method and device of a hyper-network, electronic equipment and a storage medium, and relates to the field of artificial intelligence, in particular to the fields of computer vision, deep learning and the like. The specific implementation scheme is as follows: carrying out N times of iteration operation based on a preset hyper network to obtain a target hyper network; wherein, the ith iteration operation in the N iterations operations comprises: taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; updating the preset hyper-network based on the extended sub-network, and training the updated preset hyper-network to obtain a converged hyper-network; and under the condition that i is equal to a preset threshold value N, determining the converged super network as a target super network. According to the embodiment of the disclosure, the performance of the sub-network searched in the search space of the target super-network in the image processing scene can be improved.

Description

Training method and device for hyper network, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and more particularly to the field of computer vision and deep learning.
Background
The principle of NAS (Neural Architecture Search) is to Search for an optimal network structure from a set of Neural network structures, called a Search space, based on a Search strategy. In an image processing scenario, NAS technology may be employed to search for network structures for image processing from a search space. A search space for image processing may contain a large number of network structures, each network structure including a plurality of blocks, sub-blocks, or neural network layers (layers). Generally, these modules or neural network layers have a fixed feature map resolution.
Disclosure of Invention
The disclosure provides a training method and device of a hyper-network, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a training method of a super network, including:
carrying out N times of iteration operation based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein, the ith iteration operation in the N iterations operations comprises:
taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; wherein i is a positive integer less than or equal to N;
updating the preset hyper-network based on the extended sub-network, and training the updated preset hyper-network to obtain a converged hyper-network;
and under the condition that i is equal to a preset threshold value N, determining the converged super network as a target super network.
According to another aspect of the present disclosure, there is provided a training apparatus of a super network, including:
the iteration module is used for carrying out N times of iteration operations based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein the iteration module comprises:
the resolution expansion unit is used for taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; wherein i is a positive integer less than or equal to N;
the super network training unit is used for updating the preset super network based on the extended sub-network and training the updated preset super network to obtain a converged super network;
and a target determination unit for determining the converged super network as a target super network if i is equal to a preset threshold N.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method in any of the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
According to the disclosed technique, multiple iteration operations are performed based on a pre-defined hyper-network. In each iteration operation, an extended sub-network is obtained based on i times of a preset resolution and a preset skeleton structure, a preset super-network is updated based on the extended sub-network, and the preset super-network is trained to be converged. Therefore, the obtained target super network comprises a plurality of sub-networks with different feature map resolutions corresponding to the preset skeleton structure, and the performance of the sub-networks searched in the search space of the target super network in an image processing scene can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a training method for a hyper-network provided by one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a training method for a hyper-network provided by another embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a training method for a hyper-network provided by yet another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a training apparatus for a super network provided by one embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a training apparatus for a super network provided by another embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device for implementing a training method for a hyper-network of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram illustrating a training method of a super network according to an embodiment of the present disclosure. As shown in fig. 1, the method includes:
step S110, carrying out N times of iteration operations based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein, the ith iteration operation in the N iterations operations comprises:
step S111, taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; wherein i is a positive integer less than or equal to N;
step S112, updating the preset hyper-network based on the extended sub-network, and training the updated preset hyper-network to obtain a converged hyper-network;
and step S113, determining the converged super network as a target super network under the condition that i is equal to a preset threshold value N.
The method provided by the embodiment of the disclosure is used for training a super network, and all network structures in a search space of the super network, namely all sub-networks in the search space, share parameters of the super network. Therefore, training of each sub-network can be replaced by training of the super-network, and training efficiency is improved. The various subnetworks in the search space of the piconet may also be referred to as various subnetworks of the piconet.
Illustratively, the predetermined skeletal structure and the predetermined resolution may be obtained based on an initial search space. In one example, an initial search space, such as a MobileNet-like search space or a ResNet-like search space, may be predetermined. The initial search space includes a plurality of model structures or subnetworks. Illustratively, the initial search space includes a plurality of sub-networks that differ in their skeletal structure. Here, the skeleton structure may refer to a set of structural information such as types and numbers of various modules (blocks), sub-modules (sub-blocks), or network layers (layers) in the neural network. The skeleton structure of each sub-network in the initial search space may be regarded as a preset skeleton structure, and the feature map resolution of each sub-network in the initial search space may be the preset resolution.
For example, the pre-set hyper-network may be obtained based on initial hyper-network parameters, which may be obtained by pre-configuration. According to the embodiment of the disclosure, in each iteration operation, the extended sub-network is obtained based on the multiple of the preset resolution and the preset skeleton structure, and the preset super-network is updated based on the extended sub-network. Here, updating the pre-set super network based on the extended sub-network may be, for example, reselecting the sub-network as the sub-network in the search space based on the extended sub-network and the sub-network existing in the search space of the pre-set super network, or adding the extended sub-network to the search space of the pre-set super network. And after the preset hyper-network is updated every time, training the updated preset hyper-network until convergence is achieved, so as to optimize hyper-network parameters and improve the performance of each sub-network sharing the hyper-network parameters.
For example, the predetermined skeleton structure is A, B, C, and the predetermined resolution is R. In the ith iteration, i × R of the preset resolution is used as the feature map resolution, and 3 expansion subnetworks with the framework structures A, B, C and the feature map resolutions all equal to the preset resolution i × R can be obtained by combining the preset framework structures A, B and C. The default hyper-network is updated based on the extended sub-network and trained to converge. And obtaining a target super network through N times of iteration operations, wherein the search space of the target super network comprises a plurality of groups of sub-networks respectively corresponding to a plurality of preset skeleton structures, and each group of sub-networks comprises N sub-networks with preset resolutions respectively R, 2R, 3R, … … and NxR. And, the subnetworks are trained by sharing the parameters of the super network. Based on the method, the sub-network with better performance can be searched from the sub-networks of the target super-network according to the actual application requirement.
Therefore, according to the method disclosed by the embodiment of the disclosure, multiple iteration operations are performed based on the preset hyper network. In each iteration operation, an extended sub-network is obtained based on i times of a preset resolution and a preset skeleton structure, a preset super-network is updated based on the extended sub-network, and the preset super-network is trained to be converged. Therefore, the obtained target super network comprises a plurality of sub-networks with different feature map resolutions corresponding to the preset skeleton structure, and the performance of the sub-networks searched in the search space of the target super network in an image processing scene can be improved. For example, in image processing scenes such as image classification, image recognition, and the like, the speed and accuracy of image processing, and the like, can be improved. In particular, using a subnetwork searched in the search space of the target subnetwork on a particular hardware may result in better hardware performance, e.g., higher processing accuracy on a processor with limited operating speed, or faster operation on a processor with limited processing accuracy, etc. In some scenarios, hardware cost may also be reduced, for example, hardware performance may be achieved with less hardware than before, and hardware cost may be reduced by reducing the amount of hardware used.
In an exemplary embodiment, in step S112, updating the default hyper-network based on the extended sub-network includes:
and adding an expansion sub-network in the search space of the preset hyper-network.
For example, in the 2 nd iteration, the expansion sub-network includes 3 sub-networks with the skeleton structures respectively being the preset skeleton structures A, B, C and the feature map resolutions being the preset resolutions 2R. Adding an extended subnetwork in the search space, and then the search space comprises: the framework structures are all A, and the resolution ratios of the characteristic diagrams are respectively 2 first sub-networks of R and 2R; the framework structures are all B, and the resolution ratios of the characteristic diagrams are respectively 2 second sub-networks of R and 2R; and 2 third sub-networks with the framework structures of C and the resolution ratios of the characteristic diagrams of R and 2R respectively.
By adding the expansion sub-networks into the search space of the preset super-network, the search space of the target super-network obtained by final training can contain the total number of sub-networks with the resolution of the feature map being 1 to N times of the preset resolution. Therefore, the method is beneficial to searching for the sub-networks which are more suitable for the requirements of practical application.
In an exemplary embodiment, in step S112, training the updated preset super network to obtain a converged super network includes:
based on a preset resolution, selecting m sub-networks from the updated search space of the preset super-network; wherein m is a positive integer;
and training the updated preset hyper-network based on the m sub-networks to obtain a converged hyper-network.
For example, in the updated search space of the preset hyper-network, m sub-networks with the resolution of the feature map as the preset resolution are selected. The updated preset hyper-network is trained based on the selected sub-networks, rather than based on the full number of sub-networks.
According to the above embodiment, in each iteration operation, all the subnetworks are not considered, but the super network is updated by using the subnetwork corresponding to the preset resolution. Therefore, the amount of calculation can be effectively reduced. And moreover, the sub-network corresponding to the preset resolution is adopted, and compared with the sub-network corresponding to the multiple times of the preset resolution, the super-network is updated, so that the calculation complexity can be reduced, and the calculation efficiency is further improved.
After the target hyper-network is obtained, a target subnetwork may be selected in the search space of the target hyper-network for image processing based on a predetermined algorithm, such as a genetic algorithm. In an exemplary embodiment, the selection may also be made using a performance prediction model. As shown in fig. 2, the method may further include:
step S210, selecting a target sub-network in the search space of the target super-network by using the performance prediction model.
The performance prediction model is used for predicting the performance of each sub-network of the super network to obtain the predicted performance of each sub-network of the super network. The performance prediction model may be a linear estimation model or a probability model, such as a joint gaussian distribution model.
According to the above embodiments, the performance prediction model is used to select the target sub-network, so that the target sub-network with better performance can be selected, thereby improving the performance of the target sub-network in the image processing scene, for example, improving the speed and accuracy of image processing, and reducing the hardware cost.
For example, the performance prediction model may be trained using a plurality of sub-networks and corresponding performance information. Specifically, the method may further include:
randomly sampling k sub-networks in a search space of a target super-network; wherein k is a positive integer;
evaluating the k sub-networks based on the super-network parameters of the target super-network to obtain the evaluation performance of the k sub-networks;
and training a preset model based on the evaluation performance of the k sub-networks to obtain a performance prediction model.
Illustratively, the k subnetworks may be respectively evaluated based on a difference between the parameters of the k subnetworks and the parameter of the target piconet, to obtain the evaluation performance. And training a preset model by taking the sub-network and the evaluation performance thereof as a training data pair to obtain a performance prediction model.
According to the embodiment, an accurate performance prediction model can be trained, the target sub-network is selected from the search space of the target super-network based on the accurate performance prediction model, the performance of the target sub-network in an image processing scene can be improved, for example, the speed and the precision of image processing are improved, and the hardware cost is reduced.
In an exemplary embodiment, as shown in fig. 3, the method further includes:
step S310, acquiring an image to be processed;
and step S320, processing the image to be processed by using the target sub-network to obtain an image processing result of the image to be processed.
The image to be processed may be, for example, an image to be recognized or classified. And processing the image to be processed by using the target sub-network to obtain an image processing result, including an identification result or a classification result of the image to be processed. The recognition result may include a target detection result, a semantic segmentation result, and the like.
According to the embodiment, the target sub-network obtained based on the hyper-network search is applied to the image processing scene, so that the processing precision and/or speed can be improved.
One application example of the disclosed embodiments is provided below. In this application example, the training method of the super network includes:
and step S10, designing a universal framework structure search space, such as a MobileNet-like search space or a ResNet-like search space.
Step S20, a resolution search space is designed, each block, sub-block, or layer in the search space has multiple selectable resolutions (which are multiples of a preset resolution when the preset resolution is fixed), and the resolution of each block, sub-block, or layer may be k values such as r _1, r _2, … …, r _ k, and the like. Where for any k1< k2, the resolution r _ k1 is greater than the resolution r _ k2, i.e., r _ k is the smallest resolution and r _1 to r _ k-1 are multiples of r _ k. If the search efficiency in the search space needs to be improved, the resolution can be expanded only in the key block, sub-block or layer.
In step S30, if the initialization k is 1, only the subnet with the resolution r _1 is included in the resolution search space.
In step S40, the super network is trained until convergence using the sub-network with resolution r _ k.
In step S50, if k is smaller than the preset threshold, k is made k +1, and the process returns to step S40. At this time, r _ k remains at the lowest resolution, but the selectable number of resolutions in the search space increases.
And step S60, if k reaches a preset threshold value, outputting the trained hyper network supernet.
And step S70, randomly sampling m sub-networks based on the super-network, wherein each sub-block or layer of each sub-network has a determined resolution and a determined skeleton structure.
Step S80, evaluating the performance of the m subnetworks based on the super network.
Step S90 is to obtain a data pair (pair) based on the performance of the sub-network and the sub-network, and to obtain a performance prediction model by training using the data pair.
And S100, searching to obtain an optimal sub-network based on the performance prediction model, wherein the optimal sub-network has optimal resolution.
It should be understood that the scope of application of the present disclosure is not limited to the above-mentioned image processing field, but may also be applied to other artificial intelligence fields. Illustratively, PaddleSlim, Paddlecloud for cloud computing, easyll for image recognition, and the like, may be applicable to model compression. According to the method of the embodiment of the disclosure, multiple iteration operations are performed based on the preset hyper network. In each iteration operation, an extended sub-network is obtained based on i times of a preset resolution and a preset skeleton structure, a preset super-network is updated based on the extended sub-network, and the preset super-network is trained to be converged. Therefore, the obtained target super network comprises a plurality of sub-networks with different feature map resolutions corresponding to the preset skeleton structure, and the performance of the sub-networks searched in the search space of the target super network in an image processing scene can be improved.
As the realization of the above methods, the present disclosure also provides a training device of the super network. Fig. 4 is a schematic diagram of a training apparatus of a super network according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
an iteration module 410, configured to perform N iteration operations based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein the iteration module 410 includes:
the resolution expansion unit 411 is configured to obtain an expansion sub-network based on the resolution of the feature map and a preset skeleton structure, where i times of a preset resolution is used as the resolution of the feature map; wherein i is a positive integer less than or equal to N;
a super network training unit 412, configured to update the preset super network based on the extended sub-network, and train the updated preset super network to obtain a converged super network;
a target determination unit 413, configured to determine the converged super network as a target super network if i is equal to a preset threshold N.
Illustratively, the super network training unit 412 is configured to:
and adding an expansion sub-network in the search space of the preset hyper-network.
Illustratively, the super network training unit 412 is configured to:
based on a preset resolution, selecting m sub-networks from the updated search space of the preset super-network; wherein m is a positive integer;
and training the updated preset hyper-network based on the m sub-networks to obtain a converged hyper-network.
Illustratively, as shown in fig. 5, the training apparatus of the super network further includes:
a sub-network selecting module 510 for selecting a target sub-network in the search space of the target super-network by using the performance prediction model.
Illustratively, as shown in fig. 5, the training apparatus of the super network further includes:
a random sampling module 520 for randomly sampling k sub-networks in the search space of the target super-network; wherein k is a positive integer;
a performance evaluation module 530, configured to evaluate k subnetworks based on the hyper-network parameters of the target hyper-network, to obtain evaluation performances of the k subnetworks;
and the model determining module 540 is configured to train a preset model based on the evaluation performance of the k subnetworks to obtain a performance prediction model.
Illustratively, as shown in fig. 5, the training apparatus of the super network further includes:
an image obtaining module 550, configured to obtain an image to be processed;
and the image processing module 560 is configured to process the image to be processed by using the target sub-network, so as to obtain an image processing result of the image to be processed.
The training method of the super network provided by the embodiment of the disclosure can realize the training device of the super network provided by the embodiment of the disclosure, and has corresponding beneficial effects.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the various methods and processes described above, such as the training method of the hyper-network. For example, in some embodiments, the training method of the hypernetwork can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the training method of the hypernetwork described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform the training method of the hyper-network.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (15)

1. A training method of a super network, comprising:
carrying out N times of iteration operation based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein the ith iteration operation of the N iterations operations comprises:
taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; wherein i is a positive integer less than or equal to N;
updating the preset hyper-network based on the extended sub-network, and training the updated preset hyper-network to obtain a converged hyper-network;
and under the condition that i is equal to a preset threshold value N, determining the converged super network as a target super network.
2. The method of claim 1, wherein said updating the default hyper-network based on the extended sub-network comprises:
and adding the expansion sub-network in the search space of the preset hyper-network.
3. The method of claim 1, wherein the training the updated pre-set hyper-network to obtain a converged hyper-network comprises:
based on the preset resolution, selecting m sub-networks from the updated search space of the preset hyper-network; wherein m is a positive integer;
and training the updated preset hyper-network based on the m sub-networks to obtain a converged hyper-network.
4. The method of any of claims 1-3, further comprising:
and selecting a target sub-network in the search space of the target super-network by utilizing a performance prediction model.
5. The method of claim 4, further comprising:
randomly sampling k sub-networks in a search space of the target super-network; wherein k is a positive integer;
evaluating the k sub-networks based on the hyper-network parameters of the target hyper-network to obtain the evaluation performance of the k sub-networks;
and training a preset model based on the evaluation performance of the k sub-networks to obtain the performance prediction model.
6. The method of claim 4, further comprising:
acquiring an image to be processed;
and processing the image to be processed by using the target sub-network to obtain an image processing result of the image to be processed.
7. A training apparatus for a super network, comprising:
the iteration module is used for carrying out N times of iteration operations based on a preset hyper network to obtain a target hyper network; wherein N is an integer greater than or equal to 2;
wherein the iteration module comprises:
the resolution expansion unit is used for taking i times of a preset resolution as a feature map resolution, and obtaining an expansion sub-network based on the feature map resolution and a preset skeleton structure; wherein i is a positive integer less than or equal to N;
the super network training unit is used for updating the preset super network based on the extended sub-network and training the updated preset super network to obtain a converged super network;
a target determination unit, configured to determine the converged super network as a target super network if i is equal to a preset threshold N.
8. The apparatus of claim 7, wherein the super network training unit is to:
and adding the expansion sub-network in the search space of the preset hyper-network.
9. The apparatus of claim 7, wherein the super network training unit is to:
based on the preset resolution, selecting m sub-networks from the updated search space of the preset hyper-network; wherein m is a positive integer;
and training the updated preset hyper-network based on the m sub-networks to obtain a converged hyper-network.
10. The apparatus of any of claims 7-9, further comprising:
and the sub-network selection module is used for selecting a target sub-network in the search space of the target super-network by utilizing the performance prediction model.
11. The apparatus of claim 10, further comprising:
a random sampling module for randomly sampling k sub-networks in a search space of the target super-network; wherein k is a positive integer;
the performance evaluation module is used for evaluating the k sub-networks based on the super-network parameters of the target super-network to obtain the evaluation performance of the k sub-networks;
and the model determining module is used for training a preset model based on the evaluation performance of the k sub-networks to obtain the performance prediction model.
12. The apparatus of claim 10, further comprising:
the image acquisition module is used for acquiring an image to be processed;
and the image processing module is used for processing the image to be processed by utilizing the target sub-network to obtain an image processing result of the image to be processed.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202110080434.7A 2021-01-21 2021-01-21 Training method and device for hyper network, electronic equipment and storage medium Pending CN112784962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110080434.7A CN112784962A (en) 2021-01-21 2021-01-21 Training method and device for hyper network, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110080434.7A CN112784962A (en) 2021-01-21 2021-01-21 Training method and device for hyper network, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112784962A true CN112784962A (en) 2021-05-11

Family

ID=75757696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110080434.7A Pending CN112784962A (en) 2021-01-21 2021-01-21 Training method and device for hyper network, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112784962A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657465A (en) * 2021-07-29 2021-11-16 北京百度网讯科技有限公司 Pre-training model generation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553480A (en) * 2020-07-10 2020-08-18 腾讯科技(深圳)有限公司 Neural network searching method and device, computer readable medium and electronic equipment
CN111582453A (en) * 2020-05-09 2020-08-25 北京百度网讯科技有限公司 Method and device for generating neural network model
CN111738418A (en) * 2020-06-19 2020-10-02 北京百度网讯科技有限公司 Training method and device for hyper network
WO2020221200A1 (en) * 2019-04-28 2020-11-05 华为技术有限公司 Neural network construction method, image processing method and devices
WO2020237687A1 (en) * 2019-05-31 2020-12-03 深圳市大疆创新科技有限公司 Network architecture search method and apparatus, computer storage medium and computer program product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020221200A1 (en) * 2019-04-28 2020-11-05 华为技术有限公司 Neural network construction method, image processing method and devices
WO2020237687A1 (en) * 2019-05-31 2020-12-03 深圳市大疆创新科技有限公司 Network architecture search method and apparatus, computer storage medium and computer program product
CN111582453A (en) * 2020-05-09 2020-08-25 北京百度网讯科技有限公司 Method and device for generating neural network model
CN111738418A (en) * 2020-06-19 2020-10-02 北京百度网讯科技有限公司 Training method and device for hyper network
CN111553480A (en) * 2020-07-10 2020-08-18 腾讯科技(深圳)有限公司 Neural network searching method and device, computer readable medium and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ANDREW BROCK 等: "SMASH: One-Shot Model Architecture Search through HyperNetworks", ARXIV, 17 August 2017 (2017-08-17) *
卞伟伟;邱旭阳;申研;: "基于神经网络结构搜索的目标识别方法", 空军工程大学学报(自然科学版), no. 04, 25 August 2020 (2020-08-25) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657465A (en) * 2021-07-29 2021-11-16 北京百度网讯科技有限公司 Pre-training model generation method and device, electronic equipment and storage medium
CN113657465B (en) * 2021-07-29 2024-04-09 北京百度网讯科技有限公司 Pre-training model generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113657465B (en) Pre-training model generation method and device, electronic equipment and storage medium
CN111582454B (en) Method and device for generating neural network model
CN113010896B (en) Method, apparatus, device, medium and program product for determining abnormal object
CN113627536B (en) Model training, video classification method, device, equipment and storage medium
CN114357105A (en) Pre-training method and model fine-tuning method of geographic pre-training model
CN111652354A (en) Method, apparatus, device and storage medium for training a hyper-network
CN112784962A (en) Training method and device for hyper network, electronic equipment and storage medium
CN113377998A (en) Data loading method and device, electronic equipment and storage medium
CN113190766A (en) Path planning method and device, electronic equipment and storage medium
CN115099175B (en) Method and device for acquiring time sequence netlist, electronic equipment and storage medium
CN113868254B (en) Method, device and storage medium for removing duplication of entity node in graph database
CN111563591B (en) Super network training method and device
CN116309002A (en) Graph data storage, access and processing methods, training methods, equipment and media
CN113657466A (en) Pre-training model generation method and device, electronic equipment and storage medium
CN111523664A (en) Super-network parameter updating method and device and electronic equipment
CN112580803B (en) Model acquisition method, apparatus, electronic device, storage medium, and program product
CN111639752B (en) Method, apparatus, device and storage medium for training super network
CN117522614B (en) Data processing method and device, electronic equipment and storage medium
CN114861057B (en) Resource sending method, training of recommendation model and device
CN114429509B (en) Method and device for finding newly added road and electronic equipment
CN115860077B (en) Method, device, equipment and storage medium for processing state data
CN115759233B (en) Model training method, graph data processing device and electronic equipment
CN115796228B (en) Operator fusion method, device, equipment and storage medium
CN112507197B (en) Model searching method, device, electronic equipment, storage medium and program product
CN114627342A (en) Training method, device and equipment of image recognition model based on sparsity

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