tfp.substrates.numpy.bijectors.pack_sequence_as(
example, name='restructure'
)
See also the Restructure bijector for general rearrangements.
Args
example
A Tensor or (potentially nested) collection of Tensors.
name
An optional Python string, inserted into names of TF ops
created by this bijector.
Returns
pack
A Bijector whose forward method packs a list of Tensors of
the right length into a structure parallel to example, and
whose inverse method flattens structures parallel to example
into a list of Tensors.