class_docstr: Base class for models
class_docstr_tok: ["Base","class","for","models"]
code: def _l1_loss(self):
      l1_loss = tf.zeros([1], dtype=tf.float32)
      # embedding_layer l2 loss
      for param in self.embed_params:
          l1_loss = tf.add(
              l1_loss,
              tf.multiply(
                  self.hparams.embed_l1, tf.norm(tensor=param, ord=1)
              ),
          )
      params = self.layer_params
      for param in params:
          l1_loss = tf.add(
              l1_loss,
              tf.multiply(
                  self.hparams.layer_l1, tf.norm(tensor=param, ord=1)
              ),
          )
      return l1_loss
  
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 7 for calling the BaseModel obj's underlying member method code with example usage: obj._l1_loss() and returns: l1_loss