torch.Tensor.expand_as
- Tensor.expand_as(other) → Tensor
-
将此张量的大小扩展为与
other相同。self.expand_as(other)等同于self.expand(other.size())。关于
expand的更多详情,请参见expand()。- 参数
-
other (
torch.Tensor) – 结果张量与other的大小相同。
将此张量的大小扩展为与other相同。 self.expand_as(other)等同于self.expand(other.size())。
关于expand的更多详情,请参见expand()。
other (torch.Tensor) – 结果张量与 other 的大小相同。