(tensor, dims=None)
return tf.expand_dims(
             tf.expand_dims(
               tf.expand_dims(tensor, dims[0]),
               dims[1]),
             dims[2])
Expand dimension from 1 to 4.

    Useful for multiplying amplification factor.
Expand dimension from 1 to 4.
Expand dimension from 1 to 4 .
def expand_dims_1_to_4(tensor, dims=None):
    """Expand dimension from 1 to 4.

    Useful for multiplying amplification factor.
    """
    if not dims:
        dims = [-1, -1, -1]
    return tf.expand_dims(
             tf.expand_dims(
               tf.expand_dims(tensor, dims[0]),
               dims[1]),
             dims[2])
def expand_dims_1_to_4 ( tensor , dims = None ) : if not dims : dims = [ - 1 , - 1 , - 1 ] return tf . expand_dims ( tf . expand_dims ( tf . expand_dims ( tensor , dims [ 0 ] ) , dims [ 1 ] ) , dims [ 2 ] )