Shortcuts

torch.Tensor.expand_as

Tensor.expand_as(other) 张量

将此张量扩展为与 other 相同的大小。 self.expand_as(other) 等同于 self.expand(other.size())

请参阅expand()以获取更多关于expand的信息。

Parameters

其他 (torch.Tensor) – 结果张量与 other 具有相同的大小。

优云智算