class_docstr: Shared RNN model.
class_docstr_tok: ["Shared","RNN","model","."]
code: def get_num_cell_parameters(self, dag):
      num = 0
  
      num += models.shared_base.size(self.w_xc)
      num += models.shared_base.size(self.w_xh)
  
      q = collections.deque()
      q.append(0)
  
      while True:
          if len(q) == 0:
              break
  
          node_id = q.popleft()
          nodes = dag[node_id]
  
          for next_node in nodes:
              next_id = next_node.id
              if next_id == self.args.num_blocks:
                  assert (
                      len(nodes) == 1
                  ), "parent of leaf node should have only one child"
                  continue
  
              w_h = self.w_h[node_id][next_id]
              w_c = self.w_c[node_id][next_id]
  
              num += models.shared_base.size(w_h)
              num += models.shared_base.size(w_c)
  
              q.append(next_id)
  
      logger.debug(
          f"# of cell parameters: "
          f'{format(self.num_parameters, ",d")}'
      )
      return num
  
imports: import numpy
  import collections
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.autograd import Variable
  import models.shared_base
  import utils
label_desc: Use image node_id 6 for calling the RNN obj's underlying member method code with example usage: obj.get_num_cell_parameters(dag) and returns: num