import math
import torch


def loglinspace(a, b, n=100, **kwargs):
    """Like :meth:`torch.linspace`, but spread the values out in log space,
instead of linear space. Different from :meth:`torch.logspace`"""
    return math.e**torch.linspace(math.log(a), math.log(b), n, **kwargs)