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"]
code: def __init__(self, math_engine, random=None):
      if not isinstance(math_engine, neoml.MathEngine.MathEngine):
          raise ValueError(
              "The `math_engine` must be a neoml.MathEngine.MathEngine."
          )
  
      if random is None:
          random = neoml.Random.Random()
  
      if not isinstance(random, neoml.Random.Random):
          raise ValueError(
              "The `random_generator` must be a neoml.Random.Random."
          )
  
      super().__init__(random, math_engine._internal)
  
imports: import neoml.PythonWrapper
  import neoml.Random
label_desc: Use image node_id 1 to create a new Dnn object from inherited base classes: PythonWrapper with example: obj = Dnn(math_engine, random)