TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-15

tensorplay.functional.numel

tensorplay.functional.numel(input: Tensor) → int[source]

Returns the total number of elements in the input tensor.

Parameters:

input (Tensor) – the input tensor.

Example:

>>> a = tensorplay.randn(1, 2, 3, 4, 5)
>>> tensorplay.numel(a)
120
>>> a = tensorplay.zeros(4,4)
>>> tensorplay.numel(a)
16

On this page

Ask DeepWiki