torch.eq(a, b)
eq() implements the == operator comparing each element in a with b (if b is a value) or each element in a with its corresponding element in b (if b is a tensor).
Alternative from @deltheil:
torch.all(tens_a.eq(tens_b))
torch.eq(a, b)
eq() implements the == operator comparing each element in a with b (if b is a value) or each element in a with its corresponding element in b (if b is a tensor).
Alternative from @deltheil:
torch.all(tens_a.eq(tens_b))