TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.make_ndarray

TensorFlow 1 version View source on GitHub

Create a numpy ndarray from a tensor.

Aliases:

tf.make_ndarray(tensor)

Create a numpy ndarray with the same shape and data as the tensor.

Args:

  • tensor: A TensorProto.

Returns:

A numpy array with the tensor contents.

Raises:

  • TypeError: if tensor has unsupported type.