QueryDet-PyTorch icon indicating copy to clipboard operation
QueryDet-PyTorch copied to clipboard

Code issues

Open wx24598 opened this issue 3 years ago • 0 comments

Hello author, your job is very good. Can you answer the meaning of the following code for me?

    for i in range(-1*self.context, self.context+1):
        for j in range(-1*self.context, self.context+1):
            sparse_ys.append(ys+i)
            sparse_xs.append(xs+j)

    sparse_ys = torch.cat(sparse_ys, dim=0)
    sparse_xs = torch.cat(sparse_xs, dim=0)


    good_idx = (sparse_ys >= 0) & (sparse_ys < fh) & (sparse_xs >= 0)  & (sparse_xs < fw)

wx24598 avatar Sep 08 '22 13:09 wx24598