0

I am trying to launch TensorFlow Pix2Pix tutorial. I am copy full code from this page: https://www.tensorflow.org/tutorials/generative/pix2pix?hl=NO I am using tensorflow-gpu 2.3.1 In method

def generate_images(model, test_input, tar):

in String

plt.imshow(display_list[i] * 0.5 + 0.5)

I have next error: NotImplementedError: Cannot convert a symbolic Tensor (add:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported

display_list[i] = Tensor("strided_slice:0", shape=(256, 256, 3), dtype=float32)

Maybe somebody tried to launch this tutorial and solved this problem? Also I am using my dataset, but when I am tried to launch it with their dataset I got similar problem.

  • Does this answer your question? [Convert a tensor to numpy array in Tensorflow?](https://stackoverflow.com/questions/34097281/convert-a-tensor-to-numpy-array-in-tensorflow) – Alex K. Dec 13 '20 at 16:16

1 Answers1

1

I am not quite sure what do you want, but seem the error is like you try to pass Tensor object to numpy. In case you want to do that you can extract value from Tenso object by Tensor_obj.numpy().

Borin --help
  • 146
  • 2
  • 6