[Questions] Add offsets to output indices

Hi everyone, Can we add any offset to output indices? For instance, when an input of Conv2d is padded, the padded input is formulated by tvm.te as

Xpad = te.compute( (N, Ci, Hp, Wp), lambda n, ci, hp, wp: tvm.tir.if_then_else( tvm.tir.all(hp >= pad, hp - pad < Hi, wp >= pad, wp - pad < Wi), A[n, ci, hp - pad, wp - pad], tvm.tir.const(0.0, “float32”), ), name=“Xpad”, )

Its python-like code is for n in range(N) for ci in range(Ci) for hp in range(Hp) for wp in range(Wp) if (hp - pad) in [0, H) and (wp - pad) in [0, W) Xpad[n, ci, hp, wp] = X[n, ci, hp - pad, wp - pad] else: Xpad[n, ci, hp, wp] = 0fp32

Is there any way to write it in the following style? Xpad = np.zeros([N, Ci, Hp, Wp]) for n in range(N) for ci in range(Ci) for hi in range(Hi) for wi in range(Wi) Xpad[n, ci, hi + pad, wi + pad] = X[n, ci, hi, wi]