Open vmtmxmf5 opened 2 years ago
a.mul_(2)
tmp.indexfill(dim, index=torch.tensor([0,2]), val)
1. torch.cat할 때 dim=0의 사이즈만 자유롭고 나머지는 같아야 함
2. cat vs stack
torch.cat([a.unsqueeze(0), b.unsqueeze(0), c.unsqueeze(0)]) torch.stack([a,b,c])
torch.empty(4, 2).uniform_(0,1)
Pytorch 명령어
torch.LongTensor()
a.size()
a.reshape()
a.unsqueeze(dim)
덮어쓰기 기능
a.mul_(2)
index_fill
tmp.indexfill(dim, index=torch.tensor([0,2]), val)
병합
random uniform dist.
torch.empty(4, 2).uniform_(0,1)