torch.equal
-
torch.equal(input, other) → bool -
Trueвозвращает true, если два тензора имеют одинаковый размер и элементы,Falseиначе false.Пример:
>>> torch.equal(torch.tensor([1, 2]), torch.tensor([1, 2])) True
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.equal.html