torch.Tensor.view_as¶
- Tensor.view_as(other) Tensor ¶
將此張量視為與
other
相同的大小。self.view_as(other)
等效於self.view(other.size())
。請參閱
view()
以獲取關於view
的更多資訊。- 參數
other (
torch.Tensor
) – 結果張量具有與other
相同的大小。
將此張量視為與 other
相同的大小。self.view_as(other)
等效於 self.view(other.size())
。
請參閱view()
以獲取關於 view
的更多資訊。
other (torch.Tensor
) – 結果張量具有與 other
相同的大小。