torch concat matrix
third_tensor = torch.cat((first_tensor, second_tensor), 0) # keep column width append in rows
third_tensor = torch.cat((first_tensor, second_tensor), 1) # keep row height and append in columns
torch concat matrix
third_tensor = torch.cat((first_tensor, second_tensor), 0) # keep column width append in rows
third_tensor = torch.cat((first_tensor, second_tensor), 1) # keep row height and append in columns
how can I covert a list of tensor into tensor?
l = list(torch.tensor([1,2,3]))
print(l)
>>>[tensor(1), tensor(2), tensor(3)]
k = torch.stack(l)
print(k)
>>>tensor([1, 2, 3])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us