Pytorch Torch Eq
# PyTorch torch.eq Function
* * Pytorch torch Reference Manual](#)
`torch.eq` is a function in PyTorch used for element-wise equality comparison.
### Function Definition
torch.eq(input, other, out)
* * *
## Usage Example
## Example
import torch
a = torch.tensor([1,2,3,4])
b = torch.tensor([1,2,0,4])
result = torch.eq(a, b)
print(result)
Output result:
tensor([True, True, False, True])
* * Pytorch torch Reference Manual](#)
YouTip