Okay @ptrblck I think its lil clear now, actually sir in my case I am applying this unfold operation on a tensor of A as given below:
A.shape=torch.Size([16, 309,128])
A = A.unsqueeze(1) # that's I guess for making it 4 dim for unfold operation
A_out= F.unfold(A, (7, 128), stride=(1,128),dilation=(3,1))
A_out.shape=torch.Size([16, 896,291])
I am not getting this 291 If dilation factor is not there then as per your nested loop theory it would be [16,896,303] right ? Thanks for reply