def multiply(self, vector): vector_flat = utils.tensors_to_column(vector) out_flat = ( math_ops.matmul(self._factor.get_cov(), vector_flat) + self._damping * vector_flat) return utils.column_to_tensors(vector, out_flat)
def multiply(self, vector): vector_flat = utils.tensors_to_column(vector) out_flat = vector_flat * (self._factor.get_cov() + self._damping) return utils.column_to_tensors(vector, out_flat)
def multiply_inverse(self, vector): inverse = self._factor.get_damped_inverse(self._damping) out_flat = math_ops.matmul(inverse, utils.tensors_to_column(vector)) return utils.column_to_tensors(vector, out_flat)