An Unconditional Image Generation Method and System Based on Deep Predictive Coding Networks

By constructing a deep predictive coding network, employing a skip connection and Gaussian distributed random variable M update method, and combining the Adam optimizer and non-convex energy function optimization algorithm, the gradient vanishing and local optimum problems in unconditional image generation are solved, achieving efficient and stable image generation.

CN120070610BActive Publication Date: 2025-11-14CHINA NANHU ACAD OF ELECTRONICS & INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing predictive coding methods have poor generalization in the field of unconditional image generation, are prone to gradient explosion and gradient vanishing problems, make it difficult to achieve unconditional image generation, and are prone to getting trapped in local optima when optimizing non-convex energy functions.

Method used

A deep predictive coding network with a skip connection structure is constructed, which is updated using a Gaussian distributed random variable M and adaptively updated using the Adam optimizer. A non-convex energy function optimization algorithm is introduced to optimize the network structure and training framework, so as to achieve co-evolution of input and output.

Benefits of technology

It avoids gradient vanishing, improves training speed and generation quality, achieves unconditional image generation, enhances the stability and optimization effect of numerical computation, and strengthens the model's generalization ability and feature capture ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070610B_ABST
    Figure CN120070610B_ABST
Patent Text Reader

Abstract

This invention proposes an unconditional image generation method and system based on deep predictive coding networks, comprising: step S1, optimizing the network structure to implement a predictive coding algorithm with skip connections; step S2, building a training framework for the co-evolution of the input and output ends based on the original predictive coding algorithm; and step S3, improving the original predictive coding algorithm by introducing a non-convex energy function optimization algorithm into the predictive coding algorithm. This invention avoids gradient vanishing, accelerates training speed, and optimizes generation quality. Deep backpropagation (BP) convolutional networks suffer from gradient reduction, a problem first addressed in ResNet with skip connections. Skip connections directly send information from lower layers closer to the input to higher layers closer to the output, facilitating rapid gradient calculation to support parameter updates. This invention achieves unconditional image generation based on the original predictive coding and improves the stability of numerical computation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neuromorphic computing technology, and in particular to an unconditional image generation method and system based on deep predictive coding networks. Background Technology

[0002] Brain-inspired vision is a computer vision approach that draws inspiration from 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 biological brain's visual neural mechanisms and the structure of the visual cortex have seen extensive development and research. Currently, these brain-inspired visual models, such as SNN, CORnet, BayesPCN, covariance-learning PCNs, and Generative PCN, have been successfully applied in image classification, denoising, reconstruction, and object recognition tasks. However, in the field of unconditional image generation, no mature brain-inspired vision technology has yet been developed to generate clear and realistic color images.

[0003] Predictive coding theory is a theory explaining the processes of perception, memory, and decision-making in the brain. According to this theory, our brain possesses an internal model of its environment, which can be viewed as a generative model. The brain continuously receives sensory stimuli (data) from the outside world and constantly adjusts and updates the state parameters of its internal model, maintaining its stability while generating optimal decisions for the external environment. This invention constructs a deep predictive coding network system based on predictive coding methods. This system receives prior data to form a high-dimensional memory vector about the prior data, and then samples the memory vector to generate an image.

[0004] In 2021, Salvatori and Song proposed a Generative Predictive Coding Network (GenerativePCN) model for the reconstruction of damaged images. This model is an L-layer predictive coding network. The first layer is a perceptual layer, corresponding to sensory neurons in biology, used to receive image data; the inner layers are memory layers, encoding the image data from the perceptual layer into a memory vector b. Each layer contains value nodes. and weight matrix Value nodes, weight matrices, and memory vectors are all trainable parameters of the model.

[0005] (1) Training Generative PCN

[0006] First, at the training data points In training a Generative PCN, the value nodes of the perceptual layer are fixed at the training points. Above, and without updating, minimize the energy E by updating all internal value nodes through equation (1). t until convergence. γ is the prediction error of the i-th value node in the l-th layer at time step t. γ is the learning rate.

[0007]

[0008] Then, the energy E converges at time step T. T At this point, the weights and memory vectors are updated using equations (2) and (3).

[0009]

[0010]

[0011] (2) Reconstruct damaged images using a trained Generative PCN

[0012] First, the damaged image s is fixed onto the receptive layer of the trained Generative PCN, and the energy E is calculated. t Then for E t Running inference to minimize E t The process continues until convergence, at which point the reconstructed image is obtained in layer L.

[0013] Because existing Generative PCNs store images as memory vectors fixed at the lowest point of energy E during training, damaged image reconstruction or generation involves matching undamaged features to the nearest energy attraction domain and retrieving the memory vector at the lowest energy point. Therefore, it can only reconstruct and generate images that have been trained. For unconditional generation, it cannot match nearby energy attraction domains using partially undamaged features, making unconditional image generation difficult. Thus, Generative PCNs have poor generalization capabilities and are unsuitable for unconditional image generation tasks.

[0014] The existing technology has the following drawbacks:

[0015] 1. Traditional predictive coding methods use ordinary sequence structures, which are not easily adapted to deep networks and are prone to problems such as gradient explosion and gradient vanishing.

[0016] 2. The original predictive coding algorithm has only made some progress in image reconstruction and image completion, but it remains a blank in the field of unconditional image generation. Furthermore, although the original predictive coding can perform image reconstruction tasks, it often exhibits instability during numerical computation.

[0017] 3. Traditional predictive coding methods use stochastic gradient descent to approximate the energy minimum. This type of method can achieve the optimization objective well for convex energy functions, but it is ineffective for non-convex energy functions and is prone to getting stuck in local optima. Summary of the Invention

[0018] This invention proposes an unconditional image generation method and system based on deep predictive coding networks to solve the problem of unconditional image generation.

[0019] This invention proposes an unconditional image generation method based on deep predictive coding networks, comprising:

[0020] S1. Construct a network model with a skip connection structure based on the ordinary sequence network model;

[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 The exponential moving average v of the gradient squared t , for m t Obtained by deviation correction For v t Obtained by deviation correction according to and Adaptively updating M yields the random variable M t and M t The set is used as the training sample;

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

[0023] According to the gradient Update m t and v t For the updated m t and v t Perform deviation correction again to obtain the corresponding and based on and Update network model parameters Repeat the steps described in S3 above until the network model is complete. When the number of convergences or iterations reaches a specified upper limit, record the exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this point.

[0024] Random variable M is obtained based on adaptive update of m and v. s M s That is, the generated image data.

[0025] Furthermore, in S2, the gradient value g of M is initialized with the error of the initial node. t The specific method is as follows:

[0026] g t =-ε t

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

[0028] Calculate the exponential moving average m of the gradient t The exponential moving average v of the gradient squared t The specific method is as follows:

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

[0030] β1 is the exponential decay rate;

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

[0032] The β2 coefficient represents the exponential decay rate.

[0033] The pair m t Obtained by deviation correction and against v t Obtained by deviation correction The specific method is as follows:

[0034]

[0035]

[0036] according to and Adaptively updating M yields 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, the loss function L is calculated on the training samples with respect to the parameters of the l-th layer model. gradient The specific method is as follows:

[0040]

[0041] Where ∈ lThe error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f is the hyperparameter of the network model. l Let l be the mapping function of the l-th layer in the neural network;

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

[0043]

[0044]

[0045] based on and Update network model parameters The specific method is as follows:

[0046]

[0047] Where ε is a constant whose value guarantees that the denominator is not zero.

[0048] Furthermore, the random variable M is obtained based on the adaptive update of m and v. s The specific method is as follows:

[0049]

[0050] When the last |M s -M s-1 When the initial threshold is reached, M s This refers to the generated image.

[0051] This invention proposes an unconditional image generation system based on a deep predictive coding network, comprising:

[0052] The model building module constructs a network model with a skip connection structure based on the ordinary sequence network model.

[0053] The training module sets up a random variable M that follows a Gaussian distribution and updates the random variable M by initializing the gradient value g of M with the error of the initial node. t Calculate the exponential moving average m of the gradient. t The exponential moving average v of the gradient squared t , for m t Obtained by deviation correction For v t Obtained by deviation correction according to and Adaptively updating M yields the random variable M t and M t The set is used as the training sample;

[0054] The iterative module calculates the loss function L with respect to the parameters of the l-th layer model on the training samples. gradient

[0055] According to the gradient Update m t and v t For the updated m t and v t Perform deviation correction again to obtain the corresponding and based on and Update network model parameters Continuously update network model parameters Until the network model When the number of convergences or iterations reaches a specified upper limit, record the exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this point.

[0056] The generation module adaptively updates the random variable M based on m and v. s M s That is, the generated image data.

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

[0058] g t =-ε t

[0059] g t It is the gradient of the random variable M, ε t It represents the error at the current time, with the subscript 't' indicating the time sequence number, and its value is a natural number.

[0060] Calculate the exponential moving average m of the gradient t The exponential moving average v of the gradient squared t The specific method is as follows:

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

[0062] β1 is the exponential decay rate;

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

[0064] The β2 coefficient represents the exponential decay rate.

[0065] The pair m t Obtained by deviation correction and against v t Obtained by deviation correction The specific method is as follows:

[0066]

[0067]

[0068] according to and Adaptively updating M yields the random variable M t The specific method is as follows:

[0069]

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

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

[0072]

[0073] Where ∈ l The error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f is the hyperparameter of the network model. l Let l be the mapping function of the l-th layer in the neural network;

[0074] For the updated m t and v t Perform deviation correction again to obtain the corresponding and The specific method is as follows:

[0075]

[0076]

[0077] based on and Update network model parameters The specific method is as follows:

[0078]

[0079] Where ε is a constant whose value guarantees that the denominator is not zero.

[0080] Furthermore, the generation module adaptively updates the random variable M based on m and v. s The specific method is as follows:

[0081]

[0082] When the last |M s -M s-1 When the initial threshold is reached, M s This refers to the generated image.

[0083] The advantages of this invention compared to the prior art are:

[0084] 1. This invention can avoid gradient vanishing, accelerate training speed, and optimize generation quality. Deep backpropagation (BP) convolutional networks suffer from gradient reduction, a problem first solved in ResNet with skip connections. Skip connections directly send information from lower layers closer to the input to higher layers closer to the output, and facilitate faster gradient calculation to support parameter updates;

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

[0086] 3. This invention realizes the application of non-convex function optimization algorithm in predictive coding algorithm, improves the optimization effect of predictive coding algorithm, and lays the foundation for the subsequent introduction of new non-convex energy functions. Attached Figure Description

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

[0088] Figure 2 This is a diagram of a skip connection model according to an embodiment of the present invention. Detailed Implementation

[0089] This invention proposes an unconditional image generation method and system based on deep predictive coding networks. The method includes: optimizing the network structure to implement a predictive 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 predictive coding algorithm; and improving the original predictive coding algorithm by introducing a non-convex energy function optimization algorithm into the predictive coding algorithm.

[0090] The operating steps of this invention are as follows:

[0091] Step S1: Optimize the network structure to implement a predictive coding algorithm with a skip connection structure;

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

[0093] Step S3: Improve the original predictive coding algorithm by introducing a non-convex energy function optimization algorithm into the predictive coding algorithm.

[0094] The specific steps are explained below. Step S1, "optimizing the network structure to implement a predictive coding algorithm with a skip connection structure," specifically includes the following steps:

[0095] Step S101: Construct a general sequence structure network, which consists of multi-layer convolutional networks or fully connected networks. In the model example, a structure containing 10 convolutional layers is constructed, and its model diagram is shown below. Figure 1 As shown.

[0096] Step S102, define the additional skip connection layer as l skip-layer The corresponding model connection is f skip-layer Assume the output node of the jump connection is v t The jump connection is to the input node v. s The corresponding output node is represented as follows:

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

[0098] The update formula for this input node is as follows:

[0099]

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

[0101]

[0102] The specific implementation method is as follows:

[0103] With v0 as the input node for the jump connection and v9 as the output node for the jump connection, the model diagram is as follows. Figure 2 .

[0104] The corresponding update formula for the v0 input node is:

[0105]

[0106] The parameter update formula is obtained as follows:

[0107]

[0108] Step S2, described as "building a training framework for co-evolution of both ends (input and output) based on the original predictive coding algorithm," includes the following specific steps:

[0109] Step S201: Set a random variable that follows a Gaussian distribution (referred to as M here) and initialize the values ​​of the input nodes.

[0110] Example: To set a random variable M that follows a normal distribution, you can use a vector of all zeros 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] In step S202, in the gradient update module of the predictive encoding, the gradient of variable M is updated using the prediction error. After the forward process of predictive encoding, an observation vector and a prediction vector are generated. The error between the observation vector and the prediction vector is used as the loss of this layer, and the updates of the state and gradient both depend on this loss.

[0112] Step S203: Automatically update the random variable M using the optimizer.

[0113] The specific implementation method is as follows:

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

[0115] g t =-ε t

[0116] g t It is the gradient of the random variable M, ε t This represents the error at the current time step. Then, the exponential moving average m of the gradient is calculated. t m0 is initialized to 0, as shown in the equation:

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

[0118] β1 is the exponential decay rate, controlling the weighting of momentum and the current gradient, typically set to 0.9. Next, the exponential moving average v of the squared gradient is calculated. t v0 is initialized to 0, as shown in the equation:

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

[0120] The β² coefficient represents the exponential decay rate, controlling the influence of the previous squared gradient; its default value is 0.999. Next, the gradient mean m... t To correct deviations and reduce their impact on the initial stages of training, use... Representing the new gradient mean, using The exponential moving average representing the new squared gradient is shown in the following formula:

[0121]

[0122]

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

[0124]

[0125] Step S3, described as "improving the original predictive coding algorithm by introducing a non-convex energy function optimization algorithm into the predictive coding algorithm," specifically includes the following steps:

[0126] Step S301: During the learning phase of the predictive coding algorithm, this step also uses the optimizer from step S203 to automatically update the random variable M.

[0127] The specific implementation method is as follows:

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

[0129] g t =-ε t

[0130] g t It is the gradient of the random variable M, ε t This represents the error at the current time step. Then, the exponential moving average m of the gradient is calculated. t m0 is initialized to 0, as shown in the equation:

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

[0132] β1 is the exponential decay rate, controlling the weighting of momentum and the current gradient, typically set to 0.9. Next, the exponential moving average v of the squared gradient is calculated. t v0 is initialized to 0, as shown in the equation:

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

[0134] The β² coefficient represents the exponential decay rate, controlling the influence of the previous squared gradient; its default value is 0.999. Next, the gradient mean m... t To correct deviations and reduce their impact on the initial stages of training, use... Representing the new gradient mean, using The exponential moving average representing the new squared gradient is shown in the following formula:

[0135]

[0136]

[0137] Finally, based on and Adaptively update M t δ is the smoothing term (usually taken as 10). -8 ), where α is the learning rate (usually a small value, such as 0.001), as shown in the formula:

[0138]

[0139] Step S302: In the inference phase of the predictive coding algorithm, the model parameters θ are updated using the optimizer.

[0140] The specific implementation method is as follows:

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

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

[0143]

[0144] Where ∈ l The error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f1 represents the model hyperparameters, and f1 is the mapping function of the l-th layer in the neural network.

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

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

[0147] 5. Deviation correction:

[0148] Since the initial values ​​of the momentum term m and the RMSprop term v are close to zero, a bias correction is performed to reduce this bias:

[0149]

[0150]

[0151] 6. Update parameters: Update model parameters according to Adam's update rules. 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 through 7 until convergence (e.g., Or reach the predetermined number of training iterations (e.g., 10,000 iterations).

[0154] This invention also proposes an unconditional image generation system based on deep predictive coding networks, comprising:

[0155] The model building module constructs a network model with a skip connection structure based on the ordinary sequence network model.

[0156] The training module sets up a random variable M that follows a Gaussian distribution and updates the random variable M by initializing the gradient value g of M with the error of the initial node. t Calculate the exponential moving average m of the gradient. t The exponential moving average v of the gradient squared t , for m t Obtained by deviation correction For v t Obtained by deviation correction according to and Adaptively updating M yields the random variable M t and Mt The set is used as the training sample;

[0157] The iterative module calculates the loss function L with respect to the parameters of the l-th layer model on the training samples. gradient

[0158] According to the gradient Update m t and v t For the updated m t and v t Perform deviation correction again to obtain the corresponding and based on and Update network model parameters Continuously update network model parameters Until the network model When the number of convergences or iterations reaches a specified upper limit, record the exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this point.

[0159] The generation module adaptively updates the random variable M based on m and v. s M s That is, the generated image data.

[0160] The training module initializes the gradient value g of M with the error of the initial node. t The specific method is as follows:

[0161] g t =-ε t

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

[0163] Calculate the exponential moving average m of the gradient t The exponential moving average v of the gradient squared t The specific method is as follows:

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

[0165] β1 is the exponential decay rate;

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

[0167] The β2 coefficient represents the exponential decay rate.

[0168] The pair m t Obtained by deviation correction and against v t Obtained by deviation correction The specific method is as follows:

[0169]

[0170]

[0171] according to and Adaptively updating M yields the random variable M t The specific method is as follows:

[0172]

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

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

[0175]

[0176] Where ∈ l The error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f is the hyperparameter of the network model. l Let l be the mapping function of the l-th layer in the neural network;

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

[0178]

[0179]

[0180] based on and Update network model parameters The specific method is as follows:

[0181]

[0182] Where ε is a constant whose value guarantees that the denominator is not zero.

[0183] The generation module adaptively updates the random variable M based on m and v. s The specific method is as follows:

[0184]

[0185] When the last |M s -M s-1 When the initial threshold is reached, M s This refers to the generated image.

[0186] This invention avoids gradient vanishing, accelerates training, and optimizes generation quality. Deep backpropagation (BP) convolutional networks suffer from gradient reduction, a problem first addressed in ResNet with skip connections. Skip connections directly send information from lower layers closer to the input to higher layers closer to the output, facilitating faster gradient calculation to support parameter updates. This invention implements unconditional image generation based on original predictive coding and improves the stability of numerical computation. Furthermore, this invention applies a non-convex function optimization algorithm to predictive coding, improving its optimization performance and laying the foundation for introducing new non-convex energy functions.

[0187] The use of jump connection structure in this invention makes it easier for information to flow in the network, thereby mitigating problems such as gradient vanishing and gradient exploding. In addition, jump connection structure can also improve the model's expressiveness and generalization ability because it allows information to be passed across multiple layers in the network, thereby capturing more features and patterns and improving the model's generation effect.

[0188] This invention eliminates the restriction that the input or output must be in a fixed state, instead designing a scheme where the input and output evolve together during the training process. This allows for a better learning of the correspondence between the normal distribution and the input data. Furthermore, the introduction of a random variable M to update and learn the mean of the input data makes numerical calculations more stable.

[0189] This invention improves the optimization algorithm in predictive coding, enabling the predictive coding algorithm to compare the global optimal solution as much as possible when optimizing the non-convex energy function. This not only improves the optimization effect of the existing algorithm, but also lays the foundation for the introduction of new non-convex optimization algorithms.

Claims

1. An unconditional image generation method based on deep predictive coding networks, characterized in that, include: S1. Construct a network model with a skip connection structure based on the ordinary sequence network model; 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 The exponential moving average v of the gradient squared t , for m t Obtained by deviation correction For v t Obtained by deviation correction according to and Adaptively update M to obtain random variable M t and M t The set is used as the training sample; S3. Calculate the loss function L with respect to the parameters of the l-th layer model on the training samples. gradient According to the gradient Update m t and v t For the updated m t and v t Perform deviation correction again to obtain the corresponding and based on and Update network model parameters Repeat the above steps until the network model is complete. When the number of convergences or iterations reaches a specified upper limit, record the exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this point. Random variable M is obtained based on adaptive update of m and v. s M s That is, the generated image data.

2. The method according to claim 1, characterized in that, In S2, the gradient value g of M is initialized with the error of the initial node. t The specific method is as follows: g t =-e t g t It is the gradient of the random variable M, ε t It represents the error at the current time, with the subscript 't' indicating the time sequence number, and its value is a natural number. Calculate the exponential moving average m of the gradient t The exponential moving average v of the gradient squared t The specific method is as follows: m t =β1m t-1 +(1-β1)g t β1 is the exponential decay rate; v t =β2v t-1 +(1-β2)g t 2 The β2 coefficient represents the exponential decay rate. The pair m t Obtained by deviation correction and against v t Obtained by deviation correction The specific method is as follows: according to and Adaptively update M to obtain 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, the loss function L with respect to the parameters of the l-th layer model is calculated on the training samples. gradient The specific method is as follows: Where ∈ l The error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f is the hyperparameter of the network model. l Let l be 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 network model parameters The specific method is as follows: Where ε is a constant whose value guarantees that the denominator is not zero.

4. The method according to claim 3, characterized in that, Random variable M is obtained based on adaptive update of m and v. s The specific method is as follows: When the last |M s -M s-1 When the initial threshold is reached, M s This is the generated image.

5. An unconditional image generation system based on a deep predictive coding network, characterized in that, include: The model building module constructs a network model with a skip connection structure based on the ordinary sequence network model. The training module sets up a random variable M that follows a Gaussian distribution and updates the random variable M by initializing the gradient value g of M with the error of the initial node. t Calculate the exponential moving average m of the gradient. t The exponential moving average v of the gradient squared t , for m t Obtained by deviation correction For v t Obtained by deviation correction according to and Adaptively update M to obtain random variable M t and M t The set is used as the training sample; The iterative module calculates the loss function L with respect to the parameters of the l-th layer model on the training samples. gradient According to the gradient Update m t and v t For the updated m t and v t Perform deviation correction again to obtain the corresponding and based on and Update network model parameters Continuously update network model parameters Until the network model When the number of convergences or iterations reaches a specified upper limit, record the exponential moving average m of the gradient and the exponential moving average v of the squared gradient at this point. The generation module adaptively updates the random variable M based on m and v. 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 The specific method is as follows: g t =-e t g t It is the gradient of the random variable M, ε t It represents the error at the current time, with the subscript 't' indicating the time sequence number, and its value is a natural number. Calculate the exponential moving average m of the gradient t The exponential moving average v of the gradient squared t The specific method is as follows: m t =β1m t-1 +(1-β1)g t β1 is the exponential decay rate; v t =β2v t-1 +(1-β2)g t 2 The β2 coefficient represents the exponential decay rate. The pair m t Obtained by deviation correction and against v t Obtained by deviation correction The specific method is as follows: according to and Adaptively update M to obtain 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, The iterative module calculates the loss function L with respect to the parameters of the l-th layer model on the training samples. gradient The specific method is as follows: Where ∈ l The error term at steady state during the learning phase, vs l+1 It represents the state value of the (l+1)th layer when the learning phase reaches a steady state. f is the hyperparameter of the network model. l Let l be 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 network model parameters The specific method is as follows: Where ε is a constant whose value guarantees that the denominator is not zero.

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

Citation Information

Patent Citations

  • 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