pytorch.cat()
import torch
# x1
x1 = torch.tensor([[11, 21, 31], [21, 31, 41]], dtype=torch.int)
print(x1.shape) # torch.Size([2, 3])
# x2
x2 = torch.tensor([[12, 22, 32], [22, 32, 42]], dtype=torch.int)
print(x2.shape) # torch.Size([2, 3])
inputs = [x1, x2]
print(inputs)
print(torch.cat(inputs, dim=2))
求关注
你确定没有串台吗,哈哈哈哈哈哈哈,pytorch都来了
可以发,都可以发ψ(`∇´)ψ