-1

I'm trying to exercise the TensorFlow Deep Convolutional Generative Adversarial Network based on the MNIST database. In order to test my coding abilities I downloaded the MNIST database directly from there website(instead of tf.keras.datasets.mnist.load_data()) and I have the following problem during executing the following line: real_output = discriminator(images, training=True) The error:

        raise TypeError('Inputs to a layer should be tensors. Got: %s' % (x,))
    TypeError: Inputs to a layer should be tensors. Got: pixel0```
What should I do to solve this?
Dvir
  • 1

1 Answers1

0

Ok I solved it. The solution is to normalize the images to values in the range -1 to 1: train_images = (train_images - 127.5) / 127.5 # Normalize the images to [-1, 1]

Dvir
  • 1