import torch


def clamp_scale_function(bounds):
    """
    Just clamp to bounds

    Args:
      bounds (tuple(torch.tensor, torch.tensor)):   tuple giving the parameter bounds
    """
    return lambda x: torch.clamp(x, bounds[0], bounds[1])