Docsity

Generative Deep Learning: LSTM, GANs, and Creative AI Techniques, Exams of Biology

Toggle sidebar
bg1
Chapter 8 Generative Deep Learning test
fully solved & updated
What is this set all about? - answer About AI creating creativity from text generation, picture generation
to movie script creation. The purpose is to help augment our creativity
How does DL excel at creativity? - answer Our perceptual modalities, our language and artwork all have a
statistical structure and learning it is what the technology excels at. They can learn the statistical latent
space of images, music, and stories and sample from this space
What does text generation with LSTM do? - answer It grabs an RNN and create new text. This spans from
automatic smart replies from chatbots, speech synthesis to creating new music
Language Model - answer Any network that can model the probability of the next token given the
previous ones 'a cat on the ma'. It means to capture the latent space of the language, its statistical
structure
Token - answer a word or character
Sample from it in a language model - answer Generating new sequences. Feed the model initial strings of
text called conditioning data and ask it to generate the next character or the next word. You can even
add the generated output back int the input data
Model 1: Character-level neural language model - answer We will start with the initial text 'The cat sat on
the m'. It will go thru a language model that uses a probability distribution of the next character. It then
undergoes a sampling strategy process where a sampled character is generated and put back into the
initial text. Again, it goes thru the language model, a probability distribution and a sampling strategy
where another character is generated. See page 294
Importance of sampling strategy - answer The way you choose next character is important. Greedy
sampling - always choosing the most likely next character. Doing this, however, results in repetitive
strings that dont look like a coherent language.
pf3
pf4
pf5

Partial preview of the text

Download Generative Deep Learning: LSTM, GANs, and Creative AI Techniques and more Exams Biology in PDF only on Docsity!

Chapter 8 Generative Deep Learning test

fully solved & updated

What is this set all about? - answer About AI creating creativity from text generation, picture generation to movie script creation. The purpose is to help augment our creativity How does DL excel at creativity? - answer Our perceptual modalities, our language and artwork all have a statistical structure and learning it is what the technology excels at. They can learn the statistical latent space of images, music, and stories and sample from this space What does text generation with LSTM do? - answer It grabs an RNN and create new text. This spans from automatic smart replies from chatbots, speech synthesis to creating new music Language Model - answer Any network that can model the probability of the next token given the previous ones 'a cat on the ma'. It means to capture the latent space of the language, its statistical structure Token - answer a word or character Sample from it in a language model - answer Generating new sequences. Feed the model initial strings of text called conditioning data and ask it to generate the next character or the next word. You can even add the generated output back int the input data Model 1: Character-level neural language model - answer We will start with the initial text 'The cat sat on the m'. It will go thru a language model that uses a probability distribution of the next character. It then undergoes a sampling strategy process where a sampled character is generated and put back into the initial text. Again, it goes thru the language model, a probability distribution and a sampling strategy where another character is generated. See page 294 Importance of sampling strategy - answer The way you choose next character is important. Greedy sampling - always choosing the most likely next character. Doing this, however, results in repetitive strings that dont look like a coherent language.

Stochastic Sampling: Introducing randomness in the sampling process, by sampling from the probability distribution for the next character. In this setup if e has a probability of 0.2, it will be picked 20% of the time. One problem with this strategy, you cannot control the randomness. Low vs High Entropy - answer When we draw the next character, that sample will depend on the amount of randomness we elect to use or entropy. Low entropy will give us more predictable human like sequences whereas high entropy will give us either super creative or non-sense text. Its up to us to judge the optimal entropy for our end goals Heres how to generate new text from our model built given a trained model and a seed text snippet - answer 1. Draw from the model a probability distirbution for the next character, given the generated text available so far

  1. Reweight the distribution to a certain temperature
  2. Sample the next character at random according to the reweighted distribution
  3. Add the new character at the end of the avaialable text How to make a better character-level LSTM - answer As you add more data, more layers in the model, and for more epochs, you will achieve a more coherent and realistic model. Based on how you judge randomness will dictate how the next character is picked. Inner-workings of Deep Dream - answer Runs a convnet in reverse, performing gradient ascent on the input to the convnet in order to maximize the activation of a specific filter in an upper layer
  • Try to maximize activation of entire layers
  • You start on a preexisting visual pattern, distorting elements of the image
  • The input images are processed at different scales called octaves, which improves the quality of the visualizations Do the different types of convnets, VGG16, VGG19, Xception, ResNet50 influence how the DeepDream looks? - answer Yes because different convnet architectures have built different learned features. Inception is known to be the best for this.

Concept Vector - answer From Chapter 6 Embeddings. Given a latent space of representations, or an embedding space, certain directions in the space may encode interesting axes of variation in the original data VAE Explained - answer Turns the image into the parametes of a statistical distribution: a mean and a variance.

  1. Encoder module turns the input samples input_img into two parameters in a latent space of representations, z_mean and z_log_variance.
  2. You randomly sample a point z from the latent normal distribution that's assumed to generate the input image via z = z_mean + exp(z_log_variance) * epsilon is a random tensor of small values
  3. A decoder module maps this point in the latent space back to the original input image GAN Explained - answer 1. A generator networks makes vectors to images
  4. A discriminator maps images to a binary score estimating the probability that the image is real.
  5. A gan network chains the generator and discriminator together thus it maps latent space vectors to the discriminators assessment of the realism of these latent vectors as decoded by the generator
  6. You train the discriminator using examples of real and fake images along w/ "real" and "fake" labels
  7. To train the generator, you use gradients of the generators weights with regard to the loss of the gan model. Few alchemically like tricks used in GAN - answer 1. We use tanh as the last activation in the generator instead of sigmoid
  8. We sample from points in the latent space using a normal distribution, not a uniform distribution
  9. Stochasticity is good to induce robustness
  10. Spare gradients can hinder GAN training

How to train a Deep Convolutional GAN - answer 1. Draw random points in the latent space

  1. Generate images w/ generator using this random noise
  2. Mix the generated images with real ones
  1. Train discriminator using these mixed images, with corresponding targets: either 'real' or 'fake'
  2. Draw new random points in the latent space
  3. Train gan using these random vectors, with targets that all say "these are real images"