Hi!
I need to implement module which will essentially is a 2d grid of independed torch.Linear instances. Is there any elegant pytorch way to write the following code:
out = np.zeros(w.shape[1:])
for c in xrange(out.shape[0]):
    for i in xrange(out.shape[1]):
        for j in xrange(out.shape[2]):
            out[c, i, j] = x[:, i, j].dot(w[:, c, i, j])

Also know as Einstein summation in numpy:
out = np.einsum('kij,kmij->mij', x, w)