class_docstr: Negative Log-Likelihood loss.
  
  As described in :cite:`trouillon2016complex`.
  
  .. math::
  
      \mathcal{L}(\Theta) = \sum_{t \in \mathcal{G} \cup \mathcal{C}}log(1 + exp(-y \, f_{model}(t;\Theta)))
  
  where :math:`y \in \{-1, 1\}` is the label of the statement, :math:`\mathcal{G}` is the set of positives,
  :math:`\mathcal{C}` is the set of corruptions and :math:`f_{model}(t;\Theta)` is the model-specific scoring function.
  
  Example
  -------
  >>> import ampligraph.latent_features.loss_functions as lfs
  >>> loss = lfs.NLLLoss({'reduction': 'mean'})
  >>> isinstance(loss, lfs.NLLLoss)
  True
  
  >>> loss = lfs.get('nll')
  >>> isinstance(loss, lfs.NLLLoss)
  True
class_docstr_tok: ["Negative","Log-Likelihood","loss",".","As","described","in",":","cite",":","`","trouillon2016complex","`",".","..","math",":",":","\\mathcal","{","L","}","(","\\Theta",")","=","\\sum_","{","t","\\in","\\mathcal","{","G","}","\\cup","\\mathcal","{","C","}","}","log","(","1","+","exp","(","-y","\\",",","f_","{","model","}","(","t",";","\\Theta",")",")",")","where",":","math",":","`","y","\\in","\\","{","-1",",","1\\","}","`","is","the","label","of","the","statement",",",":","math",":","`","\\mathcal","{","G","}","`","is","the","set","of","positives",",",":","math",":","`","\\mathcal","{","C","}","`","is","the","set","of","corruptions","and",":","math",":","`","f_","{","model","}","(","t",";","\\Theta",")","`","is","the","model-specific","scoring","function",".","Example","--","--","--","-",">",">",">","import","ampligraph.latent_features.loss_functions","as","lfs",">",">",">","loss","=","lfs.NLLLoss","(","{","'reduction","'",":","'mean","'","}",")",">",">",">","isinstance","(","loss",",","lfs.NLLLoss",")","True",">",">",">","loss","=","lfs.get","(","'nll","'",")",">",">",">","isinstance","(","loss",",","lfs.NLLLoss",")","True"]
docstr: Initialize the loss..
  
  Parameters
  ----------
  loss_params : dict
      Dictionary of hyperparams. No hyperparameters are required for this loss except for `"reduction"`.
  
      - `"reduction"`: (str) - Specifies whether to `"sum"` or take `"mean"` of loss per sample w.r.t.             corruption (default:`"sum"`).
docstr_tok: ["Initialize","the","loss","..","Parameters","--","--","--","--","--","loss_params",":","dict","Dictionary","of","hyperparams",".","No","hyperparameters","are","required","for","this","loss","except","for","`","``","reduction","''","`",".","-","`","``","reduction","''","`",":","(","str",")","-","Specifies","whether","to","`","``","sum","''","`","or","take","`","``","mean","''","`","of","loss","per","sample","w.r.t",".","corruption","(","default",":","`","``","sum","''","`",")","."]
code: def __init__(self, loss_params={}, verbose=False):
      """Initialize the loss..
  
          Parameters
          ----------
          loss_params : dict
              Dictionary of hyperparams. No hyperparameters are required for this loss except for `"reduction"`.
  
              - `"reduction"`: (str) - Specifies whether to `"sum"` or take `"mean"` of loss per sample w.r.t. \
              corruption (default:`"sum"`).
          """
      super().__init__(loss_params, verbose)
  
imports: import abc
  import logging
  import six
  import tensorflow
  from tensorflow.python.keras import metrics
  from tensorflow.python.keras.utils import losses_utils
  from tensorflow.python.ops import math_ops
label_desc: Use image node_id 1 to create a new NLLLoss object from inherited base classes: Loss with example: obj = NLLLoss(loss_params, verbose)