tf.contrib.util.make_ndarray(tensor)

tf.contrib.util.make_ndarray(tensor)

See the guide: Utilities (contrib) > Miscellaneous Utility Functions

Create a numpy ndarray from a 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.

Defined in tensorflow/python/framework/tensor_util.py.