Vishu_Gupta:

So, my next concern was if I am performing the squeeze/unsqueeze operation several times in the forward will it affect my results?


It might affect the results from certain layers, yes. Autograd is able to track these operations and will properly calculate the gradients during the backward pass, so you would only have to make sure that the shapes are correct.