torch.Tensor.expand_as
-
Tensor.expand_as(other) → Tensor -
Расширяет этот тензор до размера
other.self.expand_as(other)эквивалентенself.expand(other.size()).Дополнительные сведения о
expandсм. в разделеexpand().- Параметры:
-
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.expand_as.html