code: def test_flops_params(self):
      class Model1(nn.Module):
          def __init__(self):
              super(Model1, self).__init__()
              self.conv = nn.Conv2d(3, 5, 1, 1)
              self.bn = nn.BatchNorm2d(5)
              self.relu = nn.LeakyReLU()
              self.linear = nn.Linear(20, 10)
              self.upsample = nn.UpsamplingBilinear2d(size=2)
              self.pool = nn.AdaptiveAvgPool2d((2, 2))
  
          def forward(self, x):
              x = self.conv(x)
              x = self.bn(x)
              x = self.relu(x)
              x = self.upsample(x)
              x = self.pool(x)
              x = x.view(x.size(0), -1)
              x = self.linear(x)
              return x
  
      class Model2(nn.Module):
          def __init__(self):
              super(Model2, self).__init__()
              self.conv = nn.Conv2d(3, 5, 1, 1)
              self.conv2 = nn.Conv2d(5, 5, 1, 1)
  
          def forward(self, x):
              x = self.conv(x)
              for _ in range(5):
                  x = self.conv2(x)
              return x
  
      flops, params, results = count_flops_params(
          Model1(), (1, 3, 2, 2), mode="full", verbose=False
      )
      assert (flops, params) == (610, 240)
  
      flops, params, results = count_flops_params(
          Model2(), (1, 3, 2, 2), verbose=False
      )
      assert (flops, params) == (560, 50)
  
      from torchvision.models import resnet50
  
      flops, params, results = count_flops_params(
          resnet50(), (1, 3, 224, 224), verbose=False
      )
      assert (flops, params) == (4089184256, 25503912)
  
file_path: auptimizer/tests/compression/test_compression_utils.py
imports: import os
  import unittest
  from unittest import TestCase, main
  import torch
  import torch.nn
  import torchvision.models
  import numpy
  from aup.compression.torch import L1FilterPruner
  from aup.compression.torch.utils.shape_dependency import ChannelDependency
  from aup.compression.torch.utils.mask_conflict import fix_mask_conflict
  from aup.compression.torch.utils.counter import count_flops_params
label_desc: Use image node_id 4 for calling the AnalysisUtilsTest obj's underlying member method code with example usage: obj.test_flops_params() and returns: x, x