Unconditional image generation method and system based on deep predictive coding network

By introducing jump connection structure and exponential moving average technology into the predictive coding network, the generation quality and stability problems in the field of unconditional image generation are solved, and efficient image generation and numerical calculation are achieved.

CN120070610AActive Publication Date: 2025-05-30CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311619430.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-05-30
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

The existing predictive coding networks perform poorly in the field of unconditional image generation, making it difficult to generate clear and realistic color images, and there are problems of gradient explosion and gradient disappearance, making it difficult to adapt to deep networks.

Method used

Using an unconditional image generation method based on deep prediction encoding network, a network model with a jump connection structure is constructed, the random variable M is updated using exponential moving average and deviation correction techniques, and the network model parameters are adaptively updated until the model converges.

Benefits of technology

It achieves avoiding gradient disappearance, speeding up training speed, optimizing generation quality, improving the stability of numerical calculations, and performs well in unconditional image generation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070610A_ABST
    Figure CN120070610A_ABST
Patent Text Reader

Abstract

The invention provides an unconditional image generation method and system based on a deep predictive coding network, and the method comprises the steps: S1, optimizing a network structure, and achieving a predictive coding algorithm with a jump connection structure; s2, on the basis of an original predictive coding algorithm, constructing a training framework of common evolution of an input end and an output end; and S3, improving an original predictive coding algorithm, and introducing a non-convex energy function optimization algorithm into the predictive coding algorithm. Gradient disappearance can be avoided, the training speed is increased, and the generation quality is optimized. The problem of gradient reduction exists in the deep BP convolutional network, and the problem is firstly solved in ResNet with jump connection. The skip connection directly sends lower layer information close to input to a higher layer close to output, and helps gradient fast calculation to support parameter updating; according to the invention, an unconditional image generation task based on original predictive coding is realized, and the stability of numerical calculation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of brain-inspired computing, and particularly to an unconditional image generation method and system based on a deep predictive coding network. Background Art

[0002] Brain-inspired vision is a computer vision method that draws on the biological brain's visual system, aiming to achieve more efficient and robust image processing methods in computer vision. In recent years, computer vision technologies based on the neural mechanisms and visual cortex structures of the biological brain's vision have seen extensive development and research. Currently, these brain-inspired visual models, such as SNN, CORnet, BayesPCN, covariance-learning PCNs, Generative PCN, etc., have been successfully applied in image classification, denoising, reconstruction, and object recognition tasks, but there is no mature brain-inspired visual technology for generating clear and realistic color images in the field of unconditional image generation.

[0003] The predictive coding theory is a process theory that explains the behaviors of the brain such as perception, memory, and decision-making. From the perspective of this theory, our brain has an internal model of the surrounding environment, which can be regarded as a generative model. The brain continuously receives external sensory stimuli (data) and continuously adjusts and updates the state parameters of the internal model to generate the optimal decision for the outside world while maintaining the stability of the internal model. The present invention constructs a deep predictive coding network system based on the predictive coding method. This system receives prior data to form a high-dimensional memory vector of the prior data, and then samples the memory vector to generate an image.

[0004] Salvatori and Song proposed a generative predictive coding network model (GenerativePCN) in 2021 for the reconstruction of damaged images. This model is an L-layer predictive coding network. The first layer is the perception layer, corresponding to the sensory neurons in biology, for receiving image data; the internal layer is the memory layer, which encodes the image data of the image layer in the perception layer into a memory vector b. Each layer contains value nodes and weight matrices The value nodes, weight matrices, and memory vectors are all trainable parameters of the model.

[0005] (1) Training Generative PCN

[0006] First, train Generative PCN on the training data points The value nodes of the perception layer are fixed on the training points and are not updated. Update all internal value nodes through Equation (1) to minimize the energy E t , until convergence. Where is the prediction error of the $i$-th value node in the $l$-th layer at the $t$-th time step. $\gamma$ is the learning rate.

[0007]

[0008] Then, the energy $E$ that converges at the $T$-th time step T is used to update the weights and memory vectors through Equations (2) and (3).

[0009]

[0010]

[0011] (2) Use the trained Generative PCN to reconstruct the corrupted image

[0012] First, fix the corrupted image $s$ on the perception layer of the trained Generative PCN and calculate the energy $E$ t . Then run inference on $E$ t to minimize $E$ t until convergence, and obtain the reconstructed image at the $L$-th layer.

[0013] Since the existing Generative PCN stores the image through training as a memory vector fixed at the lowest point of the energy $E$, the reconstruction or generation of the corrupted image is achieved by matching the features of the uncorrupted part to the closest energy attraction domain and retrieving the memory vector at the lowest point of the energy for restoration. Therefore, it can only reconstruct and generate trained images, but for unconditional generation, it is impossible to match the similar energy attraction domain through the features of the partially uncorrupted part, and it is very difficult to perform unconditional image generation. Therefore, the Generative PC has poor generalization and is difficult to perform unconditional image generation tasks.

[0014] The existing technologies have the following defects:

[0015] 1. Traditional prediction coding methods adopt ordinary sequence structures, which are not easy to adapt to deep networks and are prone to problems such as gradient explosion and gradient disappearance.

[0016] 2. The original prediction coding algorithm only does some work in image restoration and image inpainting, but is still blank in the field of unconditional image generation. And although the original prediction coding can perform the task of image restoration, unstable phenomena often occur in numerical calculations.

[0017] 3. Traditional prediction coding methods use the stochastic gradient descent method to approximate the minimum of the energy. Such methods can well achieve the optimization goal for convex energy functions, but are powerless for non-convex energy functions and are easily trapped in local optimal solutions. Summary of the Invention

[0018] The present invention provides an unconditional image generation method and system based on a deep prediction coding network, which is used to solve the problem of unconditional image generation.

[0019] The present invention provides an unconditional image generation method based on a deep prediction coding network, including:

[0020] S1. Based on a general sequence network model, construct a network model with a skip connection structure;

[0021] S2. Set a random variable M that follows a Gaussian distribution, and update the random variable M: Initialize the gradient value g of M with the error of the initial node t , calculate the exponential moving average m of the gradient t and the exponential moving average v of the squared gradient t , perform bias correction on m t to obtain Perform bias correction on v t to obtain According to and adaptively update M to obtain the random variable M t , and use the set of M t as the training samples;

[0022] S3. Calculate the gradient of the loss function L with respect to the model parameters

[0023] of the l-th layer on the training samples. According to the gradient update m t and v t , perform bias correction on the updated m t and v t again to obtain the corresponding and Based on and update the network model parameters Repeat the above-mentioned step S3 until the network model converges or the number of iterations reaches the specified upper limit value, and record the corresponding exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this time;

[0024] Based on m and v, adaptively update to obtain the random variable M s , M s i.e., the generated image data.

[0025] Further, in S2, the method of initializing the gradient value g of M with the error of the initial node t is specifically as follows:

[0026] g t = -ε t

[0027] g t is the gradient of the random variable M, and ε t is the error at the current time step. The subscript t represents the time sequence number, and its value is a natural number;

[0028] Calculate the exponentially weighted average m t of the gradient and the exponentially weighted average v t of the squared gradient, and the specific method is as follows:

[0029] m t = β 1 m t-1 + (1 - β 1 )g t

[0030] β 1 is the exponential decay rate;

[0031] v t = β 2 v t-1 + (1 - β 2 )g t 2

[0032] β 2 The coefficient is the exponential decay rate;

[0033] The specific method for performing bias correction on m t to obtain and performing bias correction on v t to obtain is as follows:

[0034]

[0035]

[0036] According to and adaptive update M to obtain the random variable M t The specific method is as follows:

[0037]

[0038] α is the learning rate, and δ is the smoothing term.

[0039] Furthermore, in S3, calculate the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples. The specific method is as follows:

[0040]

[0041] where ∈ l is the error term at steady state during the learning phase, and vs l+1 is the state value of the (l + 1)-th layer at steady state during the learning phase; is a hyperparameter of the network model, and f l is the mapping function of the l-th layer in the neural network;

[0042] For the updated m t and v t perform bias correction again to obtain the corresponding and The specific method is as follows:

[0043]

[0044]

[0045] Based on and update the network model parameters The specific method is as follows:

[0046]

[0047] where ε is a constant, and its value is guaranteed to make the denominator non-zero.

[0048] Furthermore, adaptively update the random variable M based on m and v s , and the specific method is as follows:

[0049]

[0050] When finally |M s - M s-1 | < the initial threshold, M s is the generated image.

[0051] The present invention proposes an unconditional image generation system based on a deep prediction coding network, which includes:

[0052] A model construction module, which constructs a network model with a skip connection structure based on a general sequence network model;

[0053] A training module, which sets a random variable M that follows a Gaussian distribution and updates the random variable M: initialize the gradient value g of M with the error of the initial node t , calculate the exponential moving average m t of the gradient and the exponential moving average v t of the square of the gradient, and perform bias correction on m t to obtain For v t perform deviation correction to obtain According to and update M adaptively to obtain the random variable M t and use the set of M t as the training samples;

[0054] Iterative module, calculate the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples

[0055] According to the gradient update m t and v t and perform deviation correction on the updated m t and v t again to obtain the corresponding and Based on and update the network model parameters Continuously update the network model parameters until the network model converges or the number of iterations reaches the specified upper limit value, and record the exponential moving average m of the corresponding gradient and the exponential moving average v of the squared gradient at this time;

[0056] Generation module, adaptively update based on m and v to obtain the random variable M s , M s i.e., the generated image data.

[0057] Furthermore, the training module initializes the gradient value g of M with the error of the initial node t , and the specific method is:

[0058] g t = -ε t

[0059] g t is the gradient of the random variable M, ε t is the error at the current time instant, and the subscript t represents the time sequence number, and its value is a natural number;

[0060] Calculate the exponential moving average m of the gradient t and the exponential moving average v of the squared gradient t , and the specific method is:

[0061] m t = β 1 m t-1 + (1 - β 1 )g t

[0062] β 1 is the exponential decay rate;

[0063] v t = β 2 v t-1 +(1 - β 2 )g t 2

[0064] β 2 The coefficient is the exponential decay rate;

[0065] The specific method for performing bias correction on m t to obtain and for performing bias correction on v t to obtain is as follows:

[0066]

[0067]

[0068] According to and adaptively update M to obtain the random variable M t The specific way is:

[0069]

[0070] α is the learning rate and δ is the smoothing term.

[0071] Furthermore, the iterative module calculates the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples. The specific way is:

[0072]

[0073] where ∈ l is the error term at the steady state during the learning phase, vs l+1 is the state value of the (l + 1)-th layer at the steady state during the learning phase, is a hyperparameter of the network model, and f l is the mapping function of the l-th layer in the neural network;

[0074] Perform bias correction on the updated m t and v t again to obtain the corresponding and The specific way is:

[0075]

[0076]

[0077] Based on and update the network model parameters The specific method is as follows:

[0078]

[0079] where ε is a constant, and its value is guaranteed to make the denominator non - zero.

[0080] Furthermore, the generation module adaptively updates to obtain the random variable M based on m and v s , and the specific method is:

[0081]

[0082] When finally |M s - M s-1 | < the initial threshold, M s is the generated image.

[0083] The advantages of the present invention compared with the prior art are as follows:

[0084] 1. The present invention can avoid gradient vanishing, accelerate the training speed, and optimize the generation quality. The deep BP convolutional network has the problem of gradient reduction, which was first solved in ResNet with skip connections. The skip connection directly sends the lower - layer information close to the input to the higher - layer close to the output and helps the gradient calculation quickly to support parameter update;

[0085] 2. The present invention realizes the unconditional image generation task based on the original predictive coding and improves the stability of numerical calculation;

[0086] 3. The present invention realizes the application of the non - convex function optimization algorithm in the predictive coding algorithm, improves the optimization effect of the predictive coding algorithm, and lays a foundation for introducing new non - convex energy functions subsequently. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 is the structural diagram of a 10 - layer convolutional network according to an embodiment of the present invention;

[0088] Figure 2 is the jump - connection model diagram according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0089] The present invention proposes an unconditional image generation method and system based on a deep prediction coding network. The method includes: optimizing the network structure to implement a prediction coding algorithm with a skip connection structure; building a training framework for co-evolution of both ends (input end and output end) based on the original prediction coding algorithm; improving the original prediction coding algorithm by introducing a non-convex energy function optimization algorithm into the prediction coding algorithm.

[0090] The operation steps of the present invention are as follows:

[0091] Step S1, optimize the network structure to implement a prediction coding algorithm with a skip connection structure;

[0092] Step S2, build a training framework for co-evolution of both ends (input end and output end) based on the original prediction coding algorithm;

[0093] Step S3, improve the original prediction coding algorithm by introducing a non-convex energy function optimization algorithm into the prediction coding algorithm.

[0094] The specific steps are described below. For what is described in Step S1, "optimize the network structure to implement a prediction coding algorithm with a skip connection structure", the specific steps include:

[0095] Step S101, build a general sequence structure network, which is composed of multiple convolutional networks or fully connected networks, etc. In the model instance, a structure including a 10-layer convolutional network is established, and its model diagram is as Figure 1 shown.

[0096] Step S102, define an additional skip connection layer as l skip-layer , the corresponding model connection is f skip-layer , assume the skip connection output node is v t , the skip connection input node is v s , and the corresponding output node representation is obtained as:

[0097] v t = f t (v t-1 ; θ t ) + f skip-layer (v s ; θ skip-layer )

[0098] For the input node update formula, it is as follows:

[0099]

[0100] The parameter update formula of the skip connection layer l skip-layer is:

[0101]

[0102] The specific embodiments are as follows:

[0103] Taking v 0 as the jump connection input node and v 9 as the jump connection output node, the model diagram is Figure 2 .

[0104] Correspondingly, the update formula for the v 0 input node is:

[0105]

[0106] The obtained parameter update formula is:

[0107]

[0108] As described in step S2, "Based on the original predictive coding algorithm, build a training framework for co-evolution of both ends (input end and output end)". The specific steps include:

[0109] Step S201, set a random variable (denoted by M here) that follows a Gaussian distribution and initialize the value of the input node.

[0110] Example: Set a random variable M that follows a normal distribution, which can be a zero vector with a mean of 0 and a variance of 0, or Gaussian noise with a mean of 0 and a variance of 1, etc.

[0111] Step S202, in the update gradient module of predictive coding, update the gradient of variable M with the prediction error. After the forward process of predictive coding, an observation vector and a prediction vector will be generated, and the error between the observation vector and the prediction vector is used as the loss of this layer. The update of the state and gradient both rely on this loss.

[0112] Step S203, use the optimizer to automatically update the random variable M.

[0113] The specific embodiments are as follows:

[0114] Taking the Adam optimizer as an example, when updating the random variable M, first initialize the gradient value of M with the error value of the initial node, as shown in the formula:

[0115] g t =-ε t

[0116] g t is the gradient of the random variable M, and ε t is the error at the current time step. Then calculate the exponentially weighted moving average m t of the gradient, and m 0 is initialized to 0, as shown in the formula:

[0117] m t= β 1 m t-1 + (1 - β 1 )g t

[0118] β 1 is the exponential decay rate, which controls the weight distribution between momentum and the current gradient, usually taken as 0.9. Next, calculate the exponentially weighted moving average v t of the squared gradients, and v 0 is initialized to 0, as shown in the formula:

[0119] v t = β 2 v t-1 + (1 - β 2 )g t 2

[0120] β 2 The coefficient is the exponential decay rate, which controls the influence of the previous squared gradients, and the default value is 0.999. Next, correct the bias of the gradient mean m t to reduce the influence of the bias in the initial stage of training. Use to represent the new gradient mean, and use to represent the exponentially weighted moving average of the new squared gradients, as shown in the formula:

[0121]

[0122]

[0123] Finally, update adaptively according to and . δ is a smoothing term (usually taken as 10 -8 ), and α is the learning rate (usually taken as a small value, such as 0.001), as shown in the formula:

[0124]

[0125] As described in step S3, "Improve the original prediction coding algorithm by introducing the non-convex energy function optimization algorithm into the prediction coding algorithm". The specific steps include:

[0126] Step S301, in the learning stage of the prediction coding algorithm, this step also uses the optimizer in step S203 to automatically update the random variable M;

[0127] The specific implementation example is as follows:

[0128] Taking the Adam optimizer as an example, when updating the random variable M, first initialize the gradient value of M with the error value of the initial node, as shown in the formula:

[0129] gt = -ε t

[0130] g t is the gradient of the random variable M, and ε t is the error at the current time step. Then, calculate the exponentially weighted average m t of the gradient, where m 0 is initialized to 0, as shown in the equation:

[0131] m t = β 1 m t-1 + (1 - β 1 )g t

[0132] β 1 is the exponential decay rate, which controls the weight distribution between momentum and the current gradient, and is usually set to 0.9. Next, calculate the exponentially weighted average v t of the squared gradient, where v 0 is initialized to 0, as shown in the equation:

[0133] v t = β 2 v t-1 + (1 - β 2 )g t 2

[0134] β 2 is the exponential decay rate coefficient, which controls the influence of the previous squared gradient, and the default value is 0.999. Next, correct the bias of the gradient mean m t to reduce the impact of bias in the initial stage of training. Let represent the new gradient mean, and let represent the exponentially weighted average of the new squared gradient, as shown in the equation:

[0135]

[0136]

[0137] Finally, update M and adaptively, where δ is a smoothing term (usually set to 10 t ), and α is the learning rate (usually set to a small value, such as 0.001), as shown in the equation: -8 )

[0138]

[0139] Step S302, in the inference stage of the predictive coding algorithm, use the optimizer to update the model parameter θ.

[0140] The specific embodiments are as follows:

[0141] 1. Initialize parameters: Set the learning rate α (usually taking a relatively small value, such as 0.001) the same as above, initialize the momentum term m 0 to be a zero vector, initialize v 0 to be a zero vector, and set the time step t to 1 (for bias correction).

[0142] 2. Calculate the gradient: Calculate the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples

[0143]

[0144] where ∈ l is the error term at the steady state during the learning phase, vs l+1 is the state value of the (l + 1)-th layer at the steady state during the learning phase, is a model hyperparameter, and f 1 is the mapping function of the l-th layer in the neural network.

[0145] 3. Calculate the momentum term m t : Update the momentum term m t : where β 1 is a hyperparameter with a value range of [0, 1), usually set to 0.9.

[0146] 4. Calculate the RMSprop term v t : Update the RMSprop term v t : where β 2 is a hyperparameter with a value range of [0, 1), usually set to 0.999.

[0147] 5. Bias correction:

[0148] Since at the beginning, the values of the momentum term m and the RMSprop term v are both close to the zero vector, in order to reduce this bias, bias correction is performed:

[0149]

[0150]

[0151] 6. Update parameters: Update the model parameters according to the update rule of Adam where ε is a small constant, such as 1e - 8, used to prevent the denominator from being zero. ​

[0152] 7. Increase the time step t: t = t + 1

[0153] 8. Repeat steps 2 to 7 until convergence (e.g., ) or the number of training iterations reaches a predetermined value (e.g., 10,000 iterations).

[0154] The present invention also provides an unconditional image generation system based on a deep prediction coding network, including:

[0155] A model construction module that constructs a network model with a skip connection structure based on a general sequence network model;

[0156] A training module that sets a random variable M subject to a Gaussian distribution and updates the random variable M: initializes the gradient value g of M with the error of the initial node t , calculates the exponential moving average m of the gradient t and the exponential moving average v of the square of the gradient t , performs bias correction on m t to obtain performs bias correction on v t to obtain According to and adaptively updates M to obtain the random variable M t , and takes the set of M t as the training samples;

[0157] An iteration module that calculates the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples

[0158] According to the gradient updates m t and v t , performs bias correction on the updated m t and v t again to obtain the corresponding and Based on and updates the network model parameters Continuously updates the network model parameters until the network model converges or the number of iterations reaches the specified upper limit value, and records the corresponding exponential moving average m of the gradient and the exponential moving average v of the square of the gradient at this time;

[0159] A generation module that adaptively updates to obtain the random variable M based on m and v s , M s i.e., the generated image data.

[0160] The training module initializes the gradient value g of M with the error of the initial node t , specifically in the following way:

[0161] g t = -ε t

[0162] g t is the gradient of the random variable M, and ε t is the error at the current time step. The subscript t represents the time sequence number, and its value is a natural number;

[0163] Calculate the exponentially weighted moving average m of the gradient t and the exponentially weighted moving average v of the squared gradient t , specifically in the following way:

[0164] m t = β 1 m t-1 + (1 - β 1 )g t

[0165] β 1 is the exponential decay rate;

[0166] v t = β 2 v t-1 + (1 - β 2 )g t 2

[0167] β 2 The coefficient is the exponential decay rate;

[0168] The specific method for correcting the bias of m t to obtain and correcting the bias of v t to obtain is as follows:

[0169]

[0170]

[0171] According to and adaptively update M to obtain the random variable M t , specifically in the following way:

[0172]

[0173] α is the learning rate, and δ is the smoothing term.

[0174] Iterative module, calculating the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples of The specific method is as follows:

[0175]

[0176] where ∈ l is the error term at the steady state in the learning phase, vs l+1 is the state value of the (l + 1)-th layer at the steady state in the learning phase, is the hyperparameter of the network model, f l is the mapping function of the l-th layer in the neural network;

[0177] For the updated m t and v t perform bias correction again to obtain the corresponding and The specific method is as follows:

[0178]

[0179]

[0180] Based on and update the network model parameters The specific method is as follows:

[0181]

[0182] where ε is a constant, and its value is guaranteed to make the denominator non-zero.

[0183] Generation module, adaptively updating based on m and v to obtain the random variable M s , and the specific method is:

[0184]

[0185] When finally |M s - M s-1 | < the initial threshold, M s is the generated image.

[0186] The present invention can avoid the vanishing gradient, accelerate the training speed, and optimize the generation quality. There is a problem of gradient reduction in the deep BP convolutional network, which was first solved in ResNet with skip connections. The skip connection directly sends the information of the lower layer close to the input to the higher layer close to the output, and helps the gradient to be calculated quickly to support parameter update. The present invention realizes the unconditional image generation task based on the original predictive coding, and improves the stability of numerical calculation. The present invention realizes the application of the non-convex function optimization algorithm in the predictive coding algorithm, improves the optimization effect of the predictive coding algorithm, and lays a foundation for the subsequent introduction of new non-convex energy functions.

[0187] In the present invention, the use of the skip connection structure can make information flow more easily in the network, thus alleviating problems such as vanishing gradient and gradient explosion. In addition, the skip connection structure can also improve the expressiveness and generalization ability of the model, because it allows information to be transmitted across multiple layers in the network, so that more features and patterns can be captured, and the generation effect of the model can be improved.

[0188] In the present invention, the restriction that the input or output end needs to have a fixed state is cancelled, and a scheme is designed in which the input and output ends co-evolve with the training process, which can better learn the correspondence between the normal distribution and the input data. And a random variable M is introduced to update and learn the mean value of the input data, which can make the numerical calculation more stable.

[0189] In the present invention, the optimization algorithm in the predictive coding is improved, so that the predictive coding algorithm can also compare the global optimal solution as much as possible when optimizing the non-convex energy function, which not only improves the optimization effect of the existing algorithm, but also lays a foundation for the subsequent introduction of new non-convex optimization algorithms.

Claims

1. An unconditional image generation method based on a deep prediction coding network, Characterized in that, Comprising: S1. Based on a general sequence network model, construct a network model with a skip connection structure; S2. Set a random variable M that follows a Gaussian distribution and update the random variable M: Initialize the gradient value g of M with the error of the initial node t , calculate the exponential moving average m of the gradient t and the exponential moving average v of the squared gradient t . Perform bias correction on m t to obtain . Perform bias correction on v t to obtain According to and , adaptively update M to obtain the random variable M t , and use the set of M t as the training samples; S3. Calculate the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples of According to the gradient Update m t and v t For the updated m t and v t Perform bias correction again to obtain the corresponding and Based on and Update the network model parameters Repeat the above steps until the network model Converges or the number of iterations reaches the specified upper limit value, and record the corresponding exponentially weighted moving average m of the gradient and exponentially weighted moving average v of the squared gradient at this time; The random variable M is adaptively updated based on m and v s , M s That is, the generated image data 2. The method according to claim 1, Characterized in that, In S2, initialize the gradient value g of M with the error of the initial node t , and the specific method is as follows: g t = -ε t g t is the gradient of the random variable M, and ε t is the error at the current time instant. The subscript t represents the time sequence number, and its value is a natural number; Compute the exponential moving average m of the gradients t and the exponential moving average v of the squared gradients t , in the following specific way: m t = β 1 m t-1 + (1 - β 1 )g t β 1 is the exponential decay rate; v t = β 2 v t-1 +(1 - β 2 )g t 2 β 2 The coefficient is the exponential decay rate; The deviation correction for m t to obtain and the deviation correction for v t to obtain are specifically as follows: According to and adaptively update M to obtain the random variable M t The specific method is as follows: α is the learning rate, and δ is the smoothing term.

3. The method according to claim 2, Characterized in that, In S3, calculate the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples The specific method is as follows: Specifically: where ∈ l is the error term at the steady state during the learning phase, vs l+1 is the state value of the (l + 1)-th layer at the steady state during the learning phase, is the hyperparameter of the network model, f l is the mapping function of the l-th layer in the neural network; For the updated m t and v t Perform deviation correction again to obtain the corresponding and The specific method is as follows: Based on and update the network model parameters The specific method is as follows: Where ε is a constant, and its value is guaranteed to make the denominator non-zero.

4. The method according to claim 3, Characterized in that, The random variable M is adaptively updated based on m and v s , and the specific method is as follows: When the last|M s -M s-1 | is less than the initial threshold, M s is the generated image.

5. An unconditional image generation system based on a deep prediction coding network, Characterized in that, Comprising: A model construction module, based on a general sequence network model, constructs a network model with a skip connection structure; Training module, set a random variable M that follows a Gaussian distribution, and update the random variable M: initialize the gradient value g of M with the error of the initial node t , calculate the exponential moving average m of the gradient t and the exponential moving average v of the squared gradient t , perform bias correction on m t to obtain , perform bias correction on v t to obtain According to and adaptively update M to obtain the random variable M t , and use the set of M t as training samples; Iterative module, calculating the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples of According to the gradient Update m t and v t For the updated m t and v t Perform bias correction again to obtain the corresponding and Based on and Update the network model parameters Continuously update the network model parameters Until the network model Converges or the number of iterations reaches the specified upper limit value, and record the corresponding exponentially weighted moving average m of the gradient and the exponentially weighted moving average v of the squared gradient at this time; A generation module that adaptively updates based on m and v to obtain a random variable M s , M s That is, the generated image data.

6. The system according to claim 5, Characterized in that, The training module initializes the gradient value g of M with the error of the initial node t , and the specific method is as follows: g t = -ε t g t is the gradient of the random variable M, and ε t is the error at the current time instant. The subscript t represents the time sequence number, and its value is a natural number; Compute the exponentially weighted average m of the gradients t and the exponentially weighted average v of the squared gradients t , in the following way: m t = β 1 m t-1 +(1 - β 1 )g t β 1 is the exponential decay rate; v t = β 2 v t-1 +(1 - β 2 )g t 2 β 2 The coefficient is the exponential decay rate; The deviation correction for m t to obtain and the deviation correction for v t to obtain are specifically as follows: According to and adaptively update M to obtain the random variable M t The specific method is as follows: α is the learning rate, and δ is the smoothing term.

7. The system according to claim 6, Characterized in that, Iterative module, calculating the gradient of the loss function L with respect to the model parameters of the l-th layer on the training samples of The specific method is as follows: where ∈ l is the error term at the steady state during the learning phase, vs l+1 is the state value of the (l + 1)-th layer at the steady state during the learning phase, is the hyperparameter of the network model, f l is the mapping function of the l-th layer in the neural network; For the updated m t and v t Perform deviation correction again to obtain the corresponding and The specific method is as follows: Based on and update the network model parameters The specific method is as follows: Where ε is a constant, and its value is guaranteed to make the denominator non-zero.

8. The system according to claim 7, Characterized in that, A generation module adaptively updates to obtain a random variable M based on m and v s , and the specific method is as follows: When the last|M s -M s-1 | is less than the initial threshold, M s is the generated image.

Citation Information

Patent Citations

  • An image generation method and device

    CN109903242A

  • Unsupervised monocular image depth map generation method with embedded SENet unit

    CN111354030A

  • Conditional generative adversarial network text generation image method based on distribution estimation

    CN114332565A

  • Adaptive optimization training method of convolutional neural network for image classification

    CN115205577A

  • Device for battery case of electric vehicle

    KR102281165B1