Have a question? Connect with the community at the TensorFlow Forum Visit Forum


Returns the size of a tensor.

This operation returns an integer representing the number of elements in input.

For example:

# 't' is [[[1, 1,, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]]
size(t) ==> 12

input A Tensor.
out_type An optional tf.DType from: tf.int32, tf.int64. Defaults to tf.int32.
name A name for the operation (optional).

A Tensor of type out_type.