class_docstr: An implementation of DeepDTA model based on BaseDTATrainer.
  Args:
      drug_encoder: drug CNN encoder.
      target_encoder: target CNN encoder.
      decoder: drug-target MLP decoder.
      lr: learning rate.
class_docstr_tok: ["An","implementation","of","DeepDTA","model","based","on","BaseDTATrainer",".","Args",":","drug_encoder",":","drug","CNN","encoder",".","target_encoder",":","target","CNN","encoder",".","decoder",":","drug-target","MLP","decoder",".","lr",":","learning","rate","."]
code: def validation_step(self, valid_batch, batch_idx):
      x_drug, x_target, y = valid_batch
      y_pred = self(x_drug, x_target)
      loss = F.mse_loss(y_pred, y.view(-1, 1))
      if self.ci_metric:
          ci = concord_index(y, y_pred)
          self.log("valid_ci", ci, on_epoch=True, on_step=False)
      self.log("valid_loss", loss, on_epoch=True, on_step=False)
      return loss
  
file_path: pykale/kale/pipeline/deepdta.py
imports: import pytorch_lightning
  import torch
  from torch.nn import functional
  from kale.evaluate.metrics import concord_index
label_desc: Use image node_id 3 for calling the DeepDTATrainer obj's underlying member method code with example usage: obj.validation_step(valid_batch, batch_idx) and returns: loss