code: def test_get_parameter_with_initializer():
      """Testing with initializer"""
      import nnabla as nn
      from nnabla.parameter import get_parameter_or_create
  
      nn.clear_parameters()
      rng = np.random.RandomState(seed=313)
      shape = (8, 8, 3, 3)
  
      # Instance inherited from BaseInitializer
      initializer = UniformInitializer(lim=(-1, 1), rng=rng)
      param1 = get_parameter_or_create(
          "param1", shape, initializer=initializer, need_grad=True
      )
      assert np.min(param1.d > -1) and np.max(param1.d < 1)
  
      # Numpy array
      initializer = rng.randn(*shape)
      param2 = get_parameter_or_create(
          "param2", initializer=initializer, need_grad=True
      )
      np.allclose(initializer, param2.d)
  
      # Random
      param3 = get_parameter_or_create("param3", shape, need_grad=True)
  
      nn.clear_parameters()
  
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 3 for calling a global function with example usage: test_get_parameter_with_initializer() without return types