WO2022141840A1 - Network architecture search method and apparatus, electronic device, and medium - Google Patents

Network architecture search method and apparatus, electronic device, and medium Download PDF

Info

Publication number
WO2022141840A1
WO2022141840A1 PCT/CN2021/083181 CN2021083181W WO2022141840A1 WO 2022141840 A1 WO2022141840 A1 WO 2022141840A1 CN 2021083181 W CN2021083181 W CN 2021083181W WO 2022141840 A1 WO2022141840 A1 WO 2022141840A1
Authority
WO
WIPO (PCT)
Prior art keywords
network architecture
architecture
candidate
preset
network
Prior art date
Application number
PCT/CN2021/083181
Other languages
French (fr)
Chinese (zh)
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 WO2022141840A1 publication Critical patent/WO2022141840A1/en

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/08Learning methods
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of intelligent decision-making, and in particular, to a network architecture search method, apparatus, electronic device, and computer-readable storage medium.
  • Deep neural networks have been widely used in image recognition, speech recognition, and language modeling, but it is difficult to deploy these networks on resource-constrained platforms such as mobile or embedded devices, so it is often necessary to search for Network architecture for resource-constrained mobile devices.
  • the inventors realized that the existing network architecture search methods use gradient-based methods to search in the search space, but gradient-based methods focus on a single objective to minimize the error metric of a task, that is, only applicable to a single-target search , it is impossible to search for a network architecture that satisfies multiple different goals at the same time.
  • a network architecture search method comprising:
  • a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set
  • the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  • a network architecture search device includes:
  • the information acquisition module is used to acquire the location information of the search space
  • an architecture search module configured to perform a network architecture search in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set
  • a performance evaluation module configured to perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results
  • the architecture acquisition module is configured to judge whether the evaluation result satisfies the preset evaluation condition, and if the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
  • An electronic device comprising:
  • the memory stores computer program instructions executable by the at least one processor, the computer program instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
  • a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set
  • the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  • a computer-readable storage medium storing a computer program, the computer program implements the following steps when executed by a processor:
  • a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set
  • the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  • the present application can solve the problem that the existing search methods cannot search for a network architecture that satisfies multiple targets at the same time.
  • FIG. 1 is a schematic flowchart of a network architecture search method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a module of a network architecture search apparatus provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of an internal structure of an electronic device for implementing a network architecture search method according to an embodiment of the present application.
  • An embodiment of the present application provides a method for searching a network architecture, where an execution body of the method for searching a network architecture includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided by the embodiment of the present application, such as a server and a terminal. kind.
  • the network architecture search method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the network architecture search method includes:
  • the search space may be pre-constructed, and specifically, the search space may be constructed through a neural architecture search (Neural Architecture Search, NAS) mechanism.
  • a neural architecture search Neural Architecture Search, NAS
  • the method before acquiring the location information of the search space, the method further includes: constructing a search space.
  • the building search space includes:
  • the neural network units are arranged and combined in a preset connection manner to obtain a search space.
  • the neural network unit includes but is not limited to 3x3 convolution, 5x5 convolution, 7x7 convolution, a max pooling layer and an average pooling layer.
  • connection manner includes enabling incoming connections and disabling incoming connections.
  • the search space consists of all candidate architectures that can be searched.
  • the search space may be a chain structure neural network, or a multi-branch neural network including multiple branches and skip connections.
  • the search space includes neural network units, and the structures of these repeated neural network units may be different.
  • the search space includes repeated neural network units, and the structures of these repeated neural network units are the same.
  • a network architecture search is performed in the search space by using a cuckoo algorithm to obtain a multi-objective network architecture set.
  • the network architecture search is performed in the search space through the cuckoo algorithm according to the location information, and a multi-target network architecture set is obtained, including:
  • the network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
  • the candidate architecture set includes the permuted and combined neural network units randomly selected from the search space.
  • the candidate architectures in the candidate architecture set are the randomly selected permuted and combined neural network units in the search space.
  • the relevant parameters include, but are not limited to, the scale parameter of the candidate architecture set and the target probability of the candidate architecture.
  • the target probability corresponding to the network architecture is the probability value of the network architecture being searched, which is its own fixed parameter.
  • the fitness value of each candidate architecture in the initial candidate architecture set may be used.
  • a preset adaptation formula is used to calculate the fitness value of each candidate architecture in the candidate architecture set.
  • the preset adaptation formula includes:
  • represents the fitness value of the candidate architecture
  • represents the position of the ⁇ th candidate architecture at t iterations
  • is the step size factor
  • levy( ⁇ ) represents the random search path of Levy flight
  • is a preset parameter.
  • the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set includes:
  • the adaptive change rate is determined as an adaptive change rate of the candidate architecture.
  • the preset rate of change formula includes:
  • ⁇ f is the adaptive change rate, is the first fitness value, is the second fitness value, t is the first iteration number, ⁇ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
  • updating the candidate architecture corresponding to the adaptive change rate less than the fixed threshold includes:
  • the candidate architecture is replaced according to the step size.
  • the preset step size formula includes:
  • s is the step size
  • U and V both refer to variables that obey a Gaussian distribution
  • is the number of neural network units in the initial network architecture
  • N represents a Gaussian distribution
  • the method further includes:
  • the parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
  • the parameters of the candidate architectures in the search space are updated by using the large-scale super network that has been trained, so that the candidate architectures are more adaptable, thereby improving the accuracy of the search.
  • the preset performance evaluation model includes, but is not limited to, a proxy model, weight sharing, and a hypernetwork.
  • a super network is used to perform evaluation processing on multiple target network architectures in the multi-target network architecture set to obtain an evaluation result.
  • evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results including:
  • the back-propagation method and the gradient descent method can be selected for training the super-network for preset rounds, and the operator parameters and structural parameters on the super-network are alternately trained.
  • the space performance evaluation process is performed on the trained super network, and the evaluation result obtained is to test and evaluate the performance of the super network on the demand task and demand data set, and use the relevant performance indicators of the super network as the multiple target network architectures performance indicators for subsequent evaluation and comparison.
  • the performance indicators of the multiple target network architectures include classification accuracy, inference delay, FLOPs (floating-point operations per second, the number of floating-point operations performed per second), and the number of parameters. .
  • the evaluation result includes four performance indicators of the multiple target network architectures, and the preset evaluation condition means that the corresponding values of the performance indicators in the evaluation result are all greater than or equal to the preset value performance threshold.
  • the target network architecture that satisfies the evaluation condition is used as the final network architecture.
  • the operation if all evaluation results do not satisfy the evaluation condition, the operation returns to the operation of re-searching in the search space by using the cuckoo algorithm, and the network architecture search is performed again.
  • a network architecture search is first performed in the search space through the cuckoo algorithm, and a multi-objective network architecture set is obtained.
  • an optimal network architecture perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, obtain an evaluation result, determine whether the searched network architecture meets the requirements according to the evaluation result, and improve The accuracy of the final target network architecture that meets multiple objectives. Therefore, the network architecture search method proposed in the present application can solve the problem that the existing search methods cannot search for a network architecture that satisfies multiple objectives at the same time.
  • FIG. 2 it is a schematic block diagram of a network architecture search apparatus provided by an embodiment of the present application.
  • the network architecture search apparatus 100 described in this application may be installed in an electronic device. According to the implemented functions, the network architecture search apparatus 100 may include an information acquisition module 101 , an architecture search module 102 , a performance evaluation module 103 and an architecture acquisition module 104 .
  • the modules described in this application may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the information acquisition module 101 is used to acquire the location information of the search space
  • the architecture search module 102 is configured to perform a network architecture search in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set;
  • the performance evaluation module 103 is configured to perform evaluation processing on a plurality of target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results;
  • the architecture obtaining module 104 is configured to determine whether the evaluation result satisfies a preset evaluation condition, and if the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
  • the information acquisition module 101 is configured to acquire location information of the search space.
  • the search space may be pre-constructed, and specifically, the search space may be constructed through a neural architecture search (Neural Architecture Search, NAS) mechanism.
  • a neural architecture search Neural Architecture Search, NAS
  • the apparatus further includes a search space building module, and the search space building module is used for:
  • the neural network units are arranged and combined in a preset connection manner to obtain a search space.
  • the neural network unit includes but is not limited to 3x3 convolution, 5x5 convolution, 7x7 convolution, a max pooling layer and an average pooling layer.
  • connection manner includes enabling incoming connections and disabling incoming connections.
  • the search space consists of all candidate architectures that can be searched.
  • the search space may be a chain structure neural network, or a multi-branch neural network including multiple branches and skip connections.
  • the search space includes neural network units, and the structures of these repeated neural network units may be different.
  • the search space includes repeated neural network units, and the structures of these repeated neural network units are the same.
  • the architecture search module 102 is configured to perform a network architecture search in the search space by using the cuckoo algorithm according to the location information to obtain a multi-target network architecture set.
  • the architecture search module 102 is specifically configured to:
  • the network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
  • the candidate architecture set includes the permuted and combined neural network units randomly selected from the search space.
  • the candidate architectures in the candidate architecture set are the randomly selected permuted and combined neural network units in the search space.
  • the relevant parameters include, but are not limited to, the scale parameter of the candidate architecture set and the target probability of the candidate architecture.
  • the target probability corresponding to the network architecture is the probability value of the network architecture being searched, which is its own fixed parameter.
  • the fitness value of each candidate architecture in the initial candidate architecture set may be used.
  • a preset adaptation formula is used to calculate the fitness value of each candidate architecture in the candidate architecture set.
  • the preset adaptation formula includes:
  • represents the fitness value of the candidate architecture
  • represents the position of the ⁇ th candidate architecture at t iterations
  • is the step size factor
  • levy( ⁇ ) represents the random search path of Levy flight
  • is a preset parameter.
  • the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set includes:
  • the adaptive change rate is determined as an adaptive change rate of the candidate architecture.
  • the preset rate of change formula includes:
  • ⁇ f is the adaptive change rate, is the first fitness value, is the second fitness value, t is the first iteration number, ⁇ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
  • updating the candidate architecture corresponding to the adaptive change rate less than the fixed threshold includes:
  • the candidate architecture is replaced according to the step size.
  • the preset step size formula includes:
  • s is the step size
  • U and V both refer to variables that obey a Gaussian distribution
  • is the number of neural network units in the initial network architecture
  • N represents a Gaussian distribution
  • the apparatus described in this embodiment of the present application further includes a parameter update module, where the parameter update module is configured to:
  • the parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
  • the parameters of the candidate architectures in the search space are updated by using the large-scale super network that has been trained, so that the candidate architectures are more adaptable, thereby improving the accuracy of the search.
  • the performance evaluation module 103 is configured to perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results.
  • the preset performance evaluation model includes, but is not limited to, a proxy model, weight sharing, and a hypernetwork.
  • a super network is used to perform evaluation processing on multiple target network architectures in the multi-target network architecture set to obtain an evaluation result.
  • the performance evaluation module 103 is specifically used for:
  • the back-propagation method and the gradient descent method can be selected for training the super-network for preset rounds, and the operator parameters and structural parameters on the super-network are alternately trained.
  • performing spatial performance evaluation processing on the trained super-network, and obtaining the evaluation result is to test and evaluate the performance of the super-network on the demand task and demand data set, and use the relevant performance indicators of the super-network as the multiple target network architectures performance indicators for subsequent evaluation and comparison.
  • the performance indicators of the multiple target network architectures include classification accuracy, inference delay, FLOPs (floating-point operations per second, the number of floating-point operations performed per second), and the number of parameters. .
  • the architecture obtaining module 104 is configured to judge whether the evaluation result satisfies a preset evaluation condition.
  • the evaluation result includes four performance indicators of the multiple target network architectures, and the preset evaluation condition means that the corresponding values of the performance indicators in the evaluation result are all greater than or equal to the preset value performance threshold.
  • the architecture obtaining module 104 is configured to determine the target network architecture corresponding to the evaluation result as the final network architecture if the evaluation result satisfies the evaluation condition.
  • the evaluation result does not satisfy the evaluation condition, return to using the cuckoo algorithm to re-search in the search space; if the evaluation result satisfies the evaluation condition, use the multi-objective network architecture corresponding to the evaluation result as the final network architecture.
  • the target network architecture that satisfies the evaluation condition is used as the final network architecture.
  • the operation if all evaluation results do not satisfy the evaluation condition, the operation returns to the operation of re-searching in the search space by using the cuckoo algorithm, and the network architecture search is performed again.
  • a network architecture search is first performed in the search space through the cuckoo algorithm, and a multi-objective network architecture set is obtained.
  • an optimal network architecture perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, obtain an evaluation result, determine whether the searched network architecture meets the requirements according to the evaluation result, and improve The accuracy of the final target network architecture that meets multiple objectives. Therefore, the network architecture search device proposed in the present application can solve the problem that a network architecture that satisfies multiple objectives at the same time cannot be searched.
  • FIG. 3 it is a schematic structural diagram of an electronic device implementing the network architecture search method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a network architecture search program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed in the electronic device 1 and various data, such as the code of the network architecture search program 12, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing the program or module (for example, executing the program) stored in the memory 11. Network architecture search program, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like.
  • PCI peripheral component interconnect
  • EISA Extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the network architecture search program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, can realize:
  • a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set
  • the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  • the modules/units integrated in the electronic device 1 may be stored in a computer-readable storage medium.
  • the computer-readable storage medium may be volatile or non-volatile, for example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U Disk, removable hard disk, magnetic disk, CD-ROM, computer memory, read-only memory (ROM, Read-Only Memory).
  • the present application also provides a computer-readable storage medium.
  • the readable storage medium may be volatile or non-volatile, and the readable storage medium stores a computer program. When executed by the processor of the electronic device, it can achieve:
  • a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set
  • the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  • the computer-usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one function, and the like; using the created data, etc.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to the intelligent decision making technology. Disclosed is a network architecture search method, comprising: acquiring position information of a search space; according to the position information, performing network architecture search in the search space using a cuckoo algorithm, to obtain a multi-target network architecture set; performing evaluation processing on a plurality of target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain an evaluation result; determining whether the evaluation result satisfies a preset evaluation condition; and if the evaluation result satisfies the evaluation condition, determining that a target network architecture corresponding to the evaluation result is a final network architecture. The present application also relates to blockchain technology, and the evaluation result, etc. can be stored in a blockchain node. Also disclosed are a network architecture search apparatus, an electronic device and a storage medium. The present application can solve the problem that an existing search method cannot find a network architecture which satisfies a plurality of targets at the same time.

Description

网络架构搜索方法、装置、电子设备及介质Network architecture search method, device, electronic device and medium
本申请要求于2020年12月29日提交中国专利局、申请号为CN202011603641.8,发明名称为“网络架构搜索方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number CN202011603641.8 and the title of the invention "Network Architecture Search Method, Device, Electronic Device and Medium", which was filed with the China Patent Office on December 29, 2020. Reference is incorporated in this application.
技术领域technical field
本申请涉及智能决策技术领域,尤其涉及一种网络架构搜索方法、装置、电子设备及计算机可读存储介质。The present application relates to the technical field of intelligent decision-making, and in particular, to a network architecture search method, apparatus, electronic device, and computer-readable storage medium.
背景技术Background technique
深度神经网络在图像识别、语音识别和语言建模等领域得到了广泛的应用,但是在资源受限的移动设备或者嵌入式设备等平台上部署这些网络是很困难的,因此通常需要搜索用于资源有限的移动设备的网络架构。Deep neural networks have been widely used in image recognition, speech recognition, and language modeling, but it is difficult to deploy these networks on resource-constrained platforms such as mobile or embedded devices, so it is often necessary to search for Network architecture for resource-constrained mobile devices.
发明人意识到现有的网络架构搜索方法是利用基于梯度的方法在搜索空间中进行搜索,但是基于梯度的方法侧重于单一的目标最小化一个任务的误差度量,即仅适用于单一目标的搜索,无法搜索出同时满足多个不同目标的网络架构。The inventors realized that the existing network architecture search methods use gradient-based methods to search in the search space, but gradient-based methods focus on a single objective to minimize the error metric of a task, that is, only applicable to a single-target search , it is impossible to search for a network architecture that satisfies multiple different goals at the same time.
发明内容SUMMARY OF THE INVENTION
一种网络架构搜索方法,包括:A network architecture search method, comprising:
获取搜索空间的位置信息;Obtain the location information of the search space;
根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
一种网络架构搜索装置,所述装置包括:A network architecture search device, the device includes:
信息获取模块,用于获取搜索空间的位置信息;The information acquisition module is used to acquire the location information of the search space;
架构搜索模块,用于根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;an architecture search module, configured to perform a network architecture search in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set;
性能评估模块,用于根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;A performance evaluation module, configured to perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results;
架构获取模块,用于判断所述评估结果是否满足预设的评估条件,若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。The architecture acquisition module is configured to judge whether the evaluation result satisfies the preset evaluation condition, and if the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
一种电子设备,所述电子设备包括:An electronic device comprising:
至少一个处理器;以及,at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:The memory stores computer program instructions executable by the at least one processor, the computer program instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
获取搜索空间的位置信息;Obtain the location information of the search space;
根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium storing a computer program, the computer program implements the following steps when executed by a processor:
获取搜索空间的位置信息;Obtain the location information of the search space;
根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
本申请可以解决现有搜索方法无法搜索出同时满足多个目标的网络架构的问题。The present application can solve the problem that the existing search methods cannot search for a network architecture that satisfies multiple targets at the same time.
附图说明Description of drawings
图1为本申请实施例提供的网络架构搜索方法的流程示意图;1 is a schematic flowchart of a network architecture search method provided by an embodiment of the present application;
图2为本申请实施例提供的网络架构搜索装置的模块示意图;2 is a schematic diagram of a module of a network architecture search apparatus provided by an embodiment of the present application;
图3为本申请实施例提供的实现网络架构搜索方法的电子设备的内部结构示意图。FIG. 3 is a schematic diagram of an internal structure of an electronic device for implementing a network architecture search method according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the purpose of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请实施例提供一种网络架构搜索方法,所述网络架构搜索方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述网络架构搜索方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。An embodiment of the present application provides a method for searching a network architecture, where an execution body of the method for searching a network architecture includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided by the embodiment of the present application, such as a server and a terminal. kind. In other words, the network architecture search method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
参照图1所示,为本申请实施例提供的一种网络架构搜索方法的流程示意图。在本实施例中,所述网络架构搜索方法包括:Referring to FIG. 1 , it is a schematic flowchart of a network architecture search method provided by an embodiment of the present application. In this embodiment, the network architecture search method includes:
S1、获取搜索空间的位置信息。S1. Obtain location information of the search space.
本申请实施例中,搜索空间可以是预先构建的,具体的,搜索空间可以通过神经结构搜索(Neural Architecture Search,NAS)机制构建。In this embodiment of the present application, the search space may be pre-constructed, and specifically, the search space may be constructed through a neural architecture search (Neural Architecture Search, NAS) mechanism.
具体的,本申请实施例中,所述获取搜索空间的位置信息之前,所述方法还包括:构建搜索空间。Specifically, in the embodiment of the present application, before acquiring the location information of the search space, the method further includes: constructing a search space.
所述构建搜索空间包括:The building search space includes:
获取预设的神经网络单元;Get the preset neural network unit;
利用预设的连接方式对所述神经网络单元进行排列组合处理,得到搜索空间。The neural network units are arranged and combined in a preset connection manner to obtain a search space.
详细地,本申请实施例中,所述神经网络单元包括但不限于3x3卷积,5x5卷积,7x7卷积,一个最大池化层和一个平均池化层。In detail, in the embodiment of the present application, the neural network unit includes but is not limited to 3x3 convolution, 5x5 convolution, 7x7 convolution, a max pooling layer and an average pooling layer.
详细地,所述连接方式包括启用传入连接和禁用传入连接。In detail, the connection manner includes enabling incoming connections and disabling incoming connections.
其中,所述搜索空间由所有能被搜索到的候选架构组成。Wherein, the search space consists of all candidate architectures that can be searched.
一可选实施例中,所述搜索空间可以为链结构神经网络,或者为包含多个分支和跳过连接的多分支神经网络。In an optional embodiment, the search space may be a chain structure neural network, or a multi-branch neural network including multiple branches and skip connections.
本申请实施例中,搜索空间包括神经网络单元,且这些重复的神经网络单元的结构可以为不同的。In this embodiment of the present application, the search space includes neural network units, and the structures of these repeated neural network units may be different.
优选的,为了减少搜索空间的大小,搜索空间包括重复的神经网络单元,且这些重复的神经网络单元的结构为相同。Preferably, in order to reduce the size of the search space, the search space includes repeated neural network units, and the structures of these repeated neural network units are the same.
S2、根据所述位置信息通过利用布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集。S2. According to the location information, a network architecture search is performed in the search space by using a cuckoo algorithm to obtain a multi-objective network architecture set.
本申请实施例中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集,包括:In the embodiment of the present application, the network architecture search is performed in the search space through the cuckoo algorithm according to the location information, and a multi-target network architecture set is obtained, including:
根据所述位置信息获取所述搜索空间中的候选架构集和所述候选架构集的相关参数;Obtain a candidate architecture set in the search space and related parameters of the candidate architecture set according to the location information;
计算所述候选架构集中各个候选架构的适应度值;calculating the fitness value of each candidate architecture in the candidate architecture set;
将所述候选架构集中适应度值大于预设适应阈值的候选架构进行汇总,得到初始候选架构集;Summarize the candidate architectures whose fitness value is greater than the preset adaptation threshold in the candidate architecture set to obtain an initial candidate architecture set;
计算所述初始候选架构集中候选架构的适应变化率;calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set;
若不存在小于固定阈值的适应变化率,确定所述初始候选架构集为所述多目标网络架构集;If there is no adaptive change rate less than a fixed threshold, determining the initial candidate architecture set as the multi-objective network architecture set;
若存在小于固定阈值的适应变化率,将小于固定阈值的适应变化率对应的候选架构进行更新,得到标准网络架构集;If there is an adaptive change rate less than the fixed threshold, update the candidate architecture corresponding to the adaptive change rate less than the fixed threshold to obtain a standard network architecture set;
获取预设的随机数,比较所述随机数和所述标准网络架构集中任意网络架构所对应的目标概率的大小;Obtain a preset random number, and compare the random number with the size of the target probability corresponding to any network architecture in the standard network architecture set;
删除小于所述随机数的目标概率所对应网络架构,保留大于或者等于所述随机数的目标概率所对应网络架构,得到所述多目标网络架构集。The network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
详细地,所述候选架构集包括从搜索空间中随机筛选出的排列组合后的神经网络单元,具体的,候选架构集中的候选架构为搜索空间中随机筛选出的排列组合后的神经网络单元,所述相关参数包括但不限于所述候选架构集的规模参数和所述候选架构的目标概率。In detail, the candidate architecture set includes the permuted and combined neural network units randomly selected from the search space. Specifically, the candidate architectures in the candidate architecture set are the randomly selected permuted and combined neural network units in the search space, The relevant parameters include, but are not limited to, the scale parameter of the candidate architecture set and the target probability of the candidate architecture.
其中,所述网络架构对应的目标概率是所述网络架构被搜索到的概率值,是其自带的固定参数。Wherein, the target probability corresponding to the network architecture is the probability value of the network architecture being searched, which is its own fixed parameter.
在计算适应度值时,可以所述初始候选架构集中各个候选架构的适应度值。具体地,利用预设的适应公式计算所述候选架构集中各个候选架构的适应度值。When calculating the fitness value, the fitness value of each candidate architecture in the initial candidate architecture set may be used. Specifically, a preset adaptation formula is used to calculate the fitness value of each candidate architecture in the candidate architecture set.
所述预设的适应公式包括:The preset adaptation formula includes:
Figure PCTCN2021083181-appb-000001
Figure PCTCN2021083181-appb-000001
其中,
Figure PCTCN2021083181-appb-000002
表示候选架构的适应度值,
Figure PCTCN2021083181-appb-000003
表示第γ个候选架构在t次迭代时的位置,β为步长因子,
Figure PCTCN2021083181-appb-000004
表示点对点的乘法,levy(λ)表示莱维飞行随机搜索路径,λ为预设参数。
in,
Figure PCTCN2021083181-appb-000002
represents the fitness value of the candidate architecture,
Figure PCTCN2021083181-appb-000003
represents the position of the γth candidate architecture at t iterations, β is the step size factor,
Figure PCTCN2021083181-appb-000004
Represents point-to-point multiplication, levy(λ) represents the random search path of Levy flight, and λ is a preset parameter.
进一步地,所述计算所述初始候选架构集中候选架构的适应变化率,包括:Further, the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set includes:
计算所述初始网络架构集中网络架构在预设的第一迭代数时的第一适应度值和在预设的第二迭代数时的第二适应度值;calculating the first fitness value of the network architecture in the initial network architecture set at the preset first iteration number and the second fitness value at the preset second iteration number;
根据预设的变化率公式计算所述第一适应度值和所述第二适应度值之间的适应变化率;Calculate the adaptive change rate between the first fitness value and the second fitness value according to a preset rate of change formula;
确定所述适应变化率为所述候选架构的适应变化率。The adaptive change rate is determined as an adaptive change rate of the candidate architecture.
具体地,specifically,
所述预设的变化率公式包括:The preset rate of change formula includes:
Figure PCTCN2021083181-appb-000005
Figure PCTCN2021083181-appb-000005
其中,Δf为所述适应变化率,
Figure PCTCN2021083181-appb-000006
为所述第一适应度值,
Figure PCTCN2021083181-appb-000007
为所述第二适应度值,t为所述第一迭代数,σ为所述第二迭代数,L为所述初始候选架构集中候选架构在所述初始候选架构集中的位置。
where Δf is the adaptive change rate,
Figure PCTCN2021083181-appb-000006
is the first fitness value,
Figure PCTCN2021083181-appb-000007
is the second fitness value, t is the first iteration number, σ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
进一步地,所述将小于固定阈值的适应变化率对应的候选架构进行更新,包括:Further, updating the candidate architecture corresponding to the adaptive change rate less than the fixed threshold includes:
利用预设的步长公式计算小于固定阈值的适应变化率对应的候选架构的步长;Calculate the step size of the candidate architecture corresponding to the adaptive change rate smaller than the fixed threshold by using the preset step size formula;
根据所述步长的大小对所述候选架构进行替换。The candidate architecture is replaced according to the step size.
详细地,所述预设的步长公式包括:In detail, the preset step size formula includes:
Figure PCTCN2021083181-appb-000008
Figure PCTCN2021083181-appb-000008
U~N(0,τ 2),V~N(0,1 U~N(0, τ 2 ), V~N(0, 1
Figure PCTCN2021083181-appb-000009
Figure PCTCN2021083181-appb-000009
其中,s为步长,U和V均指服从高斯分布的变量,ε为所述初始网络架构的神经网络单元的数量,N表示高斯分布。Among them, s is the step size, U and V both refer to variables that obey a Gaussian distribution, ε is the number of neural network units in the initial network architecture, and N represents a Gaussian distribution.
可选地,本申请实施例根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集之前,所述方法还包括:Optionally, before the embodiment of the present application performs a network architecture search in the search space through the cuckoo algorithm according to the location information, and obtains a multi-target network architecture set, the method further includes:
将所述搜索空间中的所有候选架构进行组合,得到大型超网络;Combining all candidate architectures in the search space to obtain a large super network;
利用构建的训练集对所述大型超网络进行训练;using the constructed training set to train the large hyper-network;
根据训练完成的所述大型超网络更新所述搜索空间中候选架构的参数。The parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
本申请实施例中,利用训练完成的所述大型超网络更新所述搜索空间中候选架构的参数,使所述候选架构更具有适应性,进而提高搜索的准确性吗。In the embodiment of the present application, the parameters of the candidate architectures in the search space are updated by using the large-scale super network that has been trained, so that the candidate architectures are more adaptable, thereby improving the accuracy of the search.
S3、根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果。S3. Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain an evaluation result.
本申请实施例中,所述预设的性能评估模型包括但不限于代理模型、权值共享、超网络。In the embodiment of the present application, the preset performance evaluation model includes, but is not limited to, a proxy model, weight sharing, and a hypernetwork.
优选地,本申请实施例中,利用超网络对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果。Preferably, in this embodiment of the present application, a super network is used to perform evaluation processing on multiple target network architectures in the multi-target network architecture set to obtain an evaluation result.
具体地,所述根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果,包括:Specifically, performing evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results, including:
构建所述多个目标网络架构对应的超网络,并对所述超网络进行预设轮次的训练;constructing super-networks corresponding to the multiple target network architectures, and performing preset rounds of training on the super-networks;
对所述训练后的超网络进行空间性能评估处理,得到评估结果。Perform a spatial performance evaluation process on the trained super-network to obtain an evaluation result.
详细地,对所述超网络进行预设轮次的训练可以选用反向传播法和梯度下降法进行训练,且对所述超网络上的操作符参数和结构参数轮替进行训练。In detail, the back-propagation method and the gradient descent method can be selected for training the super-network for preset rounds, and the operator parameters and structural parameters on the super-network are alternately trained.
具体地,对所述训练后的超网络进行空间性能评估处理,得到评估结果是在需求任务和需求数据集上测试和评估超网络性能,并用超网络的相关性能指标作为该多个目标网络架构的性能指标,以用于后续的评估和比较。Specifically, the space performance evaluation process is performed on the trained super network, and the evaluation result obtained is to test and evaluate the performance of the super network on the demand task and demand data set, and use the relevant performance indicators of the super network as the multiple target network architectures performance indicators for subsequent evaluation and comparison.
可选的,在本申请实施例中,所述多个目标网络架构的性能指标包括分类精度、推理延迟、FLOPs(floating-point operations per second,每秒所执行的浮点运算次数)和参数数量。Optionally, in this embodiment of the present application, the performance indicators of the multiple target network architectures include classification accuracy, inference delay, FLOPs (floating-point operations per second, the number of floating-point operations performed per second), and the number of parameters. .
S4、判断所述评估结果是否满足预设的评估条件。S4. Determine whether the evaluation result satisfies a preset evaluation condition.
本申请实施例中,所述评估结果包括所述多个目标网络架构的四个性能指标,所述预设的评估条件是指所述评估结果中的性能指标的对应数值均大于或者等于预设的性能阈值。In the embodiment of the present application, the evaluation result includes four performance indicators of the multiple target network architectures, and the preset evaluation condition means that the corresponding values of the performance indicators in the evaluation result are all greater than or equal to the preset value performance threshold.
S5、若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。S5. If the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
在本申请实施例中,若多个目标网络架构中仅有一个满足评估条件,则将该满足评估条件的目标网络架构作为最终网络架构。In this embodiment of the present application, if only one of the multiple target network architectures satisfies the evaluation condition, the target network architecture that satisfies the evaluation condition is used as the final network architecture.
本申请另一可选实施例中,若所有评估结果都没有满足所述评估条件,则返回至利用布谷鸟算法在所述搜索空间中进行重新搜索的操作,重新进行网络架构搜索。In another optional embodiment of the present application, if all evaluation results do not satisfy the evaluation condition, the operation returns to the operation of re-searching in the search space by using the cuckoo algorithm, and the network architecture search is performed again.
本申请实施例首先通过布谷鸟算法在搜索空间中进行网络架构搜索,得到多目标网络架构集,不仅不局限于单一的目标最小化一个任务的误差度量,而且能够搜索出满足各方面目标的最优的网络架构,根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果,根据所述评估结果判定搜索出的网络架构是否符合要求,提高了最终得到的符合多个目标的目标网络架构的准确性。因此,本申请提出的网络架构搜索方法,可以解决现有搜索方法无法搜索出同时满足多个目标的网络架构的问题。In the embodiment of the present application, a network architecture search is first performed in the search space through the cuckoo algorithm, and a multi-objective network architecture set is obtained. an optimal network architecture, perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, obtain an evaluation result, determine whether the searched network architecture meets the requirements according to the evaluation result, and improve The accuracy of the final target network architecture that meets multiple objectives. Therefore, the network architecture search method proposed in the present application can solve the problem that the existing search methods cannot search for a network architecture that satisfies multiple objectives at the same time.
如图2所示,是本申请实施例提供的网络架构搜索装置的模块示意图。As shown in FIG. 2 , it is a schematic block diagram of a network architecture search apparatus provided by an embodiment of the present application.
本申请所述网络架构搜索装置100可以安装于电子设备中。根据实现的功能,所述网络架构搜索装置100可以包括信息获取模块101、架构搜索模块102、性能评估模块103和架构获取模块104。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The network architecture search apparatus 100 described in this application may be installed in an electronic device. According to the implemented functions, the network architecture search apparatus 100 may include an information acquisition module 101 , an architecture search module 102 , a performance evaluation module 103 and an architecture acquisition module 104 . The modules described in this application may also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of an electronic device and can perform fixed functions, and are stored in the memory of the electronic device.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述信息获取模块101,用于获取搜索空间的位置信息;The information acquisition module 101 is used to acquire the location information of the search space;
所述架构搜索模块102,用于根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;The architecture search module 102 is configured to perform a network architecture search in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set;
所述性能评估模块103,用于根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;The performance evaluation module 103 is configured to perform evaluation processing on a plurality of target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results;
所述架构获取模块104,用于判断所述评估结果是否满足预设的评估条件,若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。The architecture obtaining module 104 is configured to determine whether the evaluation result satisfies a preset evaluation condition, and if the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
所述信息获取模块101,用于获取搜索空间的位置信息。The information acquisition module 101 is configured to acquire location information of the search space.
本申请实施例中,搜索空间可以是预先构建的,具体的,搜索空间可以通过神经结构搜索(Neural Architecture Search,NAS)机制构建。In this embodiment of the present application, the search space may be pre-constructed, and specifically, the search space may be constructed through a neural architecture search (Neural Architecture Search, NAS) mechanism.
具体的,本申请实施例中,所述装置还包括搜索空间构建模块,所述搜索空间构建模块用于:Specifically, in the embodiment of the present application, the apparatus further includes a search space building module, and the search space building module is used for:
获取搜索空间的位置信息之前,获取预设的神经网络单元;Before obtaining the location information of the search space, obtain a preset neural network unit;
利用预设的连接方式对所述神经网络单元进行排列组合处理,得到搜索空间。The neural network units are arranged and combined in a preset connection manner to obtain a search space.
详细地,本申请实施例中,所述神经网络单元包括但不限于3x3卷积,5x5卷积,7x7卷积,一个最大池化层和一个平均池化层。In detail, in the embodiment of the present application, the neural network unit includes but is not limited to 3x3 convolution, 5x5 convolution, 7x7 convolution, a max pooling layer and an average pooling layer.
详细地,所述连接方式包括启用传入连接和禁用传入连接。In detail, the connection manner includes enabling incoming connections and disabling incoming connections.
其中,所述搜索空间由所有能被搜索到的候选架构组成。Wherein, the search space consists of all candidate architectures that can be searched.
一可选实施例中,所述搜索空间可以为链结构神经网络,或者为包含多个分支和跳过连接的多分支神经网络。In an optional embodiment, the search space may be a chain structure neural network, or a multi-branch neural network including multiple branches and skip connections.
本申请实施例中,搜索空间包括神经网络单元,且这些重复的神经网络单元的结构可以为不同的。In this embodiment of the present application, the search space includes neural network units, and the structures of these repeated neural network units may be different.
优选的,为了减少搜索空间的大小,搜索空间包括重复的神经网络单元,且这些重复的神经网络单元的结构为相同。Preferably, in order to reduce the size of the search space, the search space includes repeated neural network units, and the structures of these repeated neural network units are the same.
所述架构搜索模块102,用于根据所述位置信息通过利用布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集。The architecture search module 102 is configured to perform a network architecture search in the search space by using the cuckoo algorithm according to the location information to obtain a multi-target network architecture set.
本申请实施例中,所述架构搜索模块102具体用于:In this embodiment of the present application, the architecture search module 102 is specifically configured to:
根据所述位置信息获取所述搜索空间中的候选架构集和所述候选架构集的相关参数;Obtain a candidate architecture set in the search space and related parameters of the candidate architecture set according to the location information;
计算所述候选架构集中各个候选架构的适应度值;calculating the fitness value of each candidate architecture in the candidate architecture set;
将所述候选架构集中适应度值大于预设适应阈值的候选架构进行汇总,得到初始候选架构集;Summarize the candidate architectures whose fitness value is greater than the preset adaptation threshold in the candidate architecture set to obtain an initial candidate architecture set;
计算所述初始候选架构集中候选架构的适应变化率;calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set;
若不存在小于固定阈值的适应变化率,确定所述初始候选架构集为所述多目标网络架构集;If there is no adaptive change rate less than a fixed threshold, determining the initial candidate architecture set as the multi-objective network architecture set;
若存在小于固定阈值的适应变化率,将小于固定阈值的适应变化率对应的候选架构进行更新,得到标准网络架构集;If there is an adaptive change rate less than the fixed threshold, update the candidate architecture corresponding to the adaptive change rate less than the fixed threshold to obtain a standard network architecture set;
获取预设的随机数,比较所述随机数和所述标准网络架构集中任意网络架构所对应的目标概率的大小;Obtain a preset random number, and compare the random number with the size of the target probability corresponding to any network architecture in the standard network architecture set;
删除小于所述随机数的目标概率所对应网络架构,保留大于或者等于所述随机数的目标概率所对应网络架构,得到所述多目标网络架构集。The network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
详细地,所述候选架构集包括从搜索空间中随机筛选出的排列组合后的神经网络单元,具体的,候选架构集中的候选架构为搜索空间中随机筛选出的排列组合后的神经网络单元,所述相关参数包括但不限于所述候选架构集的规模参数和所述候选架构的目标概率。In detail, the candidate architecture set includes the permuted and combined neural network units randomly selected from the search space. Specifically, the candidate architectures in the candidate architecture set are the randomly selected permuted and combined neural network units in the search space, The relevant parameters include, but are not limited to, the scale parameter of the candidate architecture set and the target probability of the candidate architecture.
其中,所述网络架构对应的目标概率是所述网络架构被搜索到的概率值,是其自带的固定参数。Wherein, the target probability corresponding to the network architecture is the probability value of the network architecture being searched, which is its own fixed parameter.
在计算适应度值时,可以所述初始候选架构集中各个候选架构的适应度值。具体地,利用预设的适应公式计算所述候选架构集中各个候选架构的适应度值。When calculating the fitness value, the fitness value of each candidate architecture in the initial candidate architecture set may be used. Specifically, a preset adaptation formula is used to calculate the fitness value of each candidate architecture in the candidate architecture set.
所述预设的适应公式包括:The preset adaptation formula includes:
Figure PCTCN2021083181-appb-000010
Figure PCTCN2021083181-appb-000010
其中,
Figure PCTCN2021083181-appb-000011
表示候选架构的适应度值,
Figure PCTCN2021083181-appb-000012
表示第γ个候选架构在t次迭代时的位置,β为步长因子,
Figure PCTCN2021083181-appb-000013
表示点对点的乘法,levy(λ)表示莱维飞行随机搜索路径,λ为预设参数。
in,
Figure PCTCN2021083181-appb-000011
represents the fitness value of the candidate architecture,
Figure PCTCN2021083181-appb-000012
represents the position of the γth candidate architecture at t iterations, β is the step size factor,
Figure PCTCN2021083181-appb-000013
Represents point-to-point multiplication, levy(λ) represents the random search path of Levy flight, and λ is a preset parameter.
进一步地,所述计算所述初始候选架构集中候选架构的适应变化率,包括:Further, the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set includes:
计算所述初始网络架构集中网络架构在预设的第一迭代数时的第一适应度值和在预设的第二迭代数时的第二适应度值;calculating the first fitness value of the network architecture in the initial network architecture set at the preset first iteration number and the second fitness value at the preset second iteration number;
根据预设的变化率公式计算所述第一适应度值和所述第二适应度值之间的适应变化率;Calculate the adaptive change rate between the first fitness value and the second fitness value according to a preset rate of change formula;
确定所述适应变化率为所述候选架构的适应变化率。The adaptive change rate is determined as an adaptive change rate of the candidate architecture.
具体地,所述预设的变化率公式包括:Specifically, the preset rate of change formula includes:
Figure PCTCN2021083181-appb-000014
Figure PCTCN2021083181-appb-000014
其中,Δf为所述适应变化率,
Figure PCTCN2021083181-appb-000015
为所述第一适应度值,
Figure PCTCN2021083181-appb-000016
为所述第二适应度值,t为所述第一迭代数,σ为所述第二迭代数,L为所述初始候选架构集中候选架构在所述初始候选架构集中的位置。
where Δf is the adaptive change rate,
Figure PCTCN2021083181-appb-000015
is the first fitness value,
Figure PCTCN2021083181-appb-000016
is the second fitness value, t is the first iteration number, σ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
进一步地,所述将小于固定阈值的适应变化率对应的候选架构进行更新,包括:Further, updating the candidate architecture corresponding to the adaptive change rate less than the fixed threshold includes:
利用预设的步长公式计算小于固定阈值的适应变化率对应的候选架构的步长;Calculate the step size of the candidate architecture corresponding to the adaptive change rate smaller than the fixed threshold by using the preset step size formula;
根据所述步长的大小对所述候选架构进行替换。The candidate architecture is replaced according to the step size.
详细地,所述预设的步长公式包括:In detail, the preset step size formula includes:
Figure PCTCN2021083181-appb-000017
Figure PCTCN2021083181-appb-000017
U~N(0,τ 2),V~N(0,1 U~N(0, τ 2 ), V~N(0, 1
Figure PCTCN2021083181-appb-000018
Figure PCTCN2021083181-appb-000018
其中,s为步长,U和V均指服从高斯分布的变量,ε为所述初始网络架构的神经网络单元的数量,N表示高斯分布。Among them, s is the step size, U and V both refer to variables that obey a Gaussian distribution, ε is the number of neural network units in the initial network architecture, and N represents a Gaussian distribution.
可选地,本申请实施例所述装置还包括参数更新模块,所述参数更新模块用于:Optionally, the apparatus described in this embodiment of the present application further includes a parameter update module, where the parameter update module is configured to:
得到多目标网络架构集之前,将所述搜索空间中的所有候选架构进行组合,得到大型超网络;Before obtaining the multi-objective network architecture set, combine all candidate architectures in the search space to obtain a large super network;
利用构建的训练集对所述大型超网络进行训练;using the constructed training set to train the large hyper-network;
根据训练完成的所述大型超网络更新所述搜索空间中候选架构的参数。The parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
本申请实施例中,利用训练完成的所述大型超网络更新所述搜索空间中候选架构的参数,使所述候选架构更具有适应性,进而提高搜索的准确性吗。In the embodiment of the present application, the parameters of the candidate architectures in the search space are updated by using the large-scale super network that has been trained, so that the candidate architectures are more adaptable, thereby improving the accuracy of the search.
所述性能评估模块103,用于根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果。The performance evaluation module 103 is configured to perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results.
本申请实施例中,所述预设的性能评估模型包括但不限于代理模型、权值共享、超网络。In the embodiment of the present application, the preset performance evaluation model includes, but is not limited to, a proxy model, weight sharing, and a hypernetwork.
优选地,本申请实施例中,利用超网络对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果。Preferably, in this embodiment of the present application, a super network is used to perform evaluation processing on multiple target network architectures in the multi-target network architecture set to obtain an evaluation result.
具体地,所述性能评估模块103具体用于:Specifically, the performance evaluation module 103 is specifically used for:
构建所述多个目标网络架构对应的超网络,并对所述超网络进行预设轮次的训练;constructing super-networks corresponding to the multiple target network architectures, and performing preset rounds of training on the super-networks;
对所述训练后的超网络进行空间性能评估处理,得到评估结果。Perform a spatial performance evaluation process on the trained super-network to obtain an evaluation result.
详细地,对所述超网络进行预设轮次的训练可以选用反向传播法和梯度下降法进行训练,且对所述超网络上的操作符参数和结构参数轮替进行训练。In detail, the back-propagation method and the gradient descent method can be selected for training the super-network for preset rounds, and the operator parameters and structural parameters on the super-network are alternately trained.
具体地,对所述训练后的超网络进行空间性能评估处理,得到评估结果是在需求任务和需求数据集上测试和评估超网络性能,并用超网络的相关性能指标作为该多个目标网络架构的性能指标,以用于后续的评估和比较。Specifically, performing spatial performance evaluation processing on the trained super-network, and obtaining the evaluation result is to test and evaluate the performance of the super-network on the demand task and demand data set, and use the relevant performance indicators of the super-network as the multiple target network architectures performance indicators for subsequent evaluation and comparison.
可选的,在本申请实施例中,所述多个目标网络架构的性能指标包括分类精度、推理延迟、FLOPs(floating-point operations per second,每秒所执行的浮点运算次数)和参数数量。Optionally, in this embodiment of the present application, the performance indicators of the multiple target network architectures include classification accuracy, inference delay, FLOPs (floating-point operations per second, the number of floating-point operations performed per second), and the number of parameters. .
所述架构获取模块104,用于判断所述评估结果是否满足预设的评估条件。The architecture obtaining module 104 is configured to judge whether the evaluation result satisfies a preset evaluation condition.
本申请实施例中,所述评估结果包括所述多个目标网络架构的四个性能指标,所述预设的评估条件是指所述评估结果中的性能指标的对应数值均大于或者等于预设的性能阈值。In the embodiment of the present application, the evaluation result includes four performance indicators of the multiple target network architectures, and the preset evaluation condition means that the corresponding values of the performance indicators in the evaluation result are all greater than or equal to the preset value performance threshold.
所述架构获取模块104,用于若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。The architecture obtaining module 104 is configured to determine the target network architecture corresponding to the evaluation result as the final network architecture if the evaluation result satisfies the evaluation condition.
若所述评估结果没有满足所述评估条件,返回至利用布谷鸟算法在所述搜索空间中进行重新搜索,若所述评估结果满足所述评估条件,将所述评估结果对应的多目标网络架构作为最终网络架构。If the evaluation result does not satisfy the evaluation condition, return to using the cuckoo algorithm to re-search in the search space; if the evaluation result satisfies the evaluation condition, use the multi-objective network architecture corresponding to the evaluation result as the final network architecture.
在本申请实施例中,若多个目标网络架构中仅有一个满足评估条件,则将该满足评估条件的目标网络架构作为最终网络架构。In this embodiment of the present application, if only one of the multiple target network architectures satisfies the evaluation condition, the target network architecture that satisfies the evaluation condition is used as the final network architecture.
本申请另一可选实施例中,若所有评估结果都没有满足所述评估条件,则返回至利用布谷鸟算法在所述搜索空间中进行重新搜索的操作,重新进行网络架构搜索。In another optional embodiment of the present application, if all evaluation results do not satisfy the evaluation condition, the operation returns to the operation of re-searching in the search space by using the cuckoo algorithm, and the network architecture search is performed again.
本申请实施例首先通过布谷鸟算法在搜索空间中进行网络架构搜索,得到多目标网络架构集,不仅不局限于单一的目标最小化一个任务的误差度量,而且能够搜索出满足各方 面目标的最优的网络架构,根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果,根据所述评估结果判定搜索出的网络架构是否符合要求,提高了最终得到的符合多个目标的目标网络架构的准确性。因此,本申请提出的网络架构搜索装置,可以解决无法搜索出同时满足多个目标的网络架构的问题。In the embodiment of the present application, a network architecture search is first performed in the search space through the cuckoo algorithm, and a multi-objective network architecture set is obtained. an optimal network architecture, perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, obtain an evaluation result, determine whether the searched network architecture meets the requirements according to the evaluation result, and improve The accuracy of the final target network architecture that meets multiple objectives. Therefore, the network architecture search device proposed in the present application can solve the problem that a network architecture that satisfies multiple objectives at the same time cannot be searched.
如图3所示,是本申请实现网络架构搜索方法的电子设备的结构示意图。As shown in FIG. 3 , it is a schematic structural diagram of an electronic device implementing the network architecture search method of the present application.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如网络架构搜索程序12。The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a network architecture search program 12.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如网络架构搜索程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 . In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash memory card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software installed in the electronic device 1 and various data, such as the code of the network architecture search program 12, etc., but also can be used to temporarily store data that has been output or will be output.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行网络架构搜索程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits. Central Processing Unit (CPU), microprocessor, digital processing chip, graphics processor and combination of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect the various components of the entire electronic device, by running or executing the program or module (for example, executing the program) stored in the memory 11. Network architecture search program, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management The device implements functions such as charge management, discharge management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. The display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的网络架构搜索程序12是多个指令的组合,在所述处理器10中运行时,可以实现:The network architecture search program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, can realize:
获取搜索空间的位置信息;Obtain the location information of the search space;
根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的,例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the modules/units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. The computer-readable storage medium may be volatile or non-volatile, for example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U Disk, removable hard disk, magnetic disk, CD-ROM, computer memory, read-only memory (ROM, Read-Only Memory).
本申请还提供一种计算机可读存储介质,所述可读存储介质可以是易失性的,也可以是非易失性的,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:The present application also provides a computer-readable storage medium. The readable storage medium may be volatile or non-volatile, and the readable storage medium stores a computer program. When executed by the processor of the electronic device, it can achieve:
获取搜索空间的位置信息;Obtain the location information of the search space;
根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。Further, the computer-usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one function, and the like; using the created data, etc.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the application is to be defined by the appended claims rather than the foregoing description, which is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any accompanying reference signs in the claims should not be construed as limiting the involved claims.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limitations. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种网络架构搜索方法,其中,所述方法包括:A network architecture search method, wherein the method comprises:
    获取搜索空间的位置信息;Obtain the location information of the search space;
    根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
    根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
    判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
    若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  2. 如权利要求1所述的网络架构搜索方法,其中,所述获取搜索空间的位置信息之前,所述方法还包括:The network architecture search method according to claim 1, wherein, before acquiring the location information of the search space, the method further comprises:
    获取预设的神经网络单元;Get the preset neural network unit;
    利用预设的连接方式对所述神经网络单元进行排列组合处理,得到搜索空间。The neural network units are arranged and combined in a preset connection manner to obtain a search space.
  3. 如权利要求1所述的网络架构搜索方法,其中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集,包括:The network architecture search method according to claim 1, wherein the performing a network architecture search in the search space through the cuckoo algorithm according to the location information, to obtain a multi-target network architecture set, comprising:
    根据所述位置信息获取所述搜索空间中的候选架构集和所述候选架构集的相关参数;Obtain a candidate architecture set in the search space and related parameters of the candidate architecture set according to the location information;
    计算所述候选架构集中各个候选架构的适应度值;calculating the fitness value of each candidate architecture in the candidate architecture set;
    将所述候选架构集中适应度值大于预设适应阈值的候选架构进行汇总,得到初始候选架构集;Summarize the candidate architectures whose fitness value is greater than the preset adaptation threshold in the candidate architecture set to obtain an initial candidate architecture set;
    计算所述初始候选架构集中候选架构的适应变化率;calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set;
    若不存在小于固定阈值的适应变化率,确定所述初始候选架构集为所述多目标网络架构集;If there is no adaptive change rate less than a fixed threshold, determining the initial candidate architecture set as the multi-objective network architecture set;
    若存在小于固定阈值的适应变化率,将小于固定阈值的适应变化率对应的候选架构进行更新,得到标准网络架构集;If there is an adaptive change rate less than the fixed threshold, update the candidate architecture corresponding to the adaptive change rate less than the fixed threshold to obtain a standard network architecture set;
    获取预设的随机数,比较所述随机数和所述标准网络架构集中任意网络架构所对应的目标概率的大小;Obtain a preset random number, and compare the random number with the size of the target probability corresponding to any network architecture in the standard network architecture set;
    删除小于所述随机数的目标概率所对应网络架构,保留大于或者等于所述随机数的目标概率所对应网络架构,得到所述多目标网络架构集。The network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
  4. 如权利要求3所述的网络架构搜索方法,其中,所述计算所述初始候选架构集中候选架构的适应变化率,包括:The network architecture search method according to claim 3, wherein the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set comprises:
    计算所述初始网络架构集中网络架构在预设的第一迭代数时的第一适应度值和在预设的第二迭代数时的第二适应度值;calculating the first fitness value of the network architecture in the initial network architecture set at the preset first iteration number and the second fitness value at the preset second iteration number;
    根据预设的变化率公式计算所述第一适应度值和所述第二适应度值之间的适应变化率;Calculate the adaptive change rate between the first fitness value and the second fitness value according to a preset rate of change formula;
    确定所述适应变化率为所述候选架构的适应变化率。The adaptive change rate is determined as an adaptive change rate of the candidate architecture.
  5. 如权利要求4所述的网络架构搜索方法,其中,所述预设的变化率公式包括:The network architecture search method according to claim 4, wherein the preset rate of change formula comprises:
    Figure PCTCN2021083181-appb-100001
    Figure PCTCN2021083181-appb-100001
    其中,Δf为所述适应变化率,
    Figure PCTCN2021083181-appb-100002
    为所述第一适应度值,
    Figure PCTCN2021083181-appb-100003
    为所述第二适应度值,t为所述第一迭代数,σ为所述第二迭代数,L为所述初始候选架构集中候选架构在所述初始候选架构集中的位置。
    where Δf is the adaptive change rate,
    Figure PCTCN2021083181-appb-100002
    is the first fitness value,
    Figure PCTCN2021083181-appb-100003
    is the second fitness value, t is the first iteration number, σ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
  6. 如权利要求3所述的网络架构搜索方法,其中,所述将小于固定阈值的适应变化率对应的候选架构进行更新,包括:The network architecture search method according to claim 3, wherein the updating the candidate architecture corresponding to the adaptive change rate less than a fixed threshold value comprises:
    利用预设的步长公式计算小于固定阈值的适应变化率对应的候选架构的步长;Calculate the step size of the candidate architecture corresponding to the adaptive change rate smaller than the fixed threshold by using the preset step size formula;
    根据所述步长的大小对所述候选架构进行替换。The candidate architecture is replaced according to the step size.
  7. 如权利要求1至6中任意一项所述的网络架构搜索方法,其中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集之前,所述方法还包括:The network architecture search method according to any one of claims 1 to 6, wherein, before the network architecture search is performed in the search space through the cuckoo algorithm according to the location information, and a multi-target network architecture set is obtained, The method also includes:
    将所述搜索空间中的所有候选架构进行组合,得到大型超网络;Combining all candidate architectures in the search space to obtain a large super network;
    利用构建的训练集对所述大型超网络进行训练;using the constructed training set to train the large hyper-network;
    根据训练完成的所述大型超网络更新所述搜索空间中候选架构的参数。The parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
  8. 一种网络架构搜索装置,其中,所述装置包括:A network architecture search device, wherein the device includes:
    信息获取模块,用于获取搜索空间的位置信息;The information acquisition module is used to acquire the location information of the search space;
    架构搜索模块,用于根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;an architecture search module, configured to perform a network architecture search in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set;
    性能评估模块,用于根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;A performance evaluation module, configured to perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model to obtain evaluation results;
    架构获取模块,用于判断所述评估结果是否满足预设的评估条件,若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。The architecture acquisition module is configured to judge whether the evaluation result satisfies the preset evaluation condition, and if the evaluation result satisfies the evaluation condition, determine the target network architecture corresponding to the evaluation result as the final network architecture.
  9. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device comprises:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:The memory stores computer program instructions executable by the at least one processor, the computer program instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
    获取搜索空间的位置信息;Obtain the location information of the search space;
    根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
    根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
    判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
    若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  10. 如权利要求9所述的电子设备,其中,所述获取搜索空间的位置信息之前,所述至少一个处理器还执行以下步骤:The electronic device according to claim 9, wherein, before acquiring the location information of the search space, the at least one processor further performs the following steps:
    获取预设的神经网络单元;Get the preset neural network unit;
    利用预设的连接方式对所述神经网络单元进行排列组合处理,得到搜索空间。The neural network units are arranged and combined in a preset connection manner to obtain a search space.
  11. 如权利要求9所述的电子设备,其中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集,包括:The electronic device according to claim 9, wherein, according to the location information, performing a network architecture search in the search space through a cuckoo algorithm to obtain a multi-target network architecture set, comprising:
    根据所述位置信息获取所述搜索空间中的候选架构集和所述候选架构集的相关参数;Obtain a candidate architecture set in the search space and related parameters of the candidate architecture set according to the location information;
    计算所述候选架构集中各个候选架构的适应度值;calculating the fitness value of each candidate architecture in the candidate architecture set;
    将所述候选架构集中适应度值大于预设适应阈值的候选架构进行汇总,得到初始候选架构集;Summarize the candidate architectures whose fitness value is greater than the preset adaptation threshold in the candidate architecture set to obtain an initial candidate architecture set;
    计算所述初始候选架构集中候选架构的适应变化率;calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set;
    若不存在小于固定阈值的适应变化率,确定所述初始候选架构集为所述多目标网络架构集;If there is no adaptive change rate less than a fixed threshold, determining the initial candidate architecture set as the multi-objective network architecture set;
    若存在小于固定阈值的适应变化率,将小于固定阈值的适应变化率对应的候选架构进行更新,得到标准网络架构集;If there is an adaptive change rate less than the fixed threshold, update the candidate architecture corresponding to the adaptive change rate less than the fixed threshold to obtain a standard network architecture set;
    获取预设的随机数,比较所述随机数和所述标准网络架构集中任意网络架构所对应的 目标概率的大小;Obtain a preset random number, compare the random number and the size of the target probability corresponding to any network architecture in the standard network architecture set;
    删除小于所述随机数的目标概率所对应网络架构,保留大于或者等于所述随机数的目标概率所对应网络架构,得到所述多目标网络架构集。The network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
  12. 如权利要求11所述的电子设备,其中,所述计算所述初始候选架构集中候选架构的适应变化率,包括:The electronic device of claim 11, wherein the calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set comprises:
    计算所述初始网络架构集中网络架构在预设的第一迭代数时的第一适应度值和在预设的第二迭代数时的第二适应度值;calculating the first fitness value of the network architecture in the initial network architecture set at the preset first iteration number and the second fitness value at the preset second iteration number;
    根据预设的变化率公式计算所述第一适应度值和所述第二适应度值之间的适应变化率;Calculate the adaptive change rate between the first fitness value and the second fitness value according to a preset rate of change formula;
    确定所述适应变化率为所述候选架构的适应变化率。The adaptive change rate is determined as an adaptive change rate of the candidate architecture.
  13. 如权利要求12所述的电子设备,其中,所述预设的变化率公式包括:The electronic device of claim 12, wherein the preset rate of change formula comprises:
    Figure PCTCN2021083181-appb-100004
    Figure PCTCN2021083181-appb-100004
    其中,Δf为所述适应变化率,
    Figure PCTCN2021083181-appb-100005
    为所述第一适应度值,
    Figure PCTCN2021083181-appb-100006
    为所述第二适应度值,t为所述第一迭代数,σ为所述第二迭代数,L为所述初始候选架构集中候选架构在所述初始候选架构集中的位置。
    where Δf is the adaptive change rate,
    Figure PCTCN2021083181-appb-100005
    is the first fitness value,
    Figure PCTCN2021083181-appb-100006
    is the second fitness value, t is the first iteration number, σ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
  14. 如权利要求11所述的电子设备,其中,所述将小于固定阈值的适应变化率对应的候选架构进行更新,包括:The electronic device according to claim 11, wherein the updating the candidate architecture corresponding to the adaptive change rate smaller than the fixed threshold value comprises:
    利用预设的步长公式计算小于固定阈值的适应变化率对应的候选架构的步长;Calculate the step size of the candidate architecture corresponding to the adaptive change rate smaller than the fixed threshold by using the preset step size formula;
    根据所述步长的大小对所述候选架构进行替换。The candidate architecture is replaced according to the size of the stride.
  15. 如权利要求9至14中任意一项所述的电子设备,其中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集之前,所述至少一个处理器还执行以下步骤:The electronic device according to any one of claims 9 to 14, wherein before the network architecture search is performed in the search space through the cuckoo algorithm according to the location information to obtain a multi-target network architecture set, the At least one processor also performs the following steps:
    将所述搜索空间中的所有候选架构进行组合,得到大型超网络;Combining all candidate architectures in the search space to obtain a large super network;
    利用构建的训练集对所述大型超网络进行训练;using the constructed training set to train the large hyper-network;
    根据训练完成的所述大型超网络更新所述搜索空间中候选架构的参数。The parameters of the candidate architectures in the search space are updated according to the large super-network that has been trained.
  16. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium storing a computer program, wherein the computer program implements the following steps when executed by a processor:
    获取搜索空间的位置信息;Obtain the location information of the search space;
    根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集;According to the location information, a network architecture search is performed in the search space through the cuckoo algorithm to obtain a multi-objective network architecture set;
    根据预设的性能评估模型对所述多目标网络架构集中的多个目标网络架构进行评估处理,得到评估结果;Perform evaluation processing on multiple target network architectures in the multi-target network architecture set according to a preset performance evaluation model, to obtain evaluation results;
    判断所述评估结果是否满足预设的评估条件;Judging whether the evaluation result satisfies a preset evaluation condition;
    若所述评估结果满足所述评估条件,确定所述评估结果对应的目标网络架构为最终网络架构。If the evaluation result satisfies the evaluation condition, it is determined that the target network architecture corresponding to the evaluation result is the final network architecture.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述获取搜索空间的位置信息之前,所述计算机程序被处理器执行时还实现如下步骤:The computer-readable storage medium according to claim 16, wherein, before the acquisition of the location information of the search space, the computer program further implements the following steps when executed by the processor:
    获取预设的神经网络单元;Get the preset neural network unit;
    利用预设的连接方式对所述神经网络单元进行排列组合处理,得到搜索空间。The neural network units are arranged and combined in a preset connection manner to obtain a search space.
  18. 如权利要求16所述的计算机可读存储介质,其中,所述根据所述位置信息通过布谷鸟算法在所述搜索空间中进行网络架构搜索,得到多目标网络架构集,包括:The computer-readable storage medium according to claim 16 , wherein, according to the location information, performing a network architecture search in the search space through a cuckoo algorithm to obtain a multi-objective network architecture set, comprising:
    根据所述位置信息获取所述搜索空间中的候选架构集和所述候选架构集的相关参数;Obtain a candidate architecture set in the search space and related parameters of the candidate architecture set according to the location information;
    计算所述候选架构集中各个候选架构的适应度值;calculating the fitness value of each candidate architecture in the candidate architecture set;
    将所述候选架构集中适应度值大于预设适应阈值的候选架构进行汇总,得到初始候选架构集;Summarize the candidate architectures whose fitness value is greater than the preset adaptation threshold in the candidate architecture set to obtain an initial candidate architecture set;
    计算所述初始候选架构集中候选架构的适应变化率;calculating the adaptive change rate of the candidate architectures in the initial candidate architecture set;
    若不存在小于固定阈值的适应变化率,确定所述初始候选架构集为所述多目标网络架构集;If there is no adaptive change rate less than a fixed threshold, determining the initial candidate architecture set as the multi-objective network architecture set;
    若存在小于固定阈值的适应变化率,将小于固定阈值的适应变化率对应的候选架构进行更新,得到标准网络架构集;If there is an adaptive change rate less than the fixed threshold, update the candidate architecture corresponding to the adaptive change rate less than the fixed threshold to obtain a standard network architecture set;
    获取预设的随机数,比较所述随机数和所述标准网络架构集中任意网络架构所对应的目标概率的大小;Obtain a preset random number, and compare the random number with the size of the target probability corresponding to any network architecture in the standard network architecture set;
    删除小于所述随机数的目标概率所对应网络架构,保留大于或者等于所述随机数的目标概率所对应网络架构,得到所述多目标网络架构集。The network architecture corresponding to the target probability smaller than the random number is deleted, the network architecture corresponding to the target probability greater than or equal to the random number is retained, and the multi-target network architecture set is obtained.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述计算所述初始候选架构集中候选架构的适应变化率,包括:The computer-readable storage medium of claim 18, wherein the calculating an adaptive change rate of candidate architectures in the initial set of candidate architectures comprises:
    计算所述初始网络架构集中网络架构在预设的第一迭代数时的第一适应度值和在预设的第二迭代数时的第二适应度值;calculating the first fitness value of the network architecture in the initial network architecture set at the preset first iteration number and the second fitness value at the preset second iteration number;
    根据预设的变化率公式计算所述第一适应度值和所述第二适应度值之间的适应变化率;Calculate the adaptive change rate between the first fitness value and the second fitness value according to a preset rate of change formula;
    确定所述适应变化率为所述候选架构的适应变化率。The adaptive change rate is determined as an adaptive change rate of the candidate architecture.
  20. 如权利要求19所述的计算机可读存储介质,其中,所述预设的变化率公式包括:The computer-readable storage medium of claim 19, wherein the preset rate-of-change formula comprises:
    Figure PCTCN2021083181-appb-100007
    Figure PCTCN2021083181-appb-100007
    其中,Δf为所述适应变化率,
    Figure PCTCN2021083181-appb-100008
    为所述第一适应度值,
    Figure PCTCN2021083181-appb-100009
    为所述第二适应度值,t为所述第一迭代数,σ为所述第二迭代数,L为所述初始候选架构集中候选架构在所述初始候选架构集中的位置。
    where Δf is the adaptive change rate,
    Figure PCTCN2021083181-appb-100008
    is the first fitness value,
    Figure PCTCN2021083181-appb-100009
    is the second fitness value, t is the first iteration number, σ is the second iteration number, and L is the position of the candidate architecture in the initial candidate architecture set in the initial candidate architecture set.
PCT/CN2021/083181 2020-12-29 2021-03-26 Network architecture search method and apparatus, electronic device, and medium WO2022141840A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011603641.8 2020-12-29
CN202011603641.8A CN112700006B (en) 2020-12-29 2020-12-29 Network architecture searching method, device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2022141840A1 true WO2022141840A1 (en) 2022-07-07

Family

ID=75512259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083181 WO2022141840A1 (en) 2020-12-29 2021-03-26 Network architecture search method and apparatus, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN112700006B (en)
WO (1) WO2022141840A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118052080A (en) * 2024-04-15 2024-05-17 中天引控科技股份有限公司 Method and system for optimizing bonding process parameters of microwave component

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023082045A1 (en) * 2021-11-09 2023-05-19 华为技术有限公司 Neural network architecture search method and apparatus
CN114884813B (en) * 2022-05-05 2023-06-27 一汽解放青岛汽车有限公司 Network architecture determining 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
CN107122869A (en) * 2017-05-11 2017-09-01 中国人民解放军装备学院 The analysis method and device of Network Situation
CN107222333A (en) * 2017-05-11 2017-09-29 中国民航大学 A kind of network node safety situation evaluation method based on BP neural network
US20180075860A1 (en) * 2016-09-14 2018-03-15 Nuance Communications, Inc. Method for Microphone Selection and Multi-Talker Segmentation with Ambient Automated Speech Recognition (ASR)
CN110689127A (en) * 2019-10-15 2020-01-14 北京小米智能科技有限公司 Neural network structure model searching method, device and storage medium
CN111342469A (en) * 2020-05-18 2020-06-26 广东电网有限责任公司佛山供电局 Multi-voltage-level network architecture optimization method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596212B (en) * 2018-03-29 2022-04-22 红河学院 Transformer fault diagnosis method based on improved cuckoo search optimization neural network
CN109547431A (en) * 2018-11-19 2019-03-29 国网河南省电力公司信息通信公司 A kind of network security situation evaluating method based on CS and improved BP
CN110276442B (en) * 2019-05-24 2022-05-17 西安电子科技大学 Searching method and device of neural network architecture
CN110929867B (en) * 2019-10-29 2023-12-12 北京小米移动软件有限公司 Neural network structure evaluation and determination method, device and storage medium
CN111275172B (en) * 2020-01-21 2023-09-01 复旦大学 Feedforward neural network structure searching method based on search space optimization
CN111325338B (en) * 2020-02-12 2023-05-05 暗物智能科技(广州)有限公司 Neural network structure evaluation model construction and neural network structure searching method
CN112101525A (en) * 2020-09-08 2020-12-18 南方科技大学 Method, device and system for designing neural network through NAS

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180075860A1 (en) * 2016-09-14 2018-03-15 Nuance Communications, Inc. Method for Microphone Selection and Multi-Talker Segmentation with Ambient Automated Speech Recognition (ASR)
CN107122869A (en) * 2017-05-11 2017-09-01 中国人民解放军装备学院 The analysis method and device of Network Situation
CN107222333A (en) * 2017-05-11 2017-09-29 中国民航大学 A kind of network node safety situation evaluation method based on BP neural network
CN110689127A (en) * 2019-10-15 2020-01-14 北京小米智能科技有限公司 Neural network structure model searching method, device and storage medium
CN111342469A (en) * 2020-05-18 2020-06-26 广东电网有限责任公司佛山供电局 Multi-voltage-level network architecture optimization method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIE LIXIA, WANG, ZHIHUA: "Network Security Situation Assessment Method Based on Cuckoo Search Optimized Back Propagation Neural Network", JOURNAL OF COMPUTER APPLICATIONS, JISUANJI YINGYONG, CN, vol. 37, no. 7, 10 July 2017 (2017-07-10), CN , pages 1926 - 1930, XP055948404, ISSN: 1001-9081 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118052080A (en) * 2024-04-15 2024-05-17 中天引控科技股份有限公司 Method and system for optimizing bonding process parameters of microwave component

Also Published As

Publication number Publication date
CN112700006A (en) 2021-04-23
CN112700006B (en) 2024-06-28

Similar Documents

Publication Publication Date Title
WO2022141840A1 (en) Network architecture search method and apparatus, electronic device, and medium
WO2021089013A1 (en) Spatial graph convolutional network training method, electronic device and storage medium
WO2022160449A1 (en) Text classification method and apparatus, electronic device, and storage medium
JP2023510566A (en) Adaptive search method and apparatus for neural networks
JP2022024102A (en) Method for training search model, method for searching target object and device therefor
WO2022141858A1 (en) Pedestrian detection method and apparatus, electronic device, and storage medium
WO2022062449A1 (en) User grouping method and apparatus, and electronic device and storage medium
WO2022142106A1 (en) Text analysis method and apparatus, electronic device, and readable storage medium
CN114785696A (en) Importance evaluation method and device for complex network nodes
WO2023051369A1 (en) Neural network acquisition method, data processing method and related device
CN111768096A (en) Rating method and device based on algorithm model, electronic equipment and storage medium
WO2022126902A1 (en) Model compression method and apparatus, electronic device, and medium
CN112243509A (en) System and method for generating data sets from heterogeneous sources for machine learning
CN112200653A (en) Bank transaction amount prediction method, resource allocation method, computing device and medium
CN111652282B (en) Big data-based user preference analysis method and device and electronic equipment
CN113326449A (en) Method, apparatus, electronic device, and medium for predicting traffic flow
CN116705196A (en) Drug target interaction prediction method and device based on symbolic graph neural network
KR102561799B1 (en) Method and system for predicting latency of deep learning model in device
CN113961765B (en) Searching method, searching device, searching equipment and searching medium based on neural network model
WO2022222228A1 (en) Method and apparatus for recognizing bad textual information, and electronic device and storage medium
CN114357180A (en) Knowledge graph updating method and electronic equipment
CN113486238A (en) Information pushing method, device and equipment based on user portrait and storage medium
CN111652281A (en) Information data classification method and device and readable storage medium
CN112949759B (en) Text clustering method, text clustering device, electronic equipment and computer readable storage medium
WO2022227170A1 (en) Method and apparatus for generating cross-language word vector, electronic device, and storage medium

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: 21912610

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: 21912610

Country of ref document: EP

Kind code of ref document: A1