y =x = torch.tensor([1, 0])
x = torch.unsqueeze(x, dim=1)
print(x)
y = torch.unsqueeze(y, dim=0)
print(y)
# tensor([[1],
# [0]])
# tensor([[1, 0]])
torch.unsqueeze函数使用示例
猜你喜欢
转载自blog.csdn.net/djdjdhch/article/details/130600281
今日推荐
周排行