unflatten_from_ndims

tfsnippet.ops.unflatten_from_ndims(x, static_front_shape, front_shape, name=None)

The inverse transformation of flatten().

If both static_front_shape is None and front_shape is None, x will be returned without any change.

Parameters:
  • x (Tensor) – The tensor to be unflatten.
  • static_front_shape (tuple[int or None] or None) – The static front shape.
  • front_shape (tuple[int] or tf.Tensor or None) – The front shape.
  • name (str) – Default name of the name scope. If not specified, generate one according to the method name.
Returns:

The unflatten x.

Return type:

tf.Tensor