Hi all,
I’m trying to write a tensor computation with a strided output but I’m not sure how to express the output dimensions in the lambda computation for tvm.compute
.
My output is of the form O[a][b+c].
Thanks,
[EDIT]
Following is a more concrete example, the backward computation of a convolutional layer.
def bp(A,W,B):
for n in range(0,N):
for k in range(0,K) :
for h in range(0, H):
for w in range(0, W):
for c in range(0, C):
for r in range(0,R):
for s in range(0, S):
B[n][h+r][w+s][c] += A[n][h][w][k]*W[k][c][r][s]
As @eqy mentioned, it is possible that different values of h,w,r,s
map to the same h+r
and w+s
indices.