numElements method

int numElements()

Returns the number of elements in a flattened (1-D) view of the tensor.

Implementation

int numElements() {
  return computeNumElements(shape);
}