Thanks for your reply.
n stands for the number of hypotheses. Suppose a window that our patch is in center of it. There are n patches inside the window. In other words I have a key frame for each image and I should extract n contiguous patches of the patch in key frame inside the window.
anyway…
I wrote your code but i got an error.
code:
import torch
import numpy as np
import torch.nn as nn
B,h,w,Sr,b,n=16,32,56,0.1,8,25
kernel_size=(1,1,int(np.ceil(0.1*b*b)))
x=torch.rand(B,h,w,int(np.ceil(0.1*b*b)),n)
conv=nn.Conv2d(int(np.ceil(0.1*b*b)),b*b,kernel_size)
conv(x)

B: batch size, h=height, w=width , SR: sample rate, b= block size.
My kernel size should be: (1,1,SR* b* b).
out channel=(b*b)
Would you please help me solve this error?
RuntimeError: expected stride to be a single integer value or a list of 3 values to match the convolution dimensions, but got stride=[1, 1]