class_docstr: The base class for a network layer.
      
class_docstr_tok: ["The","base","class","for","a","network","layer","."]
docstr: Connects this layer to another.
  
  :param neoml.Dnn.Layer layer: the layer to which this one will be connected.
  
  :param output_index: the number of the `layer`'s output to be connected.
  :type output_index: int, >=0, default=0
  
  :param input_index: the number of this layer's input to be connected.
  :type input_index: int, >=0, default=0
docstr_tok: ["Connects","this","layer","to","another",".",":","param","neoml.Dnn.Layer","layer",":","the","layer","to","which","this","one","will","be","connected",".",":","param","output_index",":","the","number","of","the","`","layer","`","'s","output","to","be","connected",".",":","type","output_index",":","int",",",">","=0",",","default=0",":","param","input_index",":","the","number","of","this","layer","'s","input","to","be","connected",".",":","type","input_index",":","int",",",">","=0",",","default=0"]
code: def connect(self, layer, output_index=0, input_index=0):
      """Connects this layer to another.
  
      :param neoml.Dnn.Layer layer: the layer to which this one will be connected.
  
      :param output_index: the number of the `layer`'s output to be connected.
      :type output_index: int, >=0, default=0
  
      :param input_index: the number of this layer's input to be connected.
      :type input_index: int, >=0, default=0
      """
      if not isinstance(layer, Layer):
          raise ValueError(
              "The `layer` is expected to be neoml.Dnn.Layer"
          )
      if output_index < 0:
          raise ValueError("The `output_index` must be >= 0")
      if input_index < 0:
          raise ValueError("The `input_index` must be >= 0")
      self._internal.connect(layer._internal, output_index, input_index)
  
imports: import neoml.PythonWrapper
  import neoml.Random
label_desc: Use image node_id 8 for calling the Layer obj's underlying member method code with example usage: obj.connect(layer, output_index, input_index) without return types