shape
Description
Obtains the shape of a Tensor.
Prototype
shape()
Parameters
None
Applicability
Restrictions
None
Returns
The shape. A list of immediates (of type int), Scalars (of type int or uint), or Exprs (of type int or uint).
Example
from tbe import tik
tik_instance = tik.Tik()
data_A = tik_instance.Tensor("float16", (128,), name="data_A", scope=tik.scope_ubuf)
data_A.shape
[128] is returned.
Parent topic: Tensor Management