How to reshape a tensor back to it previous shape after using view()

Hello everyone. Hope you are doing well.
I have reshaped my tensor from (b, c, H, W) to (b, c, H*W) before sending it to a conv1D module.
So I want to reshape it back to its previous shape (b, c, H, W) in order to send it to a conv2D.
I was trying reshape() and view(), even squeeze().
Any idea? Thank you in advance.

so the tensor is on the shape (80, 16, 112, 112) and I reshape to (80, 16, 12542) before sending to the conv1D.
To reshape it back to (80, 16, 112, 112), first, i use unsqueeze(0) and get (1,80,16,12542) and then view as follow

x = x.unsqueeze(0)
d, b, c, hw = x.shape
x = x.view(b, c, round(math.sqrt(hw)), round(math.sqrt(hw)))

But i got this error

Exception has occurred: RuntimeError
shape '[80, 16, 112, 112]' is invalid for input of size 16053760

112*122 = 12544
16053760 / 80 / 16 = 12542

You’re probably lost 1 padding in conv layer before.

that is right. Thank you
Adding a padding =1 to the conv1d solve it.