class_docstr: ZoneOut Cell module.
  
  This is a module of zoneout described in
  `Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations`_.
  This code is modified from `eladhoffer/seq2seq.pytorch`_.
  
  Examples:
      >>> lstm = torch.nn.LSTMCell(16, 32)
      >>> lstm = ZoneOutCell(lstm, 0.5)
  
  .. _`Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations`:
      https://arxiv.org/abs/1606.01305
  
  .. _`eladhoffer/seq2seq.pytorch`:
      https://github.com/eladhoffer/seq2seq.pytorch
code: def _zoneout(self, h, next_h, prob):
      # apply recursively
      if isinstance(h, tuple):
          num_h = len(h)
          if not isinstance(prob, tuple):
              prob = tuple([prob] * num_h)
          return tuple(
              [
                  self._zoneout(h[i], next_h[i], prob[i])
                  for i in range(num_h)
              ]
          )
  
      if self.training:
          mask = h.new(*h.size()).bernoulli_(prob)
          return mask * h + (1 - mask) * next_h
      else:
          return prob * h + (1 - prob) * next_h
  
imports: import torch
  import torch.nn.functional
  from espnet.nets.pytorch_backend.rnn.attentions import AttForwardTA
label_desc: Use image node_id 3 for calling the ZoneOutCell obj's underlying member method code with example usage: obj._zoneout(h, next_h, prob) and returns: tuple, unknown, unknown