class_docstr: A model with precalculated total params size in MB for FP16 and FP32.
class_docstr_tok: ["A","model","with","precalculated","total","params","size","in","MB","for","FP16","and","FP32","."]
code: def __init__(self, precision: int = 32):
      super().__init__()
      # 32K params
      self.layer = nn.Linear(32, 1000, bias=False)
      # 218K params
      self.layer1 = nn.Linear(1000, 218, bias=False)
      # calculate model size based on precision.
      self.pre_calculated_model_size = 1.0 / (32 / precision)
  
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 PreCalculatedModel object from inherited base classes: BoringModel with example: obj = PreCalculatedModel(precision)