class_docstr: This class tests the crypten.nn package.
class_docstr_tok: ["This","class","tests","the","crypten.nn","package","."]
code: def _check_reference_parameters(self, init_name, reference, model):
      for name, param in model.named_parameters(recurse=False):
          local_name = init_name + "_" + name
          self._check(
              param, reference[local_name], "parameter update failed"
          )
      for name, module in model.named_children():
          local_name = init_name + "_" + name
          self._check_reference_parameters(
              local_name, reference, module
          )
  
imports: import copy
  import itertools
  import logging
  import unittest
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common.rng import generate_random_ring_element
  from crypten.common.tensor_types import is_float_tensor
  from crypten.config import cfg
  from crypten.encoder import FixedPointEncoder
  from test.multiprocess_test_case import get_random_linear, get_random_test_tensor, MultiProcessTestCase, onehot
label_desc: Use image node_id 3 for calling the TestNN obj's underlying member method code with example usage: obj._check_reference_parameters(init_name, reference, model) without return types