weights[k,i,j] = torch.exp(-torch.pow(data[k,:,i]-data[k,:,j],2).sum()/sigi**2)*torch.exp(-torch.pow(torch.tensor(i-j).float(),2).sum()/sigx**2) ...