lundi 25 juillet 2016

How can I convert a tensor into a numpy array in TensorFlow?

I know how to convert an numpy array into a tensor object with the function tf.convert_to_tensor(img.eval()).

My problem is that after I apply some preprocessing to this tensors in terms of brightness, contrast, etc, I would like to view the resulting transformations to evaluate and tweak my parameters.

How can I convert a tensor into a numpy array so I can show it as an image with PIL?

Aucun commentaire:

Enregistrer un commentaire