def generate_messages(self, params: T_P) -> AttentionMessages: return AttentionMessages( expand_to_batch_size(self._key, self.batch_size), self.module(self._param_extractor(params)), None)
def generate_messages(self, params: T_P) -> AttentionMessages: return AttentionMessages( None, None, expand_to_batch_size(self._query, self.batch_size))
def generate_messages(self, params: T_P) -> AttentionMessages: result = self.unit.generate_messages(params) return AttentionMessages(result.key, result.value, None)