def build(self, attention_caches=None, layer_norm_cond=None, layer_norm_cond_hidden_size=None, layer_norm_cond_hidden_act=None, additional_input_layers=None, **kwargs):
    '模型构建函数\n        attention_caches：为Attention的K,V的缓存序列字典，格式为\n                         {Attention层名: [K缓存, V缓存]}；\n        layer_norm_*系列参数：实现Conditional Layer Normalization时使用，\n                            用来实现以“固定长度向量”为条件的条件Bert。\n        '
    if self.built:
        return None
    inputs = self.get_inputs()
    self.set_inputs(inputs, additional_input_layers)
    self.attention_caches = (attention_caches or {})
    self.layer_norm_conds = [layer_norm_cond, layer_norm_cond_hidden_size, (layer_norm_cond_hidden_act or 'linear')]
    outputs = self.call(inputs)
    self.set_outputs(outputs)
    self.model = Model(self.inputs, self.outputs, name=self.name)
    self.built = True
模型构建函数
attention_caches：为Attention的K,V的缓存序列字典，格式为
                 {Attention层名: [K缓存, V缓存]}；
layer_norm_*系列参数：实现Conditional Layer Normalization时使用，
                    用来实现以“固定长度向量”为条件的条件Bert。
def build(self, attention_caches=None, layer_norm_cond=None, layer_norm_cond_hidden_size=None, layer_norm_cond_hidden_act=None, additional_input_layers=None, **kwargs):
    '模型构建函数\n        attention_caches：为Attention的K,V的缓存序列字典，格式为\n                         {Attention层名: [K缓存, V缓存]}；\n        layer_norm_*系列参数：实现Conditional Layer Normalization时使用，\n                            用来实现以“固定长度向量”为条件的条件Bert。\n        '
    if self.built:
        return None
    inputs = self.get_inputs()
    self.set_inputs(inputs, additional_input_layers)
    self.attention_caches = (attention_caches or {})
    self.layer_norm_conds = [layer_norm_cond, layer_norm_cond_hidden_size, (layer_norm_cond_hidden_act or 'linear')]
    outputs = self.call(inputs)
    self.set_outputs(outputs)
    self.model = Model(self.inputs, self.outputs, name=self.name)
    self.built = True