tensorflow_probability/python/bijectors/masked_autoregressive.py
def call(self, x):
    """See tfkl.Layer.call."""
    with tf.compat.v2.name_scope(self.name or "AutoregressiveLayer_call"):
      x = tf.convert_to_tensor(value=x, dtype=self.dtype, name="x")
      input_shape = tf.shape(input=x)
      # TODO(b/67594795): Better support for dynamic shapes.
      if tensorshape_util.rank(x.shape) == 1:
        x = x[tf.newaxis, ...]
      return tf.reshape(self._network(x),
                        tf.concat([input_shape, [self._params]], axis=0))
def call(self, x):
    """See tfkl.Layer.call."""
    with tf.compat.v2.name_scope(self.name or "AutoregressiveLayer_call"):
      x = tf.convert_to_tensor(value=x, dtype=self.dtype, name="x")
      input_shape = tf.shape(input=x)
      # TODO(b/67594795): Better support for dynamic shapes.
      if tensorshape_util.rank(x.shape) == 1:
        x = x[tf.newaxis, ...]
      return tf.reshape(self._network(x),
                        tf.concat([input_shape, [self._params]], axis=0))
See tfkl.Layer.call.