code: def test_parameter_as_need_grad():
      import nnabla as nn
      import nnabla.parametric_functions as PF
      import nnabla as nn
  
      nn.clear_parameters()
      x = nn.Variable((2, 5))
      y = PF.batch_normalization(x, fix_parameters=True)
      params = nn.get_parameters(grad_only=False)
      assert list(params.keys()) == [
          "bn/" + name for name in ["beta", "gamma", "mean", "var"]
      ]
      assert params["bn/beta"].need_grad
      assert params["bn/gamma"].need_grad
      assert not params["bn/mean"].need_grad
      assert not params["bn/var"].need_grad
  
      assert not any([v.need_grad for v in y.parent.inputs[1:5]])
  
file_path: nnabla/python/test/test_parameter.py
imports: from six import iterkeys
  import pytest
  import numpy
  import nnabla.parametric_functions
  from nnabla.initializer import UniformInitializer
label_desc: Use image node_id 7 for calling a global function with example usage: test_parameter_as_need_grad() without return types