Could you add print statements in your forward methods and print the shape of the used tensors?
Some of them are creating a shape mismatch.
Usually you get this error, if you pass wrong input tensor to e.g. a nn.Conv2d layer:
conv = nn.Conv2d(3, 6, 3, 1, 1)
x = torch.randn(100)
out = conv(x)
> RuntimeError: Expected 4-dimensional input for 4-dimensional weight 6 3 3 3, but got 1-dimensional input of size [100] instead

This layer expects a 4-dimensional input in [batch_size, channels, height, width].
If you have trouble isolating the issue, please post the complete stack trace.