问题
Wokring on a cGAN as I have mentioned over the last few questions I posted.
The code lines giving me the error, which I think I have narrowed down perfectly is:
for images, labels in train_dataset:
#gen_loss, disc_loss = train_step(images, labels)
The original Code for MNIST represents images as something like:
[-1.],
[-1.],
[-1.]],
[[-1.],
[-1.],
[-1.],
...,
[-1.],
[-1.],
[-1.]],
[[-1.],
[-1.],
[-1.],
...,
[-1.],
[-1.],
[-1.]]]], dtype=float32)>, <tf.Tensor: id=3685, shape=(200, 28, 28, 1), dtype=float32, numpy=
array([[[[-1.],
[-1.],
[-1.],
...,
[-1.],
[-1.],
[-1.]],
My own code, when I run it under a few changes to prepare the dataset, and my images comes as a set of images
['..... .jpg' '..... .jpg' ..........]
Because of this, I am dealing with errors, I was hoping for help in transferring to the new data type?
来源:https://stackoverflow.com/questions/60238349/datatype-conversion-in-tensorflow-python