torch.Tensor.reshape_as
-
Tensor.reshape_as(other) → Tensor -
Возвращает этот тензор с такой же формой, как и у
other.self.reshape_as(other)эквивалентноself.reshape(other.sizes()). Этот метод возвращает представление, еслиother.sizes()совместимо с текущей формой. См.torch.Tensor.view(), чтобы узнать, когда возможно вернуть представление.Дополнительную информацию о
reshapeсм. вreshape().- Параметры:
-
other (
torch.Tensor) – Результирующий тензор имеет такую же форму, как и уother.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.Tensor.reshape_as.html