dmlc--dgl
e9e587b6cb
* 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
17 行
364 B
Python
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__)
|