class_docstr: Model provides an Estimator-like API similar to Keras.
docstr: Prints a summary of the network. The representation is module dependent,
  if a library provides a representation, it will be used, else elegy will
  define its own.
  
  Arguments:
      x: A sample of inputs to the network.
      depth: The level number of nested level which will be showed.
          Information about summaries from modules deeper than `depth`
          will be aggregated together.
      return_repr: If True, the summary will be returned as a string and will not be printed.
      eval_shape: If True, jax.eval_shape is used to calculate all shapes, this avoids actually
          running the computation as only shapes are calculated (turn off if trying to debug).
docstr_tok: ["Prints","a","summary","of","the","network",".","The","representation","is","module","dependent",",","if","a","library","provides","a","representation",",","it","will","be","used",",","else","elegy","will","define","its","own",".","Arguments",":","x",":","A","sample","of","inputs","to","the","network",".","depth",":","The","level","number","of","nested","level","which","will","be","showed",".","Information","about","summaries","from","modules","deeper","than","`","depth","`","will","be","aggregated","together",".","return_repr",":","If","True",",","the","summary","will","be","returned","as","a","string","and","will","not","be","printed",".","eval_shape",":","If","True",",","jax.eval_shape","is","used","to","calculate","all","shapes",",","this","avoids","actually","running","the","computation","as","only","shapes","are","calculated","(","turn","off","if","trying","to","debug",")","."]
code: def summary(
      self,
      inputs: tp.Any = tx.MISSING,
      depth: int = 2,
      return_repr: bool = False,
  ) -> tp.Optional[str]:
      """
      Prints a summary of the network. The representation is module dependent,
      if a library provides a representation, it will be used, else elegy will
      define its own.
  
      Arguments:
          x: A sample of inputs to the network.
          depth: The level number of nested level which will be showed.
              Information about summaries from modules deeper than `depth`
              will be aggregated together.
          return_repr: If True, the summary will be returned as a string and will not be printed.
          eval_shape: If True, jax.eval_shape is used to calculate all shapes, this avoids actually
              running the computation as only shapes are calculated (turn off if trying to debug).
      """
      model = self.local()
  
      assert model.module is not None
  
      if not model.initialized:
          if inputs is tx.MISSING:
              raise ValueError(
                  "`inputs` is required to print the summary of uninitialized Models"
              )
  
          model.init_on_batch(inputs)
  
      summary = model.module.tabulate(
          inputs=inputs,
          depth=depth,
      )
  
      if return_repr:
          return summary
      else:
          print(summary)
  
imports: import typing
  import flax
  import jax
  import jax.numpy
  import numpy
  import treex
  from optax import GradientTransformation
  from elegy import types, utils
  from elegy.model.model_base import ModelBase
  from elegy.model.model_core import GradStepOutput, PredStepOutput, TestStepOutput, TrainStepOutput
label_desc: Use image node_id 12 for calling the Model obj's underlying member method code with example usage: obj.summary(inputs, depth, return_repr) and returns: summary