torch.Tensor.view_as
-
Tensor.view_as(other) → Tensor -
Представляет этот тензор как тензор того же размера, что и
other.self.view_as(other)эквивалентноself.view(other.size()).Подробнее о
viewсм. в разделеview().- Параметры:
-
other (
torch.Tensor) – результирующий тензор имеет тот же размер, что иother.
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.Tensor.view_as.html