class_docstr: The layer that calculates the loss value as cross-entropy 
  between the result and the standard:
  :math:`loss = -\sum{y_i * \log{z_i}}`,
  where for each i class 
  :math:`y_i` represents the class label, 
  :math:`z_i` is the network response (with softmax applied or not)
  
  :param input_layers: The input layers to be connected. 
      The integer in each tuple specifies the number of the output.
      If not set, the first output will be used.
  :type input_layers: list of object, tuple(object, int)
  :param softmax: Specifies if softmax function should be applied to the result.
  :type softmax: bool, default=True
  :param loss_weight: The multiplier for the loss function value during training.
  :type loss_weight: float, default=1.0
  :param name: The layer name.
  :type name: str, default=None
  
  .. rubric:: Layer inputs:
  
  (1) the network response for which you are calculating the loss.
      It should contain the probability distribution for objects over classes.
      If you are not going to apply softmax in this layer, each element should already be >= 0, 
      and the sum over **Height** * **Width** * **Depth** * **Channels** dimension should be equal to 1.
      The dimensions:
  
      - **BatchLength** * **BatchWidth** * **ListSize** - the number of objects
      - **Height** * **Width** * **Depth** * **Channels** - the number of classes
  
  (2) the correct class labels. Two formats are acceptable:
  
      - The blob contains float data, the dimensions are equal to the first input dimensions. 
        It should be filled with zeros, and only the coordinate of the class to which 
        the corresponding object from the first input belongs should be 1.
      - The blob contains int data with **BatchLength**, **BatchWidth**, and **ListSize**
        equal to these dimensions of the first input, and the other dimensions equal to 1.
        Each object in the blob contains the number of the class 
        to which the corresponding object from the first input belongs.
  
  (3) (optional): the objects' weights.
      The dimensions:
  
      - **BatchLength**, **BatchWidth**, **ListSize** should be the same as for the first input
      - the other dimensions should be 1
  
  .. rubric:: Layer outputs:
  
  The layer has no output.  
class_docstr_tok: ["The","layer","that","calculates","the","loss","value","as","cross-entropy","between","the","result","and","the","standard",":",":","math",":","`","loss","=","-\\sum","{","y_i","*","\\log","{","z_i","}","}","`",",","where","for","each","i","class",":","math",":","`","y_i","`","represents","the","class","label",",",":","math",":","`","z_i","`","is","the","network","response","(","with","softmax","applied","or","not",")",":","param","input_layers",":","The","input","layers","to","be","connected",".","The","integer","in","each","tuple","specifies","the","number","of","the","output",".","If","not","set",",","the","first","output","will","be","used",".",":","type","input_layers",":","list","of","object",",","tuple","(","object",",","int",")",":","param","softmax",":","Specifies","if","softmax","function","should","be","applied","to","the","result",".",":","type","softmax",":","bool",",","default=True",":","param","loss_weight",":","The","multiplier","for","the","loss","function","value","during","training",".",":","type","loss_weight",":","float",",","default=1.0",":","param","name",":","The","layer","name",".",":","type","name",":","str",",","default=None","..","rubric",":",":","Layer","inputs",":","(","1",")","the","network","response","for","which","you","are","calculating","the","loss",".","It","should","contain","the","probability","distribution","for","objects","over","classes",".","If","you","are","not","going","to","apply","softmax","in","this","layer",",","each","element","should","already","be",">","=","0",",","and","the","sum","over","*","*","Height","*","*","*","*","*","Width","*","*","*","*","*","Depth","*","*","*","*","*","Channels","*","*","dimension","should","be","equal","to","1",".","The","dimensions",":","-","*","*","BatchLength","*","*","*","*","*","BatchWidth","*","*","*","*","*","ListSize","*","*","-","the","number","of","objects","-","*","*","Height","*","*","*","*","*","Width","*","*","*","*","*","Depth","*","*","*","*","*","Channels","*","*","-","the","number","of","classes","(","2",")","the","correct","class","labels",".","Two","formats","are","acceptable",":","-","The","blob","contains","float","data",",","the","dimensions","are","equal","to","the","first","input","dimensions",".","It","should","be","filled","with","zeros",",","and","only","the","coordinate","of","the","class","to","which","the","corresponding","object","from","the","first","input","belongs","should","be","1",".","-","The","blob","contains","int","data","with","*","*","BatchLength","*","*",",","*","*","BatchWidth","*","*",",","and","*","*","ListSize","*","*","equal","to","these","dimensions","of","the","first","input",",","and","the","other","dimensions","equal","to","1",".","Each","object","in","the","blob","contains","the","number","of","the","class","to","which","the","corresponding","object","from","the","first","input","belongs",".","(","3",")","(","optional",")",":","the","objects","'","weights",".","The","dimensions",":","-","*","*","BatchLength","*","*",",","*","*","BatchWidth","*","*",",","*","*","ListSize","*","*","should","be","the","same","as","for","the","first","input","-","the","other","dimensions","should","be","1","..","rubric",":",":","Layer","outputs",":","The","layer","has","no","output","."]
docstr: Checks if softmax function should be applied to the result.
          
docstr_tok: ["Checks","if","softmax","function","should","be","applied","to","the","result","."]
code: def apply_softmax(self):
      """Checks if softmax function should be applied to the result."""
      return self._internal.get_apply_softmax()
  
imports: import neoml.PythonWrapper
  from .Dnn import Layer
  from neoml.Utils import check_input_layers
  from abc import ABCMeta, abstractmethod
  import neoml.Blob
label_desc: Use image node_id 2 for calling the CrossEntropyLoss obj's underlying member method code with example usage: obj.apply_softmax() and returns: self