Nice work 
To help you figure out the torch.cat stuff, do some printouts before and after the cat.
print(img1.shape)
print(img2.shape)

In this case I can see that your code is missing a parenthesis. It should be  img2 = torch.cat((img1,img2)). Just a heads up, if you do a batch size with more than 1, you will probably want to write a custom collate function, just fyi