title: Why is the image colour not showing with RGB?
body: <p>I run the code to show the latent space images, but the colour of the image is not displayed as RGB. If you know, would you tell me what is the cause of this result? I would like to output each image like</p>
  <p><a href="https://i.stack.imgur.com/aoH7k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aoH7k.png" alt="enter image description here" /></a></p>
  <p>The problem code and result are</p>
  <pre><code>random_latent_vectors = tf.random.normal(shape=(10, 128))
  generator = make_generator(128)
  
  images = generator(random_latent_vectors)
  images *= 255
  
  images = images.numpy()
  images.shape
  
  plt.figure(figsize=(8,3))
  for i in range(images.shape[0]):
    plt.subplot(2, 5, i+1)
    plt.imshow(images[i, :, :, 0].astype(&quot;int32&quot;))
    plt.axis('off')
  plt.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/2yqZ1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2yqZ1.png" alt="enter image description here" /></a></p>
  <p><code>generator</code> is built from</p>
  <pre><code>def make_generator(latent_dim):
    model = keras.Sequential([
                              keras.Input(shape=(latent_dim,)),
                              layers.Dense(8 * 8 * 128),
                              layers.Reshape((8, 8, 128)),
                              layers.Conv2DTranspose(128, kernel_size=4, strides=2, padding=&quot;same&quot;),
                              layers.LeakyReLU(alpha=0.2),
  
                              layers.Conv2DTranspose(256, kernel_size=4, strides=2, padding=&quot;same&quot;),
                              layers.LeakyReLU(alpha=0.2),
                              
                              layers.Conv2DTranspose(512, kernel_size=4, strides=2, padding=&quot;same&quot;),
                              layers.LeakyReLU(alpha=0.2),
                              layers.Conv2D(3, kernel_size=5, padding=&quot;same&quot;, activation=&quot;sigmoid&quot;)
                              ])
    return model
  </code></pre>