code: def test_bn_relu():
      net = nn.Sequential(nn.BatchNorm2d(3, affine=True), nn.ReLU())
  
      profiler = FlopsParamsProfiler(net, torch.randn(2, 3, 12, 12))
      assert profiler.profile({}).flops == 3 * 144 * (4 + 1)
      assert profiler.profile({}).params == 6
  
      profiler = FlopsParamsProfiler(
          net, torch.randn(1, 3, 12, 12), count_normalization=False
      )
      assert profiler.profile({}).flops == 3 * 144 * 1
      assert profiler.profile({}).params == 0
  
      profiler = FlopsParamsProfiler(
          net, torch.randn(3, 3, 12, 12), count_activation=False
      )
      assert profiler.profile({}).flops == 3 * 144 * 4
  
file_path: nni/test/ut/nas/profiler/test_flops.py
imports: import pytest
  import torch
  from torch import nn
  import nni
  import nni.nas.nn.pytorch
  from nni.mutable import Categorical
  from nni.nas.profiler.pytorch.flops import FlopsParamsProfiler, FlopsProfiler, NumParamsProfiler, FlopsResult, register_flops_formula
  from ut.nas.nn.models import MODELS
label_desc: Use image node_id 3 for calling a global function with example usage: test_bn_relu() without return types