class_docstr: Multiclass Negative Log-Likelihood loss.
  
  Introduced in :cite:`chen2015`, this loss can be used when both the subject and objects are corrupted
  (to use it, pass ``corrupt_sides=['s,o']`` in the embedding model parameters).
  
  This loss was re-engineered in :cite:`kadlecBK17` where only the object was corrupted to get improved
  performance (to use it in this way pass ``corrupt_sides ='o'`` in the embedding model parameters).
  
  .. math::
  
      \mathcal{L(X)} = -\sum_{x_{e_1,e_2,r_k} \in X} log\,p(e_2|e_1,r_k)
       -\sum_{x_{e_1,e_2,r_k} \in X} log\,p(e_1|r_k, e_2)
  
  Example
  -------
  >>> import ampligraph.latent_features.loss_functions as lfs
  >>> loss = lfs.NLLMulticlass({'reduction': 'mean'})
  >>> isinstance(loss, lfs.NLLMulticlass)
  True
  
  >>> loss = lfs.get('multiclass_nll')
  >>> isinstance(loss, lfs.NLLMulticlass)
  True
class_docstr_tok: ["Multiclass","Negative","Log-Likelihood","loss",".","Introduced","in",":","cite",":","`","chen2015","`",",","this","loss","can","be","used","when","both","the","subject","and","objects","are","corrupted","(","to","use","it",",","pass","``","corrupt_sides=","[","'s",",","o","'","]","``","in","the","embedding","model","parameters",")",".","This","loss","was","re-engineered","in",":","cite",":","`","kadlecBK17","`","where","only","the","object","was","corrupted","to","get","improved","performance","(","to","use","it","in","this","way","pass","``","corrupt_sides","=","'","o","'","``","in","the","embedding","model","parameters",")",".","..","math",":",":","\\mathcal","{","L","(","X",")","}","=","-\\sum_","{","x_","{","e_1",",","e_2",",","r_k","}","\\in","X","}","log\\",",","p","(","e_2|e_1",",","r_k",")","-\\sum_","{","x_","{","e_1",",","e_2",",","r_k","}","\\in","X","}","log\\",",","p","(","e_1|r_k",",","e_2",")","Example","--","--","--","-",">",">",">","import","ampligraph.latent_features.loss_functions","as","lfs",">",">",">","loss","=","lfs.NLLMulticlass","(","{","'reduction","'",":","'mean","'","}",")",">",">",">","isinstance","(","loss",",","lfs.NLLMulticlass",")","True",">",">",">","loss","=","lfs.get","(","'multiclass_nll","'",")",">",">",">","isinstance","(","loss",",","lfs.NLLMulticlass",")","True"]
docstr: Initialize the loss.
  
  Parameters
  ----------
  loss_params : dict
      Dictionary of loss-specific hyperparams:
  
      - `"reduction"`: (str) - Specifies whether to `"sum"` or take the `"mean"` of loss per sample w.r.t.              corruption (default: `"sum"`).
docstr_tok: ["Initialize","the","loss",".","Parameters","--","--","--","--","--","loss_params",":","dict","Dictionary","of","loss-specific","hyperparams",":","-","`","``","reduction","''","`",":","(","str",")","-","Specifies","whether","to","`","``","sum","''","`","or","take","the","`","``","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 loss-specific hyperparams:
  
              - `"reduction"`: (str) - Specifies whether to `"sum"` or take the `"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 NLLMulticlass object from inherited base classes: Loss with example: obj = NLLMulticlass(loss_params, verbose)