Answers for "torch concatenate three tensors"

5

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
Posted by: Guest on September-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language