コード例 #1
0
def seed():
    r"""Sets the seed for generating random numbers to a random number for the current GPU.
    It's safe to call this function if CUDA is not available; in that
    case, it is silently ignored.

    .. warning::
        If you are working with a multi-GPU model, this function will only initialize
        the seed on one GPU.  To initialize all GPUs, use :func:`seed_all`.
    """
    _lazy_call(lambda: _C._cuda_seed())
コード例 #2
0
ファイル: random.py プロジェクト: Jsmilemsj/pytorch
def seed():
    r"""Sets the seed for generating random numbers to a random number for the current GPU.
    It's safe to call this function if CUDA is not available; in that
    case, it is silently ignored.

    .. warning::
        If you are working with a multi-GPU model, this function will only initialize
        the seed on one GPU.  To initialize all GPUs, use :func:`seed_all`.
    """
    _lazy_call(lambda: _C._cuda_seed())
コード例 #3
0
ファイル: random.py プロジェクト: zwytop/pytorch
def seed():
    _lazy_init()
    return _C._cuda_seed()
コード例 #4
0
def seed():
    r"""Sets the seed for generating random numbers to a random number."""
    _lazy_init()
    return _C._cuda_seed()