import tensorflow as tf

    self.num_bilstm=num_bilstm
    self.lstm_size=lstm_size
    self.bilstm_dropout_rate=bilstm_dropout_rate

  @classmethod
  def from_dict(cls, json_object):
    """Constructs a `Config` from a Python dictionary of parameters."""
    config = Config(vocab_size=None)
    for (key, value) in six.iteritems(json_object):
      config.__dict__[key] = value
    return config

  @classmethod
  def from_json_file(cls, json_file):
    """Constructs a `Config` from a json file of parameters."""
    with tf.gfile.GFile(json_file, "r") as reader:
      text = reader.read()
    return cls.from_dict(json.loads(text))

  def to_dict(self):
    """Serializes this instance to a Python dictionary."""
    output = copy.deepcopy(self.__dict__)
    return output

  def to_json_string(self):
    """Serializes this instance to a JSON string."""
    return json.dumps(self.to_dict(), indent=2, sort_keys=True) + "\n"


def create_model(config, is_training, input_ids, input_mask, segment_ids,
