code: def before_multimodal_train(self):
      optimizer_grouped_parameters = []
      params = {"lr": self.args.lr, "weight_decay": 1e-2}
      params["params"] = []
      for name, param in self.model.named_parameters():
          if "model" in name:
              params["params"].append(param)
      optimizer_grouped_parameters.append(params)
  
      self.optimizer = optim.AdamW(
          optimizer_grouped_parameters, lr=self.args.lr
      )
      self.scheduler = get_linear_schedule_with_warmup(
          optimizer=self.optimizer,
          num_warmup_steps=self.args.warmup_ratio
          * self.train_num_steps,
          num_training_steps=self.train_num_steps,
      )
  
file_path: DeepKE/src/deepke/relation_extraction/multimodal/modules/train.py
imports: import torch
  from torch import optim
  from tqdm import tqdm
  from sklearn.metrics import classification_report
  from transformers.optimization import get_linear_schedule_with_warmup
  from .metrics import eval_result
label_desc: Use image node_id 7 for calling the Trainer obj's underlying member method code with example usage: obj.before_multimodal_train() without return types