class_docstr: This class tests the crypten.nn package.
class_docstr_tok: ["This","class","tests","the","crypten.nn","package","."]
code: def _compute_reference_parameters(
      self, init_name, reference, model, learning_rate
  ):
      for name, param in model.named_parameters(recurse=False):
          local_name = init_name + "_" + name
          reference[local_name] = (
              param.get_plain_text()
              - learning_rate * param.grad.get_plain_text()
          )
      for name, module in model.named_children():
          local_name = init_name + "_" + name
          reference = self._compute_reference_parameters(
              local_name, reference, module, learning_rate
          )
      return reference
  
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 2 for calling the TestNN obj's underlying member method code with example usage: obj._compute_reference_parameters(init_name, reference, model, learning_rate) and returns: reference