code: def __init__(self, config, params):
      super().__init__(config)
      self.max_seq_len = params.max_seq_length
      self.seq_tag_size = params.seq_tag_size
      self.rel_num = params.rel_num
  
      # pretrain model
      self.bert = BertModel(config)
      # sequence tagging
      self.sequence_tagging_sub = MultiNonLinearClassifier(
          config.hidden_size * 2, self.seq_tag_size, params.drop_prob
      )
      self.sequence_tagging_obj = MultiNonLinearClassifier(
          config.hidden_size * 2, self.seq_tag_size, params.drop_prob
      )
      self.sequence_tagging_sum = SequenceLabelForSO(
          config.hidden_size, self.seq_tag_size, params.drop_prob
      )
      # global correspondence
      self.global_corres = MultiNonLinearClassifier(
          config.hidden_size * 2, 1, params.drop_prob
      )
      # relation judgement
      self.rel_judgement = MultiNonLinearClassifier(
          config.hidden_size, params.rel_num, params.drop_prob
      )
      self.rel_embedding = nn.Embedding(
          params.rel_num, config.hidden_size
      )
  
      self.init_weights()
  
file_path: DeepKE/example/triple/PRGC/model.py
imports: from collections import Counter
  import torch
  import torch.nn
  from transformers import BertPreTrainedModel, BertModel
label_desc: Use image node_id 1 to create a new BertForRE object from inherited base classes: BertPreTrainedModel with example: obj = BertForRE(config, params)