class_docstr: Configuration for `BertModel`.
class_docstr_tok: ["Configuration","for","`","BertModel","`","."]
docstr: Constructs a `BertConfig` from a Python dictionary of parameters.
code: def from_dict(cls, json_object):
      """Constructs a `BertConfig` from a Python dictionary of parameters."""
      # Dictionary for compatibility for tf BertConfig files.
      hparam_name_conversion = {
          "hidden_size": "d_model",
          "num_hidden_layers": "num_blocks",
          "num_attention_heads": "attention_num_heads",
          "intermediate_size": "feedforward_intermediate_size",
          "hidden_act": "feedforward_intermediate_act",
          "hidden_dropout_prob": "layer_output_dropout_prob",
      }
      config = BertConfig(vocab_size=None)
      for key, value in six.iteritems(json_object):
          config.__dict__[hparam_name_conversion.get(key, key)] = value
      return config
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import copy
  import json
  import math
  import re
  import mesh_tensorflow
  import mesh_tensorflow.transformer.moe
  import six
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the BertConfig obj's underlying member method code with example usage: obj.from_dict(cls, json_object) and returns: config