code: def deconv_elems_1d(x, factor, out_depth=None):
    
    out_depth = out_depth or x.get_shape().as_list()[-1]
    x = tf.expand_dims(x, 1)  # [batch_size, 1, length, depth]
    x = layers().Conv2DTranspose(
        filters=out_depth,
        kernel_size=(1, factor),
        strides=(1, factor),
        padding="valid",
        data_format="channels_last",
    )(x)  # [batch_size, 1, length*factor, out_depth]
    x = tf.squeeze(x, 1)  # [batch_size, length*factor, depth]
    return x
docs: Increase the length and change the dimensionality.
  
    Expand/project each positions of dim depth of the input into
    factor*tokens of dim out_depth
  
    Args:
      x (tf.Tensor): shape [batch_size, length, depth]
      factor (int): Multiplicative factor of each tokens.
      out_depth (int): Output depth (if None, keep depth constant)
  
    Returns:
      tf.Tensor: shape [batch_size, length*factor, out_depth]