def compute_position_bias(self, inputs=None):
    'T5相对位置编码\n        '
    if (self.position_bias is None):
        x = inputs
        p = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=True, embeddings_initializer=self.initializer, name='Encoder-Embedding-Relative-Position')
        self.position_bias = p
    return self.position_bias
T5相对位置编码
def compute_position_bias(self, inputs=None):
    '\n        '
    if (self.position_bias is None):
        x = inputs
        p = self.apply(inputs=[x, x], layer=RelativePositionEmbeddingT5, input_dim=32, output_dim=self.num_attention_heads, bidirectional=True, embeddings_initializer=self.initializer, name='Encoder-Embedding-Relative-Position')
        self.position_bias = p
    return self.position_bias