Steel Plate Defect Quantity Prediction Method Based on Gaussian-Poisson Mixed Variational Autoencoder
The construction of the steel plate defect quantity prediction model is carried out through the Gaussian-Poisson hybrid variational autoencoder, which solves the problem of difficulty in fitting count data in the prior art, and realizes online accurate prediction of the number of steel plate defects and discrete probability estimation, which improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202310204701.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2043-03-06
AI Technical Summary
The prior art is difficult to effectively use steel plate production process data to predict the number of defects online, especially the non-negative and discrete characteristics of the counting data cannot be accurately fitted, resulting in inefficient defect detection.
Using a Gaussian-Poisson hybrid variational autoencoder method, a mapping relationship under multiple operating conditions is constructed through a parallel Gaussian-Poisson variational autoencoder and weight network, and a loss function is constructed using the likelihood function to realize nonlinear fitting and online prediction of the number of steel plate defects.
Accurate online prediction of the number of defects in steel plates is achieved, detection efficiency is improved, detection time is reduced, discrete probability estimates of the number of defects are provided, and prediction accuracy is improved.
Smart Images

Figure CN116307145B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of steel plate manufacturing, and particularly relates to a method for predicting the number of steel plate defects based on a Gaussian-Poisson hybrid variational autoencoder. Background Art
[0002] During the production process of medium and heavy steel plates, the surface defects and internal defects of the steel plates are important indicators for evaluating product quality. As users' requirements for the surface quality of steel plates are getting higher and higher, the surface quality problem has become increasingly important. During the production process of medium and heavy steel plates, the surface defects of the steel plates are generally measured by manual visual inspection or machine vision deep learning. However, the manual visual inspection method is inefficient and inaccurate, and the machine vision detection technology is based on the images of the steel plate surface, and can only give an estimated value of the number of steel plate defects in the detection link after the steel plate is cooled, without making full use of the process data during the steel plate production process.
[0003] In order to make full use of the data during the steel plate production process, it is considered to use a data-driven soft sensor modeling method to predict the number of steel plate defects online. The soft sensor technology can realize the real-time tracking of product quality, and can also feedback the product quality situation and the operation status of the production line to the production manager faster, so that they can judge whether adjustment or maintenance is needed, thereby reducing the defect rate of products and lowering the production and management costs. In addition, the soft sensor model can also be used to explore the relationship between various operating conditions and defects, and identifying the cause variables that may lead to defects has important guiding significance for the production process.
[0004] The conventional soft sensor modeling methods can be mainly divided into methods based on multivariate statistical analysis, statistical learning, deep learning, and probability estimation. The soft sensor modeling methods based on multivariate statistical analysis, such as ordinary least squares, partial least squares, multiple linear regression, etc., are all based on the assumption that variables follow a Gaussian distribution and cannot provide non-negative and discrete support for count data. Since the number of steel plate defects is count data, soft sensor modeling methods based on statistical learning and deep learning, such as SVR and ANN, lack the interpretability of data and also cannot meet the non-negative and discrete constraints of count data. And the soft sensor modeling methods based on probability estimation, such as Gaussian process regression and Gaussian mixture regression, are often based on Gaussian distribution or Gaussian mixture distribution, and these distributions are also not suitable for fitting non-negative discrete count data. Therefore, it is necessary to use a count data model to perform regression prediction on the number of steel plate defects. As a typical discrete regression method, Poisson regression is widely used in the basic research of count data modeling, and other commonly used count data modeling methods, such as negative binomial regression and Poisson mixture regression, are all based on Poisson regression. Summary of the Invention
[0005] In order to make full use of the data of the steel plate production process and provide discrete probability support for the prediction of the number of counting type steel plate defects, the present invention proposes a steel plate defect number prediction method based on Gaussian-Poisson mixed variational autoencoder.
[0006] The specific technical solutions of the present invention are as follows:
[0007] A method for predicting the number of steel plate defects based on a Gaussian-Poisson hybrid variational autoencoder comprises the following steps:
[0008] Step 1: Collect production data and defect data from the steel plate rolling process as the training set for the model; preprocess the data for missing values, outliers, and standardization to obtain a processed training set.
[0009] Step 2: Build the network structure of Gaussian-Poisson hybrid variational autoencoder, which includes K parallel Gaussian-Poisson variational autoencoders with the same network structure and a weight network, as well as two fusion modules; the Gaussian-Poisson variational autoencoder contains a latent variable encoder, a Gaussian decoder and a Poisson decoder. The input of the latent variable encoder is the independent variable x, and the output is the mean and variance of the Gaussian distribution obeyed by the latent variable, which are denoted as μ respectively. zk , δ zk , where z is related to the latent variable, k is the number of the Gaussian-Poisson variational autoencoder, k = 1, 2, ..., K; the input of the Gaussian decoder is the latent variable obtained by resampling the output of the latent variable encoder, and the mean and variance of the output Gaussian distribution are denoted as μ respectively. xk , δ xk , where x is related to the input variable x of GPMVAE; the input of the Poisson decoder is the latent variable obtained by resampling the output of the latent variable encoder, and the mean of the output Poisson distribution is denoted as λ yk , where y represents the output variable y of GPMVAE;
[0010] The input of the weight network is the independent variable x, and the output is K probability values between 0 and 1, which are recorded as π={π1,π2,…,π K},satisfy
[0011] One of the fusion modules uses the probability value output by the weight network to the output λ of K Poisson decoders yk Fusion, that is in, is the predicted output value of GPMVAE; another fusion module uses the probability value output by the weight network to calculate the output mean μ of K Gaussian decoders xk Fusion, in, The generated value of GPMVAE;
[0012] Step 3: Use the processed training set to offline train the GPMVAE constructed in Step 2;
[0013] Step 4: Collect the samples to be measured. After preprocessing the missing values, outliers and standardizing them in the same way as the training data in Step 1, the processed samples to be measured x q are obtained, and then the GPMVAE trained in Step 3 is used for online prediction.
[0014] Furthermore, in Step 2, the Gaussian-Poisson mixture variational autoencoder uses a prior weight network and K prior latent variable encoders to optimize the prior values of the weights and latent variables respectively;
[0015] The input of the prior weight network is a K-dimensional random number, and the output is a K-dimensional probability value, expressed as: ω = {ω1, ω2, …, ω K} and
[0016] The input of the prior latent variable encoder is ω, and the output is the mean and variance obeying the Gaussian distribution, expressed as d z representing the dimension of the latent variable.
[0017] Furthermore, the specific process of offline training the GPMVAE using the processed training set in Step 3 is as follows:
[0018] (1) Determine the network structure hyperparameters of the Gaussian-Poisson mixture variational autoencoder, that is, the network composition of the Gaussian-Poisson variational autoencoder and the weight network, and the number of mixture components K. The training hyperparameters include the maximum number of iterations M, the learning rate l trn , and the batch size S batch ;
[0019] (2) Randomly initialize the network connection weights and biases, and generate a K-dimensional random number with a value of 0 to 1 Let the current iteration number be p;
[0020] (3) If p ≥ M, end the training, otherwise p = p + 1. Divide the N samples in the dataset into batches of size S batch , a total of T batches, and the initial batch t = 1;
[0021] (4) Perform batch training on the t-th batch, and the process is as follows:
[0022] (4.1) Send r0 into the prior weight network to obtain ω = {ω1, ω2, …, ω K}, and then send ω into K prior latent variable encoders to obtain μ respectivelyz0k , δ z0k , where k = 1, 2, …, K;
[0023] (4.2) Send each sample in this batch into the Gaussian-Poisson mixture variational autoencoder respectively, where d x is the dimension of the independent variable, i is the sample number, i = 1, 2, …, S batch , forward calculate the output variables of each part, and calculate the loss function of a single sample, specifically as follows:
[0024] (4.2.1) Send x i into the latent variable encoder of the K Gaussian-Poisson variational autoencoders, and calculate to obtain where k = 1, 2, …, K, d z is the dimension of the latent variable, which is also the output dimension of the latent variable encoder; send x i into the weight network to obtain π = {π1, π2, …, π K};
[0025] (4.2.2) Use μ zk , δ zk to resample to obtain where k = 1, 2, …, K, that is, z k = μ zk + δ zk · ε zk , where ε zk is sampled from the standard normal distribution;
[0026] (4.2.3) Send z k into the Gaussian decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain where k = 1, 2, …, K; send z k into the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain where k = 1, 2, …, K;
[0027] (4.2.4) Calculate the loss function loss i , y i of the sample x i :
[0028]
[0029] (4.3) Calculate the loss function of this batch of data sets: Calculate the gradient of the network parameters according to loss by backpropagation, and update the optimizer according to the learning rate, and then use the optimizer to optimize the network parameters;
[0030] (4.4) If t = T, go to step (3) to start a new round of iteration; otherwise, t = t + 1 and continue to execute step (4.1).
[0031] Furthermore, the specific process of using the trained GPMVAE for online prediction in step four is as follows:
[0032] (1) Send the processed sample x to be measured q into the latent variable encoder of K Gaussian-Poisson variational autoencoders, and obtain μ through forward calculation zk , δ zk (k = 1, 2,..., K), and send them into the weight network to get π = {π1, π2,..., π K};
[0033] (2) Resample μ zk , δ zk (k = 1, 2,..., K) to obtain z k ;
[0034] (3) Send z k into the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain λ yk , where k = 1, 2,..., K;
[0035] (4) Use to calculate the predicted value, and calculate to obtain . Enumerate possible m for calculation, and the possible values with probabilities between 5% and 95% can be obtained, that is, the interval estimation of the predicted value.
[0036] The beneficial effects of the present invention are as follows:
[0037] (1) The number of defects in the steel plate production process is a non-negative integer, such as 0, 1, 2, 3... The method for predicting the number of steel plate defects based on the Gaussian-Poisson mixture variational autoencoder proposed by the present invention assumes that the output follows a mixture Poisson distribution, thereby providing a discrete probability estimate for the prediction of the non-negative integer number of defects.
[0038] (2) The present invention uses multiple parallel Gaussian-Poisson variational autoencoders to fit the input-output mapping relationship under different working conditions, fuses the parallel outputs with the help of the weight network, and constructs a loss function with the likelihood function value of all data, thereby realizing the non-linear fitting of the Gaussian mixture distribution and the Poisson mixture distribution, and improving the prediction accuracy of the online prediction of the number of steel plate defects.
[0039] (3) The method proposed by the present invention can be applied to the online prediction of the number of steel plate defects. During the process of steel plate transmission, the number of steel plate defects can be predicted in advance, thereby reducing the time of the steel plate defect detection link. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the network structure of GPMVAE.
[0041] Figure 2 It is the predicted RMSE of GPMVAE with different numbers of mixture components on the training set.
[0042] Figure 3 It is the interval estimation result of GPMVAE for some samples in the test set. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The present invention will be described in detail below according to the drawings and preferred embodiments. The purpose and effect of the present invention will become more apparent. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] A method for predicting the number of steel plate defects based on a Gaussian-Poisson mixture variational autoencoder, the method comprising the following steps:
[0045] Step 1: Collect the production data and defect data during the steel plate rolling process as the training set of the model. Preprocess the data for missing values, outliers, and standardization to obtain a processed training set;
[0046] Step 2: Build the network structure of a Gaussian-Poisson mixture variational autoencoder (hereinafter referred to as GPMVAE for short, the full name is Gaussian Poisson Mixture Variational Autoencoder), as Figure 1 shown. The network structure includes K parallel Gaussian-Poisson variational autoencoders with the same network structure, a weight network, and two fusion modules; the Gaussian-Poisson variational autoencoder contains a latent variable encoder, a Gaussian decoder, and a Poisson decoder. The input of the latent variable encoder is the independent variable x, and the output is the mean and variance of the Gaussian distribution followed by the latent variable, denoted as μ zk , δ zk , where z represents the latent variable, k represents the number of the Gaussian-Poisson variational autoencoder, and k = 1, 2,..., K; the input of the Gaussian decoder is the latent variable resampled from the output of the latent variable encoder, and the output is the mean and variance of the Gaussian distribution, denoted as μ xk , δ xk, where \(x\) is related to the input variable \(x\) of the Gaussian-Poisson mixture variational autoencoder; the input of the Poisson decoder is the latent variable resampled from the output of the latent variable encoder, and the output is the mean of the Poisson distribution, denoted as \(\lambda\). yk , where \(y\) is related to the output variable \(y\) of the Gaussian-Poisson mixture variational autoencoder;
[0047] The input of the weight network is the independent variable \(x\), and the output is \(K\) probability values between \(0\) and \(1\), denoted as \(\pi=\{\pi_1,\pi_2,\cdots,\pi\}\), satisfying K} and
[0048] One of the fusion modules uses the probability values output by the weight network to fuse the outputs \(\lambda\) of \(K\) Poisson decoders, that is yk where is the predicted output value of the Gaussian-Poisson mixture variational autoencoder; Another fusion module uses the probability values output by the weight network to fuse the output means \(\mu\) of \(K\) Gaussian decoders, where xk is the generated value of the Gaussian-Poisson mixture variational autoencoder. where is the generated value of the Gaussian-Poisson mixture variational autoencoder.
[0049] In addition, in order to optimize the prior values of the weights and latent variables, the Gaussian-Poisson mixture variational autoencoder of the present invention also uses a prior weight network and \(K\) prior latent variable encoders to optimize the prior values of the weights and latent variables respectively. The input of the prior weight network is a \(K\)-dimensional random number, and the output is a \(K\)-dimensional probability value, denoted as: \(\omega = \{\omega_1,\omega_2,\cdots,\omega\}\) and K The input of the prior latent variable encoder is \(\omega\), and the output is the mean and variance obeying the Gaussian distribution, denoted as where \(d\) represents the dimension of the latent variable. z represents the dimension of the latent variable.
[0050] Step 3: Offline train the GPMVAE constructed in Step 2 using the processed training set, specifically:
[0051] (1) Determine the network structure hyperparameters of the GPMVAE, that is, the network composition of the Gaussian-Poisson variational autoencoder and the weight network, and the number of mixture components \(K\). The training hyperparameters include the maximum number of iterations \(M\), the learning rate \(l\) trn , and the batch size \(S\) batch ;
[0052] (2) Randomly initialize the network connection weights and biases, and generate a \(K\)-dimensional random number with a value between \(0\) and \(1\) Let the current iteration number be \(p\);
[0053] (3) If p ≥ M, end the training; otherwise, p = p + 1. Divide the N samples in the dataset into batches of size S batch , with a total of T batches. Initialize the batch number t = 1;
[0054] (4) Conduct batch training on the t-th batch as follows:
[0055] (4.1) Feed r0 into the prior weight network to obtain ω = {ω1, ω2, …, ω K}, and then feed ω into K prior latent variable encoders to respectively obtain μ z0k and δ z0k , where k = 1, 2, …, K;
[0056] (4.2) Feed each sample in this batch into GPMVAE respectively, where d x is the dimension of the independent variable, and i is the sample number, i = 1, 2, …, S batch . Perform forward calculation to obtain the output variables of each part, and calculate the loss function of a single sample as follows:
[0057] (4.2.1) Feed x i into the latent variable encoders of K Gaussian-Poisson variational autoencoders to calculate and obtain where k = 1, 2, …, K, d z is the dimension of the latent variable and also the output dimension of the latent variable encoder; feed x i into the weight network to obtain π = {π1, π2, …, π K};
[0058] (4.2.2) Use μ zk and δ zk to resample to obtain where k = 1, 2, …, K, that is, z k = μ zk + δ zk · ε zk , where ε zk is sampled from the standard normal distribution;
[0059] (4.2.3) Feed z k into the Gaussian decoder of the corresponding k-th Gaussian-Poisson variational autoencoder to calculate and obtain where k = 1, 2, …, K; feed z k into the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder to calculate and obtain where k = 1, 2, …, K;
[0060] (4.2.4) Calculate the sample xi and y i loss function loss i :
[0061]
[0062] (4.3) Calculate the loss function of this batch of data sets: Backpropagate the gradient of the network parameters according to loss, update the optimizer according to the learning rate, and then use the optimizer to optimize the network parameters;
[0063] (4.4) If t = T, go to step (3) to start a new round of iteration, otherwise t = t + 1, and continue to execute step (4.1).
[0064] Step Four: Collect the samples to be measured. After preprocessing the missing values, outliers and standardization in the same way as the training data in step one, the processed samples to be measured x q are obtained. Then use the GPMVAE trained in step three for online prediction, specifically:
[0065] (1) Send the processed samples to be measured x q into the latent variable encoder of K Gaussian-Poisson variational autoencoders, and obtain μ[[ID=2i]] zk and δ zk through forward calculation; send the processed samples to be measured x q into the weight network to get π = {π1, π2,..., π K};
[0066] (2) Resample μ zk and δ zk to get z k ;
[0067] (3) Send z k into the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to get λ yk , where k = 1, 2,..., K;
[0068] (4) Use to calculate the predicted value, and calculate according to to get probability; Enumerate possible m for calculation, and obtain the possible values within the range of 5% to 95% of the probability, that is, the interval estimate of the predicted value.
[0069] The effectiveness of the present invention is verified by combining a specific example of soft measurement of the number of steel plate defects during the rolling process of medium and heavy steel plates. All data were collected during the steel plate rolling process in a certain steel plant. The collected complete data were divided into a training set and a test set. Among them, the number of samples in the training set is 6000, and the number of samples in the test set is 2000. The selected effective process variables are 153-dimensional, including element content, casting speed, continuous casting temperature, heating time, etc. during the steelmaking process. The response variable is the number of defects on the steel plate.
[0070] In this embodiment, the network structure of GPMVAE is as follows: The number of hidden layers of the latent variable encoder of the Gaussian-Poisson variational autoencoder and the Gaussian decoder is both 1, and the activation function is ReLU. The number of units in each layer of the latent variable encoder is 153:128:50, and the number of units in each layer of the Gaussian decoder is 50:128:153. The activation function is not used in the output layer; the number of units in each layer of the Poisson decoder is 50:1, and the activation function is the exponential function exp, so as to limit the output to non-negative numbers; the number of units in each layer of the weight network is 153:K, and the number of mixture components K is determined later. The output value of the weight network also needs to be normalized by the softmax activation function; the number of units in each layer of the prior weight network is K:K, and the activation functions are ReLU and softmax; the number of units in each layer of the prior latent variable encoder is K:50, and no activation function is used. The training hyperparameters are set as follows: the number of iterations is 2000, the batch size is 500, the initial learning rate is 2e-3, and the learning rate is halved every 300 iterations after 1000 iterations.
[0071] The soft measurement effect of the model is quantified by the RMSE of the prediction results of the test set. The calculation formula of RMSE is:
[0072]
[0073] where N t is the total number of samples to be measured, and y i are the predicted value and the true value of the response variable of the i-th sample to be measured, respectively. The smaller the RMSE, the more accurate the prediction result.
[0074] GPMVAE is trained separately under different numbers of mixture components K = 1, 2,..., 10. The predicted RMSE of each model on the training set is as shown in the appendix Figure 2 As shown. It can be seen from the figure that as the number of mixture components increases, the predicted RMSE of GPMVAE continuously decreases and reaches the minimum at K = 6. Therefore, the model with K = 6 is selected to predict the test set.
[0075] Table 1 RMSE of the test set of each method
[0076] PR NBR PLS SVR GPMVAE RMSE 2.947 2.944 3.242 3.138 2.083
[0077] Poisson regression (PR), negative binomial regression (NBR), partial least squares (PLS), and support vector regression (SVR) were used as comparative methods. Among them, the best discrete parameter of NBR and the best number of principal components of PLS were determined by the grid search method. The discrete parameter α of NBR was 1e-5, the number of principal components K of PLS was 46, SVR used an RBF Gaussian kernel function with a coefficient γ of 0.0065, and the regularization parameter C was 10. The predicted RMSE of each method on the test set is shown in Table 1. It can be seen from the table that the predicted RMSE of the method proposed in the present invention on the test set is significantly smaller than that of other methods, which indicates that the proposed method has the best fitting effect on the data. In addition, the interval estimation results of the number of steel plate defects for some samples in the test set by GPMVAE are as shown in the appendix Figure 3 As shown, it can be seen from the figure that the true predicted values are basically within the estimation interval of 5% - 95%. The above results verify that the method for predicting the number of steel plate defects based on the Gaussian-Poisson mixture variational autoencoder proposed in the present invention is feasible and effective.
[0078] Those of ordinary skill in the art can understand that the above are only preferred examples of the invention and are not used to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, for those skilled in the art, they can still modify the technical solutions described in the foregoing examples, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, etc. made within the spirit and principle of the invention shall be included within the protection scope of the invention.
Claims
1. A method for predicting the number of steel plate defects based on a Gaussian-Poisson mixture variational autoencoder, characterized in that The method includes the following steps: Step 1: Collect the production data and defect data during the steel plate rolling process as the training set of the model; perform preprocessing on the data for missing values, outliers, and standardization to obtain the processed training set; Step 2: Build the network structure of the Gaussian-Poisson mixture variational autoencoder. This network structure includes K identical Gaussian-Poisson variational autoencoders in parallel, a weight network, and two fusion modules. The Gaussian-Poisson variational autoencoder contains a latent variable encoder, a Gaussian decoder, and a Poisson decoder. The input of the latent variable encoder is the independent variable x, and the outputs are the mean and variance of the Gaussian distribution that the latent variable follows, denoted as μ zk , δ zk , where z is related to the latent variable, k represents the number of the Gaussian-Poisson variational autoencoder, and k = 1, 2, …, K. The input of the Gaussian decoder is the latent variable resampled from the output of the latent variable encoder, and the outputs are the mean and variance of the Gaussian distribution, denoted as μ xk , δ xk , where x is related to the input variable x of the Gaussian-Poisson mixture variational autoencoder. The input of the Poisson decoder is the latent variable resampled from the output of the latent variable encoder, and the output is the mean of the Poisson distribution, denoted as λ yk , where y is related to the output variable y of the Gaussian-Poisson mixture variational autoencoder. The input of the weight network is the independent variable x, and the output is K probability values between 0 and 1, denoted as π = {π1, π2, …, π K}, satisfying One of the fusion modules fuses the outputs λ of the K Poisson decoders using the probability values output by the weight network yk That is where is the predicted output value of the Gaussian-Poisson mixture variational autoencoder; Another fusion module fuses the output means μ of the K Gaussian decoders using the probability values output by the weight network xk fusing where is the generated value of the Gaussian-Poisson mixture variational autoencoder; Step 3: Use the processed training set to offline train the Gaussian-Poisson mixture variational autoencoder constructed in Step 2; Step 4: Collect the sample to be measured. After performing the same preprocessing for missing values, outliers, and standardization as the training data in Step 1, obtain the processed sample to be measured, x q , and then use the Gaussian-Poisson mixture variational autoencoder trained in Step 3 for online prediction.
2. The method for predicting the number of steel plate defects based on the Gaussian-Poisson hybrid variational autoencoder according to claim 1, wherein In Step 2, the Gaussian-Poisson mixture variational autoencoder uses a prior weight network and K prior latent variable encoders to optimize the prior values of the weights and latent variables respectively; The input of the prior weight network is a K-dimensional random number, and the output is a K-dimensional probability value, expressed as: ω = {ω1, ω2, …, ω K}, and The input of the prior latent variable encoder is ω, and the output is the mean and variance following a Gaussian distribution, denoted as d z representing the dimension of the latent variable.
3. The method for predicting the number of steel plate defects based on the Gaussian-Poisson mixed variational autoencoder according to claim 2, wherein The specific steps for offline training the Gaussian-Poisson mixture variational autoencoder in Step 3 are as follows: (1) Determine the network structure hyperparameters of the Gaussian-Poisson mixture variational autoencoder, that is, the network composition of the Gaussian-Poisson variational autoencoder and the weight network, and the number of mixture components K. The training hyperparameters include the maximum number of iterations M and the learning rate l trn , and the batch size S batch ; (2) Randomly initialize the network connection weights and biases, generating a K-dimensional random number with values ranging from 0 to 1. Let the current iteration number be p; (3) If p ≥ M, end the training; otherwise, p = p + 1. Divide the N samples in the dataset into batches of size S batch , with a total of T batches. The initial batch number t = 1; (4) Perform batch training on the t-th batch, and the process is as follows: (4.1) Feed r0 into the prior weight network to obtain ω = {ω1, ω2, …, ω K}, and then feed ω into K prior latent variable encoders to respectively obtain μ z0k , δ z0k , where k = 1, 2, …, K; (4.2) For each sample in this batch separately input it into the Gaussian-Poisson mixture variational autoencoder, where d x is the dimension of the independent variable, i is the sample number, i = 1, 2, …, S batch , perform forward calculation to obtain the output variables of each part, and calculate the loss function of a single sample, specifically as follows: (4.2.1) Send x i into the latent variable encoder of K Gaussian-Poisson variational autoencoders, and calculate to obtain where k = 1, 2, …, K, d z is the dimension of the latent variable and also the output dimension of the latent variable encoder; send x i into the weight network to obtain π = {π1, π2, …, π K}; (4.2.2) Use μ zk , δ zk to resample to obtain where k = 1, 2, …, K, that is, z k = μ zk + δ zk · ε zk , where ε zk is sampled from the standard normal distribution; (4.2.3) Send z k into the Gaussian decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain where k = 1, 2, …, K; Send z k into the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain where k = 1, 2, …, K; (4.2.4) Calculate the sample x i , y i 's loss function loss i : (4.3) Calculate the loss function of this batch of datasets: Backpropagate the gradients of the network parameters according to the loss, update the optimizer according to the learning rate, and then use the optimizer to optimize the network parameters; (4.4) If t = T, go to Step (3) to start a new round of iteration, otherwise t = t + 1, and continue to execute Step (4.1).
4. The method for predicting the number of steel plate defects based on the Gaussian-Poisson hybrid variational autoencoder according to claim 1, wherein, The specific steps for online prediction using the trained Gaussian-Poisson mixture variational autoencoder in Step 4 are as follows: (1) Feed the processed sample x to be measured q into the latent variable encoder of K Gaussian-Poisson variational autoencoders, and obtain μ through forward calculation zk , δ zk ; Feed the processed sample x to be measured q into the weight network to obtain π = {π1, π2, …, π K}; (2) Resample μ zk and δ zk to obtain z k ; (3) Send z k to the Poisson decoder of the corresponding k-th Gaussian-Poisson variational autoencoder, and calculate to obtain λ yk , where k = 1, 2, …, K; (4) Use to calculate the predicted value, and based on calculate to obtain the probability; enumerate possible m for calculation, and obtain the possible values where the probability is between 5% and 95%, that is, the interval estimate of the predicted value.
Citation Information
Patent Citations
Strip steel defect detection method based on deep learning
CN112614113A
Deterministic decoder variational autoencoder
WO2021176337A1