def variable_mapping(self):
    '映射到TF版GPT2权重格式\n        '
    mapping = super(GPT2, self).variable_mapping()
    mapping = {k: [i.replace('output/LayerNorm', 'input/LayerNorm') for i in v] for (k, v) in mapping.items()}
    mapping['Output-Norm'] = ['gpt/output/LayerNorm/beta', 'gpt/output/LayerNorm/gamma']
    return mapping
映射到TF版GPT2权重格式
def variable_mapping(self):
    '\n        '
    mapping = super(GPT2, self).variable_mapping()
    mapping = {k: [i.replace('output/LayerNorm', 'input/LayerNorm') for i in v] for (k, v) in mapping.items()}
    mapping['Output-Norm'] = ['gpt/output/LayerNorm/beta', 'gpt/output/LayerNorm/gamma']
    return mapping