What is the right way to train image pairs? I want to train a convolutional network to grade each one of the pairs (100 pairs). Should I use cat((img1, img2),0), cat((img1, img2),1) or cat((img1, img2),2)? Tried 0 but I ended up creating 1x100x2x80x80 (80x80 is the size of the image) and got the error:
ValueError: Expected 4D tensor as input, got 5D tensor instead.

How would you define a layer that receives 5D tensor?
I also tried 1x100x160x80 and 1x100x80x160 but the model didn’t learn anything and I wonder if this was the problem.