示例#1
0
 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)
示例#2
0
 def generate_messages(self, params: T_P) -> AttentionMessages:
     return AttentionMessages(
         None, None, expand_to_batch_size(self._query, self.batch_size))
示例#3
0
 def generate_messages(self, params: T_P) -> AttentionMessages:
     result = self.unit.generate_messages(params)
     return AttentionMessages(result.key, result.value, None)