import torch


def unk_init(dim):
    """
    Initialize out of vocabulary words as uniform
    distribution in range 0 to 1.
    :param dim: word embedding dimension
    :return: randomly initialized vector
    """
    return torch.rand(1, dim)