def check_manual_seed(seed):
    """ If manual seed is not specified, choose a random one and communicate it to the user.

    """

    seed = seed or random.randint(1, 10000)
    random.seed(seed)
    torch.manual_seed(seed)

    print('Using manual seed: {seed}'.format(seed=seed))
If manual seed is not specified, choose a random one and communicate it to the user.