class_docstr: Basic class of models
  
  Attributes:
      hparams (HParams): A HParams object, holds the entire set of hyperparameters.
      train_iterator (object): An iterator to load the data in training steps.
      test_iterator (object): An iterator to load the data in testing steps.
      graph (object): An optional graph.
      seed (int): Random seed.
class_docstr_tok: ["Basic","class","of","models","Attributes",":","hparams","(","HParams",")",":","A","HParams","object",",","holds","the","entire","set","of","hyperparameters",".","train_iterator","(","object",")",":","An","iterator","to","load","the","data","in","training","steps",".","test_iterator","(","object",")",":","An","iterator","to","load","the","data","in","testing","steps",".","graph","(","object",")",":","An","optional","graph",".","seed","(","int",")",":","Random","seed","."]
docstr: Make loss function, consists of data loss and regularization loss
  
  Returns:
      object: Loss function or loss function name
docstr_tok: ["Make","loss","function",",","consists","of","data","loss","and","regularization","loss","Returns",":","object",":","Loss","function","or","loss","function","name"]
code: def _get_loss(self):
      """Make loss function, consists of data loss and regularization loss
  
      Returns:
          object: Loss function or loss function name
      """
      if self.hparams.loss == "cross_entropy_loss":
          data_loss = "categorical_crossentropy"
      elif self.hparams.loss == "log_loss":
          data_loss = "binary_crossentropy"
      else:
          raise ValueError(
              "this loss not defined {0}".format(self.hparams.loss)
          )
      return data_loss
  
imports: import abc
  import time
  import numpy
  from tqdm import tqdm
  import tensorflow
  from tensorflow.compat.v1 import keras
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 5 for calling the BaseModel obj's underlying member method code with example usage: obj._get_loss() and returns: data_loss