def dict_to_(data, device):
    """
    Moves a dictionary of tensors to the specified device.
    """
    for k in data:
        data[k] = data[k].to(device)
    return data

    Moves a dictionary of tensors to the specified device.
    
rome/tok_dataset.py