import torch


def to_tensor(input):
    """Converts the input into a ``torch.Tensor`` of the default dtype."""
    if torch.is_tensor(input):
        return input.to(torch.Tensor())
    else:
        return torch.tensor(input).to(torch.Tensor())