Hi,
I have a non-vectorized implementation of 2d gaussian:
def fillWithGaussian(inp,sigma,offset=0):
    center = ((inp.shape[1]-2)+offset)/2.
    inp[:,:,:].fill_(0)
    for i_ in range(inp.shape[1]):
        for j_ in range(inp.shape[2]):
            inp[:,i_, j_]+= 1 / 2 / np.pi / (sigma ** 2) * torch.exp(
            -1 / 2 * ((i_ - center - 0.5) ** 2 + (j_ - center - 0.5) ** 2) / (sigma ** 2))

But although it is differentiable and I want it to remain autograd compatible, it is really slow. Is there any suggestion?