import torch
x = torch.tensor([1, 2, 3, 4], dtype=torch.float)
x.shape
Out[14]: torch.Size([4])
y = x.T
y.shape
Out[16]: torch.Size([<
关于PyTorch中向量的维度
最新推荐文章于 2023-02-19 19:18:28 发布
import torch
x = torch.tensor([1, 2, 3, 4], dtype=torch.float)
x.shape
Out[14]: torch.Size([4])
y = x.T
y.shape
Out[16]: torch.Size([<