Hi I am trying to implement “Exploiting linear structure for efficient evaluation” paper and it requires me to perform SVD on the weight tensor and find its rank 1 approximation and now these rank 1 filters perform the convolution operation.
I wrote a simple test suite to verify this and I am getting good speed ups. Here is the code which does that:
# doing passes
res1 = np.zeros((oH, pw))
out = np.zeros((oH, oW))
t = time.time()
for i in xrange(oH):
    hst, hend = i*stride, i*stride+HH
    patch = padded_x[hst:hend, :]
    res1[i] = np.sum(patch*u, axis=0)
for i in xrange(oW):
    wst, wend = i*stride, i*stride+WW
    patch = res1[:, wst:wend]
    out[:, i] = np.sum(patch*v, axis=1)
elapsed = time.time() - t
print "time taken to do this awesome operation is {}".format(elapsed)
print out

I wanted to know if there is a way I can do this using pytorch and get the speed improvements?