class_docstr: The layer that finds the optimal class sequence 
  using the Crf layer output.
  
  :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 name: The layer name.
  :type name: str, default=None
      
  .. rubric:: Layer inputs:
  
  (1) first output of Crf. A blob with int data that contains the optimal
      class sequences.
      The dimensions:
  
      - **BatchLength** is the sequence length
      - **BatchWidth** is the number of sequences in the set
      - **Channels** is the number of classes
      - all other dimensions are 1
  
  (2) second output of Crf. A blob with float data that contains
      non-normalized logarithm of optimal class sequences probabilities.
      The dimensions are the same as for the first input.    
  
  .. rubric:: Layer outputs:
  
  (1) a blob with int data that contains the optimal class sequence.
      The dimensions:
  
      - **BatchLength**, **BatchWidth** are the same as for the inputs
      - the other dimensions are 1
class_docstr_tok: ["The","layer","that","finds","the","optimal","class","sequence","using","the","Crf","layer","output",".",":","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","name",":","The","layer","name",".",":","type","name",":","str",",","default=None","..","rubric",":",":","Layer","inputs",":","(","1",")","first","output","of","Crf",".","A","blob","with","int","data","that","contains","the","optimal","class","sequences",".","The","dimensions",":","-","*","*","BatchLength","*","*","is","the","sequence","length","-","*","*","BatchWidth","*","*","is","the","number","of","sequences","in","the","set","-","*","*","Channels","*","*","is","the","number","of","classes","-","all","other","dimensions","are","1","(","2",")","second","output","of","Crf",".","A","blob","with","float","data","that","contains","non-normalized","logarithm","of","optimal","class","sequences","probabilities",".","The","dimensions","are","the","same","as","for","the","first","input",".","..","rubric",":",":","Layer","outputs",":","(","1",")","a","blob","with","int","data","that","contains","the","optimal","class","sequence",".","The","dimensions",":","-","*","*","BatchLength","*","*",",","*","*","BatchWidth","*","*","are","the","same","as","for","the","inputs","-","the","other","dimensions","are","1"]
code: def __init__(self, input_layers, name=None):
      if type(input_layers) is PythonWrapper.BestSequence:
          super().__init__(input_layers)
          return
  
      layers, outputs = check_input_layers(input_layers, 2)
  
      internal = PythonWrapper.BestSequence(str(name), layers, outputs)
      super().__init__(internal)
  
imports: import neoml.PythonWrapper
  from .Dnn import Layer
  from neoml.Utils import check_input_layers
label_desc: Use image node_id 1 to create a new BestSequence object from inherited base classes: Layer with example: obj = BestSequence(input_layers, name)