class_docstr: Base class for models
class_docstr_tok: ["Base","class","for","models"]
docstr: Go through the optimization step once with training data in `feed_dict`.
  
  Args:
      sess (object): The model session object.
      feed_dict (dict): Feed values to train the model. This is a dictionary that maps graph elements to values.
  
  Returns:
      list: A list of values, including update operation, total loss, data loss, and merged summary.
docstr_tok: ["Go","through","the","optimization","step","once","with","training","data","in","`","feed_dict","`",".","Args",":","sess","(","object",")",":","The","model","session","object",".","feed_dict","(","dict",")",":","Feed","values","to","train","the","model",".","This","is","a","dictionary","that","maps","graph","elements","to","values",".","Returns",":","list",":","A","list","of","values",",","including","update","operation",",","total","loss",",","data","loss",",","and","merged","summary","."]
code: def train(self, sess, feed_dict):
      """Go through the optimization step once with training data in `feed_dict`.
  
      Args:
          sess (object): The model session object.
          feed_dict (dict): Feed values to train the model. This is a dictionary that maps graph elements to values.
  
      Returns:
          list: A list of values, including update operation, total loss, data loss, and merged summary.
      """
      feed_dict[self.layer_keeps] = self.keep_prob_train
      feed_dict[self.is_train_stage] = True
      return sess.run(
          [
              self.update,
              self.extra_update_ops,
              self.loss,
              self.data_loss,
              self.merged,
          ],
          feed_dict=feed_dict,
      )
  
imports: from os.path import join
  import abc
  import time
  import os
  import numpy
  import tensorflow
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 17 for calling the BaseModel obj's underlying member method code with example usage: obj.train(sess, feed_dict) and returns: sess