Research Article
CPGAN : An Efficient Architecture Designing for Text-to-Image Generative Adversarial Networks Based on Canonical Polyadic Decomposition
Algorithm 1
Overall scheme of CPGAN algorithm.
| Input: mini-batch images , text description , and number of training batch steps . | | Output: CPGAN model. | (1) | Use equations (5)–(7) to decompose the original convolutional layer in generator; | (2) | Add CA module for text embedding and add decoders layers; | (3) | Select an appropriate learning rate for the decomposed model; | (4) | Fortodo | (5) | Encode text description into embedding ; | (6) | Feed into CA and obtain ; | (7) | Sample from and random noise ; | (8) | Concatenate and and feed it into the generator; | (9) | Update discriminator D by equation (11); | (10) | Update generator G by equation (10); | (11) | End for | (12) | Discard all decoders and get a trained CPGAN. |
|