BERT主体模型modeling.py学习记录
```python 1 、配置 class BertConfig ( object ) : """Configuration for `BertModel`.""" def __init__ ( self , vocab_size , hidden_size = 768 , num_hidden_layers = 12 , num_attention_heads = 12 , # attention的头数 class BertConfig ( object ) : """Configuration for `BertModel`.""" def __init__ ( self , vocab_size , # 词典大小 hidden_size = 768 , # 隐层神经元个数 num_hidden_layers = 12 , # Transformer的层数12 num_attention_heads = 12 , attention的头数 intermediate_size = 3072 , # 中间层神经元个数 hidden_act = "gelu" , # 激活函数 hidden_dropout_prob = 0.1 , # 隐层dropout的比例 attention_probs_dropout_prob = 0.1 , # attention里面dropout比例