class_docstr: Neural network implementation.
  A neural network is a directed graph consisting of layers that perform
  calculations on data blobs. It starts with source layers and ends with 
  sink layers.
  
  :param neoml.MathEngine.MathEngine math_engine: The math engine that will perform calculations.
  :param random: The random numbers generator to be used for training and initialization.
  :type random: object, default=None 
class_docstr_tok: ["Neural","network","implementation",".","A","neural","network","is","a","directed","graph","consisting","of","layers","that","perform","calculations","on","data","blobs",".","It","starts","with","source","layers","and","ends","with","sink","layers",".",":","param","neoml.MathEngine.MathEngine","math_engine",":","The","math","engine","that","will","perform","calculations",".",":","param","random",":","The","random","numbers","generator","to","be","used","for","training","and","initialization",".",":","type","random",":","object",",","default=None"]
docstr: Deletes a layer from the network.
  
  :param layer: the layer to be deleted, or its name
  :type layer: neoml.Dnn.Layer or str
docstr_tok: ["Deletes","a","layer","from","the","network",".",":","param","layer",":","the","layer","to","be","deleted",",","or","its","name",":","type","layer",":","neoml.Dnn.Layer","or","str"]
code: def delete_layer(self, layer):
      """Deletes a layer from the network.
  
      :param layer: the layer to be deleted, or its name
      :type layer: neoml.Dnn.Layer or str
      """
      if type(layer) is str:
          self._delete_layer(layer)
      elif isinstance(layer, Layer):
          self._delete_layer(layer.name)
      else:
          raise ValueError(
              "The `layer` is expected to be `str` or `neoml.Dnn.Layer`"
          )
  
imports: import neoml.PythonWrapper
  import neoml.Random
label_desc: Use image node_id 15 for calling the Dnn obj's underlying member method code with example usage: obj.delete_layer(layer) without return types