class_docstr: A model with deep nested layers.
class_docstr_tok: ["A","model","with","deep","nested","layers","."]
code: def __init__(self):
      super().__init__()
      self.branch1 = nn.Sequential(
          nn.Linear(5, 5),
          nn.Sequential(
              nn.Linear(5, 5),
              nn.Sequential(
                  nn.Linear(5, 5),
                  nn.Sequential(
                      nn.Linear(5, 5),
                      nn.Sequential(
                          nn.Linear(5, 5),
                          nn.Sequential(nn.Linear(5, 3)),
                      ),
                  ),
              ),
          ),
      )
      self.branch2 = nn.Linear(5, 10)
      self.head = UnorderedModel()
      self.example_input_array = torch.rand(2, 5)
  
imports: from collections import OrderedDict
  from typing import Any
  import pytest
  import torch
  import torch.nn
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_0
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.utilities.model_summary.model_summary import LEFTOVER_PARAMS_NAME, NOT_APPLICABLE, UNKNOWN_SIZE, ModelSummary, summarize
  from tests_pytorch.helpers.advanced_models import ParityModuleRNN
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 1 to create a new DeepNestedModel object from inherited base classes: LightningModule with example: obj = DeepNestedModel()