<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def innerprod(self, X):
 """ Efficient computation of the inner product of a ktensor with another tensor Parameters X : tensor_mixin Tensor to compute the inner product with. Returns ------- p : float Inner product between ktensor and X. """

        N = len(self.shape)
        R = len(self.lmbda)
        res = 0
        for r in range(R):
            vecs = []
            for n in range(N):
                vecs.append(self.U[n][:, r])
            res += self.lmbda[r] * X.ttv(tuple(vecs))
        return res