def compute_context_vector(self, prev_state, inputs, precomputed_values=None, mask=None):
precomputed_values = precomputed_values if precomputed_values else self.precompute(inputs)<EOL>align_weights = self.compute_alignments(prev_state, precomputed_values, mask)<EOL>context_vector = T.sum(align_weights[:, :, None] * inputs, axis=<NUM_LIT:1>)<EOL>return context_vector<EOL>
Compute the context vector with soft attention.