根据tensor的shape校验是否是标量。
def is_scalar(shape)
参数
说明
shape
需要校验的tensor的shape。
如果是标量,则返回True。否则,返回False。
无
from te.utils import para_check para_check.is_scalar((1,))