def equal(x: T.FloatTensor, y: T.FloatTensor) -> T.ByteTensor:
"""
Elementwise test for if two tensors are equal.
Args:
x: A tensor.
y: A tensor.
Returns:
tensor (of bools): Elementwise test of equality between x and y.
"""
return torch.eq(x, y)
评论列表
文章目录