Calculation method and computing device thereof

The computational method and device automate the selection of data augmentation methods and hyperparameters using a hypernetwork, addressing inefficiencies in deep learning model development by optimizing primary network parameters, thereby improving performance and reducing resource consumption.

JP2025183137AActive Publication Date: 2025-12-16WISTRON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024196286
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-04
Filing Date
2024-11-08
Publication Date
2025-12-16
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

Existing deep learning model development is labor-intensive and resource-consuming due to manual selection of data augmentation methods and hyperparameter combinations, leading to unnecessary computational time and potential degradation of model performance.

Method used

A computational method and device that utilize a hypernetwork to automatically generate and optimize primary network parameters based on hyperparameter combinations, allowing for efficient selection of optimal data augmentation methods and hyperparameters without retraining.

Benefits of technology

Reduces labor and computational resources required, enhances model performance by automatically selecting appropriate data augmentation methods and hyperparameters, and shortens training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025183137000001_ABST
    Figure 2025183137000001_ABST
Patent Text Reader

Abstract

To provide a calculation method for a computing device.SOLUTION: A computation method for a computing device includes steps of converting input data into augmented data according to a hyperparameter combination, and inputting the augmented data into a primary network. A hypernetwork is configured to output a plurality of primary-network parameters of the primary network in accordance with the hyperparameter combination using a plurality of hypernetwork parameters. The primary network is configured to generate output data in accordance with the augmented data using the primary-network parameters. The hypernetwork parameters are trained or being trained, and the primary-network parameters are not trained.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a calculation method and a computing device thereof, and more particularly to a calculation method and a computing device thereof that can improve model performance and reduce calculation time. [Background technology]

[0002] In the development of deep learning models (e.g., image deep learning models), various data augmentation methods can be used to provide larger amounts of training data, allowing deep learning models to train or learn using more diverse training data. However, selecting an inappropriate data augmentation method or an inappropriate combination of hyperparameters can result in unnecessary computational time and resource waste, and even degrade the performance of the deep learning model. Existing techniques manually select data augmentation methods and corresponding hyperparameter combinations, train deep learning models for the hyperparameter combinations one by one, and determine which deep learning model for a particular hyperparameter combination yields the best performance. However, this existing technique requires manually selecting hyperparameter combinations and training multiple deep learning models, which consumes considerable labor and computational resources. Therefore, selecting an appropriate data augmentation method and corresponding hyperparameter combination remains a major challenge in the development of existing deep learning models. Summary of the Invention [Problem to be solved by the invention]

[0003] Therefore, the main objective of the present application is to provide a calculation method and a computing device thereof to remedy the shortcomings of the prior art. [Means for solving the problem]

[0004] An embodiment of the present application discloses a computational method for a computing device, the method including: converting input data into augmented data according to a hyperparameter combination; and inputting the augmented data into a primary network, wherein the hypernetwork is configured to output a plurality of primary network parameters of the primary network according to the hyperparameter combination using a plurality of hypernetwork parameters; the primary network is configured to output output data according to the augmented data using the primary network parameters; the hypernetwork parameters have been trained or are in the process of being trained; and the plurality of primary network parameters have not been trained.

[0005] Another embodiment of the present invention discloses a computing device comprising: a processing circuit configured to execute a primary network and a hypernetwork; and a storage circuit coupled to the processing circuit and configured to store instructions, the processing circuit being configured to execute the instructions, the instructions including: transforming input data into augmented data according to a hyperparameter combination; and inputting the augmented data into the primary network, the hypernetwork being configured to output a plurality of primary network parameters of the primary network according to the hyperparameter combination using a plurality of hypernetwork parameters, the primary network being configured to output output data according to the augmented data using the primary network parameters, the hypernetwork parameters being trained or in training, and the plurality of primary network parameters being untrained.

[0006] Embodiments of the present invention disclose that multiple hypernetwork parameters are optimized in the training phase.

[0007] An embodiment of the present invention discloses that the plurality of hyperparameter combinations includes a plurality of first hyperparameter combinations and at least one second hyperparameter combination, and in a testing phase, at least one second hyperparameter combination is selected from the plurality of hyperparameter combinations according to a plurality of first model metrics corresponding to the plurality of first hyperparameter combinations, and a best hyperparameter combination is selected from the plurality of hyperparameter combinations according to at least the plurality of first model metrics and at least one second model metric corresponding to the at least one second hyperparameter combination.

[0008] The embodiments of the present invention disclose that after the training phase is completed, the multiple hyper-network parameters remain unchanged for any hyper-parameter combination.

[0009] An embodiment of the present invention discloses that in a training phase, a hypernetwork is trained using at least one third hyperparameter combination, and in a testing phase, the hypernetwork uses the trained multiple hypernetwork parameters to output multiple fourth primary network parameters of a primary network corresponding to the multiple fourth hyperparameter combinations, such that the best hyperparameter combination is selected from the multiple fourth hyperparameter combinations, where at least one of the multiple fourth hyperparameter combinations is different from at least one of the at least one third hyperparameter combination.

[0010] An embodiment of the present invention discloses that in a training phase, a hypernetwork is trained using at least one third hyperparameter combination, and in a testing phase, the hypernetwork uses the trained hypernetwork parameters to output a plurality of fourth primary network parameters of a primary network corresponding to the plurality of fourth hyperparameter combinations, such that the best hyperparameter combination is selected from the plurality of fourth hyperparameter combinations, wherein the upper limits of the plurality of fourth hyperparameter combinations are less than or equal to the upper limit of at least one third hyperparameter combination, and the lower limits of the plurality of fourth hyperparameter combinations are greater than or equal to the lower limit of at least one third hyperparameter combination.

[0011] An embodiment of the present invention discloses that in a training phase, a hypernetwork is trained using a plurality of third hyperparameter combinations, and in a testing phase, the hypernetwork uses the trained plurality of hypernetwork parameters to output a plurality of fourth primary network parameters of a primary network corresponding to the plurality of fourth hyperparameter combinations, such that the best hyperparameter combination is selected from the plurality of fourth hyperparameter combinations, wherein the difference between any two of the plurality of fourth hyperparameter combinations is smaller than the difference between any two of the third hyperparameter combinations.

[0012] These and other objects of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiments that are illustrated in the various figures and drawings. [Brief explanation of the drawings]

[0013] [Figure 1] 1 is a schematic diagram of a computing device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a schematic diagram of a calculation method according to an embodiment of the present invention. [Figure 3] 1 is a schematic diagram of a computing device according to an embodiment of the present invention. [Figure 4] 1 is a schematic diagram of a computing device according to an embodiment of the present invention. [Figure 5] FIG. 10 is a schematic diagram of AUROC for different hyperparameter combinations. [Figure 6] FIG. 10 is a schematic diagram of AUROC for different hyperparameter combinations. [Figure 7] FIG. 1 is a schematic diagram of a computing architecture for an existing neural network architecture. [Figure 8] 1 is a schematic diagram of a computing architecture of a Hyper-Primary network architecture according to an embodiment of the present invention; [Figure 9] 1 is a schematic diagram of a computing device according to an embodiment of the present invention. [Figure 10] FIG. 2 is a schematic diagram of input data and augmentation data according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION

[0014] 1 is a schematic diagram of a computing device 10 according to an embodiment of the present invention. The computing device 10 (e.g., a chip, a computer, or a host) includes a memory circuit 110 and a processing circuit 120. The computing device 10 may be deployed in an industrial production line, a drone, a sensor, or the like. The computing device 10 calculates at least one optimal hyperparameter.

number

number

number

[0015] For example, the computing device 10 may automatically select the rotation angle as 175° or the image brightness as 0.8, resulting in the hyperparameter combination σ ∨ include 175° and 0.8. After rotating the input data 10IN by 175° and adjusting the image brightness of the input data 10IN to 0.8 to convert it into the augmented data 10UT, the computing device 10 can automatically obtain output data 10PD corresponding to the input data 10IN. In the case of a classification task (or a segmentation task), the output data 10PD is a more accurate class (or a more accurate segmented image). In other words, the computing device 10 can automatically and efficiently select an appropriate data augmentation method or an appropriate hyperparameter combination and automatically and efficiently optimize a corresponding deep learning model in the inference phase, thereby saving labor, computing time, or resources.

[0016] In one embodiment, a training data set and a validation data set may be used in the training phase, a test data set may be used in the testing phase, and an inference data set may be used in the inference phase, including unlabeled data.

[0017] 2 is a schematic diagram of a computational method 20 according to an embodiment of the present invention. The computational method 20 may be used in a computing device (e.g., 10). At least a portion of the computational method 20 may be compiled into program code. The computational method 20 may include the following steps:

[0018] Step S202: The computing device or the user defines the data augmentation method to be employed, for example, the data augmentation method may include, but is not limited to, image flip, image rotation, image shift, image scaling, image brightness or contrast adjustment, or a combination thereof.

[0019] Step S204: The computing device or user defines possible ranges for hyperparameters for each data augmentation method. For example, the hyperparameter range may be 0 to 360 degrees for image rotation, and the hyperparameters used in the training phase may be integers or floating-point numbers within the hyperparameter range between 0 and 360 degrees. For example, the hyperparameter range may be 0 to 1 for image brightness adjustment, and the hyperparameters used in the training phase may be floating-point numbers within the hyperparameter range between 0 and 1 degree.

[0020] Step S206: The computing device samples a hyperparameter combination (e.g., σ in FIG. 3). For example, through random sampling, the hyperparameter combination σ is randomly sampled within a hyperparameter range having a random distribution p(σ), where p(σ) may be any random distribution (e.g., a uniform distribution). In one embodiment, sampling a specific hyperparameter combination means determining a specific data augmentation method.

[0021] Step S208: The computing device performs data augmentation based on the sampled hyperparameter combination. For example, the computing device applies the hyperparameter combination σ (e.g., a rotation angle of 45° or an image brightness of 0.5) to one or more input data of the training dataset, so that each input data (e.g., 30IN in FIG. 3) is individually transformed into augmented data (e.g., x in FIG. 3).

[0022] Step S210: The computing device generates primary network parameters based on the sampled hyperparameter combination. For example, the computing device inputs the hyperparameter combination σ into the hypernetwork. The hypernetwork uses the hypernetwork parameters (e.g., ω in FIG. 3) to correspondingly generate the primary network (e.g., ω in FIG. 3) according to the hyperparameter combination σ.

number

[0023] Step S212: The computing device calculates output data. For example, the computing device inputs the augmented data generated by the transformation in step S208 into the primary network. The primary network uses the primary network parameters to generate the corresponding output data (e.g., x) according to each augmented data (e.g., x in FIG. 3).

number

[0024] Step S214: The computing device updates the hypernetwork parameters (e.g., ω). For example, the computing device calculates a loss function or model metric to optimize or adjust the hypernetwork parameters using backpropagation.

[0025] Step S216: The computing device determines whether one epoch is complete. For example, the computing device determines whether all input data (e.g., 30 IN) of the training dataset have been processed once. If the computing device determines that there is input data that has not yet been calculated, it continues training using the remaining input data, for example, by re-executing step S208 or S206, and converts at least one of the remaining input data into at least one augmented data. If the computing device determines that one epoch is complete, it executes, for example, step S218.

[0026] Step S218: The computing device determines whether the training phase is complete. For example, when the loss function converges or the model metric meets the target, the computing device determines that the training phase is complete, and then performs step S220. If the training phase is not complete, the computing device performs step S206 again, for example, using the same or a different hyperparameter combination for training.

[0027] Step S220: The computing device determines the hyperparameter range to search for each data augmentation method. The hyperparameter range in step S220 may be the same as or different from (e.g., the same or smaller than) the hyperparameter range in step S204. For example, the upper limit value of the hyperparameter range in step S220 is smaller than the upper limit value of the hyperparameter range in step S204, and the lower limit value of the hyperparameter range in step S220 is larger than the lower limit value of the hyperparameter range in step S204. In one embodiment, during the training phase, the rotation angle defined in step S204 may be between 90 and 180 degrees. During the testing or inference phase, the rotation angle may be between 90 and 180 degrees. However, in another embodiment, the rotation angle may be set to 240 degrees in step S220, and the computing device can still perform calculations.

[0028] Step S222: The computing device selects a hyperparameter combination (e.g., σ1 in FIG. 4). In one embodiment, selecting a particular hyperparameter combination means determining a particular data augmentation method. For example, a rotation angle of 0° means no image rotation. In one embodiment, the data augmentation method to be used in the training phase may be selected in step S222, and a different hyperparameter combination from that used in the training phase is selected in step S222. For example, image scaling is not used in the training phase, and is not used in the testing phase or the inference phase.

[0029] Step S224: The computing device performs data augmentation according to the selected hyperparameter combination. For example, the computing device applies the selected hyperparameter combination σ1 (e.g., a rotation angle of 60° or an image brightness of 0.8) to one or more input data of the test dataset, so that each input data (e.g., 40IN in FIG. 4) is transformed into augmented data (e.g., x1 in FIG. 4).

[0030] Step S226: The computing device generates primary network parameters according to the selected hyperparameter combination. For example, the computing device inputs the selected hyperparameter combination σ1 into the hypernetwork. The hypernetwork generates primary network parameters according to the trained hypernetwork parameters (for example,

number

number

[0031] Step S228: The computing device calculates output data. For example, the computing device inputs the augmented data created by the conversion in step S224 into the first-order network. The first-order network uses the first-order network parameters to calculate corresponding output data (e.g., x1 in FIG. 4) for each augmented data (e.g., x2 in FIG. 3).

number

[0032] Step S230: The computing device determines whether further calculation is required for other hyperparameter combinations. For example, the computing device determines whether all hyperparameters within the hyperparameter range of step S220 have been calculated once (e.g., FIG. 5). Alternatively, the computing device directly executes step S222 to select the hyperparameter combination to be calculated (e.g., FIG. 6). The computing device selects the hyperparameter combination that requires calculation (e.g., σ2 to σ3 in FIG. 8). n If it is determined that the number of the .DELTA..times ...

[0033] Step S232: The computing device selects the best hyperparameter combination. For example, based on the model metrics corresponding to the hyperparameter combination, the computing device selects the best hyperparameter combination from all the calculated hyperparameter combinations (for example, σ1 to σ2 in FIG. 8). n ) and select the best hyperparameter combination (e.g., σ2 in Figure 8).

[0034] Step S234: The computing device performs data augmentation according to the best hyperparameter combination. For example, the computing device performs data augmentation according to the best hyperparameter combination (e.g., σ in FIG. 1). ∨ ) is applied to the input data of the inference dataset (e.g., 10IN in Figure 1) to convert the input data into augmented data (e.g., 10UT in Figure 1).

[0035] Step S236: The computing device determines the primary network parameters based on the best hyperparameter combination. For example, the computing device determines the primary network parameters based on the best hyperparameter combination σ ∨ is input to the hypernetwork. The hypernetwork is then fed back to the trained hypernetwork parameters (e.g., w in Figure 4). ∨ ) and correspondingly, the hyperparameter combination σ ∨ Alternatively, the computing device may look up a table to determine the primary network parameters. The hyperparameter combinations may be expressed in vector form.

[0036] Step S238: The computing device calculates output data. For example, the computing device inputs the augmented data created by the conversion in step S234 into the primary network. The primary network uses the primary network parameters to output corresponding output data (e.g., 10PD in FIG. 1) for the augmented data.

[0037] One or more of steps S202 through S238 may be omitted or reordered as desired. For example, in one embodiment, to perform or implement the training phase, only at least one of S206 through S214 (e.g., step S208) may be performed. In one embodiment, an iteration of the training phase may include at least one of steps S206 through S214 (e.g., step S208 or S214). In one embodiment, an epoch of the training phase may include at least one of steps S206 through S214. In one embodiment, step S216 may be omitted for a complete batch. In one embodiment, the order of steps S208 and S210 may be reversed or parallelized. In one embodiment, to perform or implement the testing phase, only at least one of steps S222 through S232 (e.g., step S224) may be performed. In one embodiment, the order of steps S224 and S226 may be reversed or parallelized. In one embodiment, step S220 may be omitted. In one embodiment, to execute or perform the inference phase, only at least one of steps S234 to S238 (e.g., step S234) may be executed. In one embodiment, the order of steps S234 and S236 may be reversed or may be performed in parallel.

[0038] 3 is a schematic diagram of a computing device 30 according to one embodiment of the present invention, including a computing device 10, input data 10IN, augmented data 10UT, output data 10PD, and a hyperparameter combination σ ∨ may be implemented by using the computing device 30, the input data 30IN, the augmented data x, the output data ŷ, and the hyperparameter combination σ, or vice versa. The computing device 30 may include a primary network 30P and a hypernetwork 30H. The primary network parameters of the primary network 30P are

number

number

number

[0039] The primary network 30P includes multiple layers, each of which includes multiple neurons. The output of any given layer is, for example, a function of its input and at least one primary network parameter (e.g., θ̂ l1 ) is a linear combination or function of the model architecture. In step S212, after the augmented data x is input to the primary network 30P, the primary network 30P generates output data y^ according to the primary network parameters θ^.

number

number

[0040] The hypernetwork 30H includes multiple layers, each layer including multiple neurons. The output of any given layer is determined by its input and at least one hypernetwork parameter (e.g., the weights ω of a particular layer). h,li or the bias ω of a particular layer b,li) is a linear combination or function of the output, its input and hypernetwork parameters.

number

[0041] From step S214, the hypernetwork parameter ω of the hypernetwork 30H can be trained. The training phase is performed by training the loss function

number

number

[0042] For example, the computing device 30 may set the partial derivative of the loss function L(ŷ, y) with respect to the hypernetwork parameter ω to 0 (e.g.,

number

[0043] Alternatively, the computing device 30 may determine the optimal hypernetwork parameters w ∨ Iteratively find the optimal hypernetwork parameters w ∨ The hypernetwork parameter ω h,li For example, in a certain iteration, the hypernetwork parameters ω are updated to reduce the loss function L(y^,y). ∨ h,li is the original hypernetwork parameter ω h,li minus

number

number

number

[0044] From step S210, the first-order network parameter θ̂ of the first-order network 30P is untrainable. In step S210, after the hyperparameter combination σ is input to the hypernetwork 30H, the hypernetwork 30H outputs the first-order network parameter θ̂ according to the hypernetwork parameter ω. In one embodiment, the hyperparameter combinations in any two iterations may be different or the same. In other words, a hyperparameter combination (referred to as the fifth hyperparameter combination) may be sampled in one iteration of step S206, and another hyperparameter combination (referred to as the sixth hyperparameter combination) may be sampled in another iteration of step S206. However, even if the same hyperparameter combination σ is sampled in two iterations (e.g., the fifth hyperparameter combination is the same as the sixth hyperparameter combination), the first-order network parameters in the two iterations are different. Specifically, in step S210 of a certain iteration, the hypernetwork 30H outputs multiple first-order network parameters (referred to as the fifth first-order network parameters, respectively). After the hypernetwork parameter ω is updated in this iteration, in step S210 of the next iteration, the hypernetwork 30H outputs multiple first-order network parameters (referred to as sixth first-order network parameters) that are different from the fifth first-order network parameter. In other words, after each iteration, the hypernetwork parameter ω changes, and the first-order network parameter θ̂ output from the hypernetwork 30H also changes.

[0045] In short, the hypernetwork parameter ω or the hypernetwork is trained in the training phase of the present application. However, the primary network parameter θ̂ cannot be trained (e.g., the primary network parameter θ̂ has not been trained or will not be trained). Instead, the primary network parameter θ̂ is passively provided to the primary network 30P by the hypernetwork 30H. In other words, after the training phase is completed, the hypernetwork parameter ω does not change with the hyperparameter combination σ, but the primary network parameter θ̂ changes with the hyperparameter combination σ or based on the calculation of the hypernetwork 30H.

[0046] 4 is a schematic diagram of a computing device 40 according to an embodiment of the present invention, including a computing device 10, input data 10IN, augmented data 10UT, output data 10PD, and a hyperparameter combination σ ∨ may be implemented using computing device 40, input data 40IN, augmented data x1, output data ŷ1, and hyperparameter combination σ1, or vice versa. Computing device 40 may include primary network 40P and hypernetwork 40H, which are structurally and functionally the same as or similar to primary network 30P and hypernetwork 30H, respectively. Primary network parameters

number

number

[0047] 3 and 4 may be used to illustrate the training and testing phases (or inference phases) of a computing device, respectively. For example, the hypernetwork parameter ω is ∨ Therefore, even if the hyperparameter combination σ is the same as the hyperparameter combination σ1, the first-order network parameter θ̂ is updated to the first-order network parameter θ̂ σ1 may differ from the above.

[0048] In one embodiment, before the testing phase, the hypernetwork parameter ω is determined to be the optimal hypernetwork parameter ω ∨ In step S226, the hypernetwork 40H is updated to a different hyperparameter combination (for example, σ1 or σ2 in FIG. 8). n ) and the first-order network parameters of the first-order network (e.g., θ^ in Fig. 8) σ1 or θ^ σn ) in step S228. In step S228, the primary network 40P uses the primary network parameters to calculate output data corresponding to the augmented data. In step S232, the computing device 40 calculates a model metric for each hyperparameter combination. After comparing all the obtained model metrics, the computing device 40 may select the best model metric. Corresponding to the best model metric, the computing device 40 may compare all the calculated hyperparameter combinations (σ1 to σ n ) to find the best hyperparameter combination (e.g., σ ∨ ) can be selected.

[0049] From another perspective, the hyperparameter combination (e.g., σ ∨) may be considered as input to the hypernetwork 40H. Therefore, the hyperparameters of the hyperparameter combinations are not updated or trained. Instead, the best hyperparameter combination is selected from the multiple computed hyperparameter combinations.

[0050] In one embodiment, before the inference phase, the hypernetwork parameter ω is calculated as the optimal hypernetwork parameter ω ∨ , and the computing device 40 has determined the best hyperparameter combination. Thus, the primary network parameters are determined. Therefore, step S236 or the hyperparameter network 40H may be omitted. Also, the primary network 40P in step S238 may directly use the known primary network parameters to infer output data corresponding to any augmented data in step S234.

[0051] The manner in which the computing device 40 selects the hyper-parameter combinations in step S222 may be adaptively adjusted. For example, Figures 5 and 6 are schematic diagrams of receiver operating characteristic curves (AUROC) for different hyper-parameter combinations according to embodiments of the present invention.

[0052] In one embodiment, a one-by-one search method may be used to find the best hyperparameter combination. For example, FIG. 5 shows the AUROC for each hyperparameter combination. In step S220, for image rotation, the computing device 40 may define a hyperparameter range to be 0 to 360 degrees, define hyperparameters within the hyperparameter range as integers between 0 and 360 degrees, and the common difference between hyperparameters may be 5 degrees. For image brightness, the computing device 40 may define a hyperparameter range to be 0 to 1, define hyperparameters within the hyperparameter range as floating-point numbers between 0 and 1, and the common difference between hyperparameters may be 0.1. In step S222, the computing device 40 may sequentially select one of 720 hyperparameter combinations (i.e., (360÷5)×(1÷0.1)=720) to perform step S224 or S226. After searching these 720 hyper-parameter combinations, in step S228, the computing device 40 may calculate the corresponding model metric (e.g., AUROC). As shown in FIG. 5, the AUROC for a rotation angle of 175° and an image intensity of 0.8 is closest to 1, so in step S232, the hyper-parameter combination of 175° and 0.8 is determined to be the best hyper-parameter combination (e.g., σ ∨ ) may be selected. Computing device 40 may use a rotation angle of 175° and an image brightness of 0.8 as hyperparameters for subsequent data augmentation (e.g., step S234) to improve estimation accuracy.

[0053] In one embodiment, to reduce the number of hyperparameter combinations searched, an optimization algorithm (e.g., Bayesian optimization or a tree-structured Tarzen estimator algorithm) may be used to find the best hyperparameter combination. For example, in step S222, the computing device 40 may randomly select several hyperparameter combinations (each referred to as a first hyperparameter combination) and calculate their corresponding model metrics in step S228. Thus, the computing device 40 may select, from the first hyperparameter combinations, the hyperparameter combinations (e.g., σ2, σ3 in FIG. 8) that correspond to better model metrics. n ) can be found. Then, returning to step S222, the computing device 40 finds a better hyperparameter combination (e.g., σ2, σ n ) are close to (or far from) the hyperparameter combinations (e.g., σ3, σ n-1 ) (respectively referred to as the second hyperparameter combination). Thus, the computing device 40 can calculate model metrics corresponding to the second hyperparameter combinations in step S228, and find a hyperparameter combination (e.g., σ3) that corresponds to a better model metric from the second hyperparameter combinations. The computing device 40 can then iteratively return to step S222, select a hyperparameter combination (e.g., σ4 in FIG. 8) that is close to the hyperparameter combination (e.g., σ3) selected in the previous iteration, and calculate the corresponding model metric. In this way, after searching a certain number of hyperparameter combinations, the computing device 40 can select the best hyperparameter combination (e.g., σ4 in FIG. 1). ∨ ) is the hyperparameter combination (e.g., σ2 to σ4, σ n-1 ~σ n ) can be found from

[0054] For example, FIG. 6(a) shows the AUROC corresponding to 200 hyperparameter combinations. The computing device 40 may set the maximum number of hyperparameter combinations to search to 200 and stop the search after a certain time. Similarly, FIG. 6(b) shows the AUROC corresponding to 100 hyperparameter combinations. FIG. 6(a) or (b) shows that the AUROC for a rotation angle of 175° and an image intensity of 0.8 is closest to 1. Therefore, in step S232, the hyperparameter combination of 175° and 0.8 is determined to be the best hyperparameter combination (e.g., σ ∨ ) However, compared to Fig. 5 and Fig. 6(a), Fig. 6(b) uses only 100 hyperparameter combinations, which saves computation time or resources.

[0055] In one embodiment, the computing device selects the best hyper-parameter combination based on the type of input data (e.g., input images). For example, if the input images for the inference phase are for screws, the input images for the training phase are also for screws, and the best hyper-parameter combination is also selected for screws. For example, if the input images for the inference phase are for defects in buried wires, the best hyper-parameter combination is also selected for defects in buried wires. In one embodiment, the best hyper-parameter combination selected may be related to the type of input data (e.g., input images), but is independent of the size or proportion of the input data.

[0056] Table 1 lists the differences between existing neural network architectures and the hyperlinear network architecture proposed by the present invention. Figure 7 is a schematic diagram of the computing architecture of the existing neural network architecture. Figure 8 is a schematic diagram of the computing architecture of the hyperlinear network architecture according to an embodiment of the present invention. [Table 1]

[0057] In existing neural network architectures, multiple deep learning models 70M1 to 70Mn are implemented using different hyperparameter combinations σ1 to σ n Each model must be trained individually. Furthermore, existing neural network architectures employ grid search. Because there are a large number of diverse data augmentation methods and corresponding hyperparameter combinations, adding a new data augmentation method can exponentially double the number of deep learning models (70M1 to 70Mn) that need to be trained. Therefore, existing neural network architectures or existing hyperparameter search methods are not ideal.

[0058] In the hyperprimary network architecture of the present invention, the hyperprimary network includes a primary network (e.g., 30P or 40P) and a hypernetwork (e.g., 30H or 40H). Regardless of the number of data augmentation methods or the number of hyperparameter combinations, only one deep learning model 80M (e.g., a hypernetwork) needs to be trained. After the training of the deep learning model 80M is completed, different hyperparameter combinations σ1 to σ n can be input to the trained deep learning model 80M. The hypernetwork can also be trained by using different hyperparameter combinations σ1 to σ n The optimal first-order network parameters θ^ corresponding to σ1 ~θ^ σn , and different first-order networks can be constructed in the test phase. Therefore, different hyperparameter combinations σ1 to σ n When dynamically adjusting to , the present invention provides the primary network parameters θ̂ provided to the primary network. σ1 ~θ^ σn is optimal, improving the model performance of the primary network. In other words, after training of the 80M deep learning model, different hyperparameter combinations σ1 to σ ncan be quickly searched for, and the present invention also ensures that the corresponding first-order network has optimal model performance.

[0059] In one embodiment, according to Table 1 or FIG. 8, the hyperparameter combination used in the testing phase (e.g., step S222) or the inference phase (e.g., step S234 or S236) may or may not have been sampled in the training phase (step S206). In other words, the hyperparameter combination used in the testing phase (respectively referred to as the fourth hyperparameter combination) may be different from the hyperparameter combination used to train the hypernetwork (respectively referred to as the third hyperparameter combination). However, the present invention does not require retraining for the fourth hyperparameter combination. Instead, the present invention generates primary network parameters for the primary network corresponding to the fourth hyperparameter combination, enabling direct inference on input data.

[0060] In one embodiment, according to Table 1 or FIG. 8, the continuity of the hyperparameter combinations used in the test phase (e.g., step S222) or the inference phase (e.g., step S234 or S236) may be higher than the continuity of the hyperparameter combinations sampled in the training phase (step S206). In other words, the difference between the hyperparameters of any two fourth hyperparameter combinations (e.g., the difference between 174.99° and 175°) may be smaller than the difference between the hyperparameters of any two third hyperparameter combinations (e.g., the difference between 170° and 175°). In other words, the search space of hyperparameters in the test phase of existing neural network architectures is discrete. In contrast, the search space of hyperparameters in the test phase of the present invention may be continuous.

[0061] Therefore, the present invention can quickly and automatically generate various augmented data (e.g., automatic optical detection images), shorten the training time of the deep learning model 80M, and further shorten the time required to use an optimization algorithm to search for the best data augmentation method or the best hyperparameter combination. Furthermore, the model performance of the present invention is better than that of existing neural network architectures.

[0062] The present invention incorporates a hypernetwork, which is used to provide optimal primary network parameters to the primary network. Therefore, the primary network of the present invention can be applied to different model architectures or different image tasks. In another aspect, when using different types of data, the primary network can be modified and replaced with a different primary network for the corresponding data type. For example, the primary network may use, but is not limited to, an image classification model (e.g., a residual neural network (ResNet), a densely connected convolutional network (DesNet), MobileNet, EfficientNet, etc.), an image segmentation model (e.g., a Unet, a pyramid scene parsing network (PSPNet), a feature pyramid network (FPN), LinkNet, etc.), or an object detection model (e.g., a You Only Look Once (YOLO) algorithm, a single shot detector (SSD), a region-based convolutional neural network (R-CNN), Mask R-CNN, etc.).

[0063] In one embodiment, the primary network may be a CNN-based deep learning network. The primary network and the hyper-network may be combined into a deep learning network architecture of a hyper-primary network. For example, Figure 9 is a schematic diagram of a computing device 90 according to an embodiment of the present invention. The computing device 10 includes input data 10IN, augmented data 10UT, output data 10PD, and a hyper-parameter combination σ. ∨ may be implemented by using a computing device 90, input data 90IN, augmented data x9, output data y^9, and hyperparameter combination σ, respectively, or vice versa. The computing device 90 may include a primary network 90P and a hypernetwork 90H. The primary network 30P (or 40P) and the hypernetwork 30H (or 40H) may be implemented using the primary network 90P and the hypernetwork 90H, respectively, or vice versa.

[0064] The primary network 90P includes multiple layers (e.g., 90C1, 90C2, 90N1, 90N2, 90R1, 90R2, 90P1). Layers 90C1 and 90C2 may be convolutional layers. Layers 90N1 and 90N2 may be batch normalization layers. Layers 90R1 and 90R2 may be rectified linear unit (ReLU) layers. Layer 90P1 may be a dense ReLU layer. The present invention is not limited in this respect.

[0065] The hypernetwork 90H includes multiple layers (e.g., 90H1, 90H2, 90D1 to 90Dj). The layers 90H1 and 90H2 may be dense ReLU layers, and the layers 90D1 to 90Dj may be dense layers. Alternatively, the layer 90H1 or 90H2 may be

number

[0066] In one embodiment, the hypernetwork parameters (e.g., ω h,l1 ~ω b,li or ω ∨ h,l1 ~ω ∨ b,li ) or first-order network parameters (e.g., θ^ l1 ~θ^ lj or θ^ σ1,l1 ~θ^ σ1,lj ) may be a scalar, vector, or matrix. For example, the last layer of the hypernetwork 90H is used to output the first-order network parameters θ̂ to the primary network 90P. Therefore, the number of values ​​output by the hypernetwork 90H depends on the number of first-order network parameters θ̂ required by the primary network 90P. For example, the layer 90C1 may be a 3 × 3 convolutional layer, and the first-order network parameters θ̂ of the layer 90C1 l1 teeth,

number

number

[0067] In one embodiment, the input data (e.g., 11IN) or augmented data (e.g., 11UT) of the present invention may be various data types. In one embodiment, the input data or augmented data of the present invention is image data. For example, FIG. 10 is a schematic diagram of input data 11IN and augmented data 11UT1 and 11UT2 according to an embodiment of the present invention. The augmented data 11UT1 is implemented using input data 11IN rotated by 45 degrees. The augmented data 11UT2 is implemented using input data 11IN rotated by 45 degrees with the image brightness adjusted to 0.5. However, the present invention is not limited thereto. The input data or augmented data may be numerical data (e.g., moving average, time adjustment, bootstrap, etc.), text data (e.g., word replacement, word insertion, word deletion, etc.), audio or video data (e.g., video speed adjustment, segment shift, pitch adjustment, etc.), or signal data (e.g., signal mixing, signal amplification / reduction, sampling frequency, etc.).

[0068] Since training a deep learning model requires a data augmentation method to reduce overfitting, the computational method of the present invention can be employed in any technical field. In one embodiment, the present invention belongs to computer vision technology and can be applied to various fields (e.g., medical image processing, general everyday image processing, advanced driver-assistance systems (ADAS), automatic inspection, etc.). However, the present invention is not limited thereto and can be applied to other fields as well.

[0069] In one embodiment, the model metric may be, but is not limited to, AUROC or accuracy. In one embodiment, the optimization method may be, but is not limited to, backpropagation or Adam Optimizer. In one embodiment, the loss function may be calculated using, but is not limited to, binary cross-entropy. In one embodiment, the test dataset may include one or more training data of the training dataset, or the intersection of the test dataset and the training dataset is the empty set. In one embodiment, i, j, k, m, or n is a positive integer. In one embodiment, a specific data augmentation method may not be used. For example, if image rotation is not used, the rotation angle is set to 0°. If image brightness adjustment is not used, the image brightness is set to 1. If image mirroring is not used, the image mirroring is set to an identity matrix. Details or modifications of the data augmentation method are disclosed in Taiwan Patent Application No. 113116850, the disclosure of which is incorporated herein by reference in its entirety and made a part of this specification. The technical features described in the above embodiments may be mixed or combined in various ways as long as they are not mutually inconsistent.

[0070] In summary, the present invention can quickly and efficiently verify or test model performance under different data augmentation methods and different hyperparameter combinations by training only a single deep learning model. Furthermore, the present invention introduces an optimization algorithm to further shorten the time required to search for the best data augmentation method and the best hyperparameter combination. Furthermore, the present invention builds an automated machine learning (AutoML) system, allowing users with no knowledge in the field of machine learning to apply different data augmentation methods and automatically generate a variety of augmented images in batches.

[0071] Those skilled in the art will readily appreciate that numerous modifications and variations of the devices and methods may be made while retaining the teachings of the present invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.

Claims

1. 1. A computational method for a computing device, comprising: transforming input data into augmented data according to the hyperparameter combination; inputting the augmented data into a primary network; Including, the hypernetwork is configured to use a plurality of hypernetwork parameters to output a plurality of first-order network parameters of the first-order network according to the hyperparameter combinations; the primary network is configured to output output data in accordance with the augmented data using the primary network parameters; the hypernetwork parameters have been trained or are in the process of being trained; the plurality of first-order network parameters are untrained; Calculation method.

2. In a training phase, at least one hyperparameter of the hyperparameter combination is randomly sampled from a plurality of hyperparameters to transform the labeled input data into the augmented data according to the hyperparameter combination. The calculation method of claim 1 .

3. a test phase following the training phase, in which the labeled input data is transformed into a plurality of augmented data according to a plurality of hyperparameter combinations, and a best hyperparameter combination is selected from the plurality of hyperparameter combinations based on a plurality of model metrics corresponding to the plurality of hyperparameter combinations; The calculation method of claim 1 .

4. an inference phase following the training phase or the testing phase, wherein in the inference phase, the unlabeled input data is converted into the augmented data based on a selected best hyperparameter combination, and the plurality of primary network parameters are generated by the hypernetwork based on the selected best hyperparameter combination and in accordance with the plurality of trained hypernetwork parameters; The calculation method of claim 1 .

5. In a computing device, A processing circuit configured to implement a primary network and a hypernetwork, the processing circuit configured to execute instructions, the instructions comprising: Transforming the input data into augmented data according to the hyperparameter combination; inputting the augmented data into a primary network; Including, the hypernetwork is configured to use a plurality of hypernetwork parameters to output a plurality of first-order network parameters of the first-order network according to the hyperparameter combinations; the primary network is configured to output output data in accordance with the augmented data using the primary network parameters; the hypernetwork parameters have been trained or are in the process of being trained; the plurality of first-order network parameters are untrained; the processing circuitry; a memory circuit coupled to the processing circuit and configured to store the instructions; A computing device comprising: