def tanh_to_sig_scale(tanh_input,scale_multiplier=1.):
    """For image data scaled between [-1,1],
    rescale to [0,1] * scale_multiplier (e.g. 255 for RGB images)
    """
    #Due to operator overloading, this also works with tensors
    return ((tanh_input+1.)/2.)*scale_multiplier