def tall(x: T.Tensor,
axis: int = None,
keepdims: bool = False) -> T.Boolean:
"""
Return True if all elements of the input tensor are true along the
specified axis.
Args:
x: A float or tensor.
axis (optional): The axis of interest.
keepdims (optional): If this is set to true, the dimension of the tensor
is unchanged. Otherwise, the reduced axis is removed
and the dimension of the array is 1 less.
Returns:
if axis is None:
bool: 'all' applied to all elements in the tensor
else:
tensor (of bytes): 'all' applied to the elements in the tensor
along axis
"""
return tmin(x.ne(0), axis=axis, keepdims=keepdims)
评论列表
文章目录