About image size, you can load images channel-first. PyTorch uses channel-first by default or you can convert your code to accept channel-last tensors.
The reason I considered (1, 3, 136, 136) is that probably you are using batch operations. So you can aggregate let’s say 1000 images in one tensor (1000, 3, 136, 136).
about your error, I’ve mentioned it in first post. You network is not properly constructed.



 Nikronic:

Although, layer11 has never been used which leads to another mismatch error in layer 17.


And you have not explained why you are using this line.



 MUHAMMAD_JAHANZAIB_K:

x.view(x.size(0),-1)