class_docstr: Unrolls a recurrent module.
class_docstr_tok: ["Unrolls","a","recurrent","module","."]
code: def __call__(self, x: tf.Tensor):
      initial_state = self.wrapped.initial_state(
          batch_size=tf.shape(x)[0]
      )
      if isinstance(self.wrapped, snt.UnrolledRNN):
          assert self.unroller is None
          # The module expects TB...-shaped input as opposed to BT...
          x = tf.transpose(x, [1, 0] + list(range(2, x.shape.rank)))
          return self.wrapped(x, initial_state)
      else:
          x = tf.expand_dims(x, axis=0)
          return self.unroller(self.wrapped, x, initial_state)
  
file_path: sonnet/sonnet/src/conformance/descriptors.py
imports: import collections
  from typing import Callable, Union
  import sonnet
  import tensorflow
label_desc: Use image node_id 2 for calling the Recurrent obj's underlying member method code with example usage: obj.__call__(x) and returns: self, self