Closes this Tensor and releases any resources associated with it.
Returns a copy of this tensor on the provided device.
Returns a copy of this tensor on the provided device.
Device name. For example, "CPU:0"
, or "GPU:2"
.
Returns a copy of this tensor on the CPU.
Data type of this tensor.
Data type of this tensor.
Device in which the tensor is stored.
Device in which the tensor is stored.
Returns a copy of this tensor on the GPU.
Returns a copy of this tensor on the GPU.
Index of the GPU to use.
Rank of this tensor (i.e., number of dimensions).
Shape of this tensor.
Shape of this tensor.
Number of elements contained in this tensor.
Returns a summary of the contents of this tensor.
Returns a summary of the contents of this tensor.
Maximum number of entries to show for each axis/dimension. If the size of an axis exceeds
maxEntries
, the output of that axis will be shortened to the first and last three elements.
Defaults to 6
. Values below 6
are ignored.
If true
, the summary is flattened to one line. Otherwise, the summary may span multiple
lines.
If true
, the data type and the shape of the tensor are explicitly included in the summary.
Otherwise, they are not.
Tensor summary.
Converts this object to its corresponding ProtoBuf object.
Converts this object to its corresponding ProtoBuf object.
ProtoBuf object corresponding to this object.
Returns this tensor.
Returns this tensor.
Returns an TensorIndexedSlices that has the same value as this TensorLike.
Returns an TensorIndexedSlices that has the same value as this TensorLike.
TensorIndexedSlices that has the same value as this TensorLike.
Constructs and returns a TensorProto object that represents this tensor.
Constructs and returns a TensorProto object that represents this tensor.
Constructed TensorProto.
Writes this tensor to the provided file, using the Numpy (i.e., .npy
) file format.
Writes this tensor to the provided file, using the Numpy (i.e., .npy
) file format. Note that this method will
replace the file, if it already exists.
Tensor (i.e., multi-dimensional array).
Tensors are the main data structure underlying all operations in TensorFlow. They represent multi-dimensional arrays of various data types (e.g., FLOAT32). Operations involving tensors can be of two types:
// TODO: [OPS] Update doc when we enrich op outputs similarly to tensors.