Ejemplo n.º 1
0
def manual_seed(seed):
    r"""Sets the seed for generating random numbers.

    Args:
        seed (int or long): The desired seed.
    """
    _lazy_init()
    return _C._cuda_manualSeed(seed)
Ejemplo n.º 2
0
def manual_seed(seed):
    r"""Sets the seed for generating random numbers for the current GPU.
    It's safe to call this function if CUDA is not available; in that
    case, it is silently ignored.

    Args:
        seed (int or long): The desired seed.

    .. warning::
        If you are working with a multi-GPU model, this function is insufficient
        to get determinism.  To seed all GPUs, use :func:`manual_seed_all`.
    """
    _lazy_call(lambda: _C._cuda_manualSeed(seed))
Ejemplo n.º 3
0
def manual_seed(seed):
    r"""Sets the seed for generating random numbers for the current GPU.
    It's safe to call this function if CUDA is not available; in that
    case, it is silently ignored.

    Args:
        seed (int): The desired seed.

    .. warning::
        If you are working with a multi-GPU model, this function is insufficient
        to get determinism.  To seed all GPUs, use :func:`manual_seed_all`.
    """
    seed = int(seed)
    _lazy_call(lambda: _C._cuda_manualSeed(seed))
Ejemplo n.º 4
0
def manual_seed(seed):
    _lazy_init()
    return _C._cuda_manualSeed(seed)