Thank you for your help!
I tried using it but for some reason it was not working as you have explained. I’m not sure if my calculations in the original post are correct.
I did some search and finally I came across the torch.flatten() function. I had to use it as torch.flatten(x, 1, 3). Please let me know your thoughts on the same.
Also you have said that we use self.pool3(x) 2 times. Any specific reason for this.