项目文件夹

文件
Quan (Andy) Gan e9e587b6cb [Refactor] C random number generator (#729)
* rng refactor

* fix bugs

* unit test

* remove setsize

* lint

* fix test

* use explicit instantiation instead of inlining

* stricter test

* use tvm solution

* moved python interface to dgl.random

* lint

* address comments

* make getthreadid an inline function
2019-07-31 17:54:30 +08:00

17 行
364 B
Python

"""Pyhton interfaces to DGL random number generators."""
from ._ffi.function import _init_api
def seed(val):
"""Set the seed of randomized methods in DGL.
The randomized methods include various samplers and random walk routines.
Parameters
----------
val : int
The seed
"""
_CAPI_SetSeed(val)
_init_api('dgl.rng', __name__)