docstr: This method is responsible for consuming a number of possible nodes from the graph and calculating loss from
  those nodes.
  
  The following parameters are always passed in
  :param tf_prediction_serial: tf.Tensor
  The recommendation scores as a Tensor of shape [n_samples, 1]
  :param tf_interactions_serial: tf.Tensor
  The sample interactions corresponding to tf_prediction_serial as a Tensor of shape [n_samples, 1]
  :param tf_interactions: tf.SparseTensor
  The sample interactions as a SparseTensor of shape [n_users, n_items]
  :param tf_n_users: tf.placeholder
  The number of users in tf_interactions
  :param tf_n_items: tf.placeholder
  The number of items in tf_interactions
  
  The following parameters are passed in if is_dense is True
  :param tf_prediction: tf.Tensor
  The recommendation scores as a Tensor of shape [n_users, n_items]
  :param tf_rankings: tf.Tensor
  The item ranks as a Tensor of shape [n_users, n_items]
  
  The following parameters are passed in if is_sample_based is True
  :param tf_sample_predictions: tf.Tensor
  The recommendation scores of a sample of items of shape [n_users, n_sampled_items]
  :param tf_n_sampled_items: tf.placeholder
  The number of items per user in tf_sample_predictions
  
  :return: tf.Tensor
  The loss value.
docstr_tok: ["This","method","is","responsible","for","consuming","a","number","of","possible","nodes","from","the","graph","and","calculating","loss","from","those","nodes",".","The","following","parameters","are","always","passed","in",":","param","tf_prediction_serial",":","tf.Tensor","The","recommendation","scores","as","a","Tensor","of","shape","[","n_samples",",","1","]",":","param","tf_interactions_serial",":","tf.Tensor","The","sample","interactions","corresponding","to","tf_prediction_serial","as","a","Tensor","of","shape","[","n_samples",",","1","]",":","param","tf_interactions",":","tf.SparseTensor","The","sample","interactions","as","a","SparseTensor","of","shape","[","n_users",",","n_items","]",":","param","tf_n_users",":","tf.placeholder","The","number","of","users","in","tf_interactions",":","param","tf_n_items",":","tf.placeholder","The","number","of","items","in","tf_interactions","The","following","parameters","are","passed","in","if","is_dense","is","True",":","param","tf_prediction",":","tf.Tensor","The","recommendation","scores","as","a","Tensor","of","shape","[","n_users",",","n_items","]",":","param","tf_rankings",":","tf.Tensor","The","item","ranks","as","a","Tensor","of","shape","[","n_users",",","n_items","]","The","following","parameters","are","passed","in","if","is_sample_based","is","True",":","param","tf_sample_predictions",":","tf.Tensor","The","recommendation","scores","of","a","sample","of","items","of","shape","[","n_users",",","n_sampled_items","]",":","param","tf_n_sampled_items",":","tf.placeholder","The","number","of","items","per","user","in","tf_sample_predictions",":","return",":","tf.Tensor","The","loss","value","."]
code: def connect_loss_graph(
      self,
      tf_prediction_serial,
      tf_interactions_serial,
      tf_interactions,
      tf_n_users,
      tf_n_items,
      tf_prediction,
      tf_rankings,
      tf_sample_predictions,
      tf_n_sampled_items,
  ):
      """
      This method is responsible for consuming a number of possible nodes from the graph and calculating loss from
      those nodes.
  
      The following parameters are always passed in
      :param tf_prediction_serial: tf.Tensor
      The recommendation scores as a Tensor of shape [n_samples, 1]
      :param tf_interactions_serial: tf.Tensor
      The sample interactions corresponding to tf_prediction_serial as a Tensor of shape [n_samples, 1]
      :param tf_interactions: tf.SparseTensor
      The sample interactions as a SparseTensor of shape [n_users, n_items]
      :param tf_n_users: tf.placeholder
      The number of users in tf_interactions
      :param tf_n_items: tf.placeholder
      The number of items in tf_interactions
  
      The following parameters are passed in if is_dense is True
      :param tf_prediction: tf.Tensor
      The recommendation scores as a Tensor of shape [n_users, n_items]
      :param tf_rankings: tf.Tensor
      The item ranks as a Tensor of shape [n_users, n_items]
  
      The following parameters are passed in if is_sample_based is True
      :param tf_sample_predictions: tf.Tensor
      The recommendation scores of a sample of items of shape [n_users, n_sampled_items]
      :param tf_n_sampled_items: tf.placeholder
      The number of items per user in tf_sample_predictions
  
      :return: tf.Tensor
      The loss value.
      """
      pass
  
imports: import abc
  import tensorflow
label_desc: Use image node_id 1 for calling the AbstractLossGraph obj's underlying member method code with example usage: obj.connect_loss_graph(tf_prediction_serial, tf_interactions_serial, tf_interactions, tf_n_users, tf_n_items, tf_prediction, tf_rankings, tf_sample_predictions, tf_n_sampled_items) without return types