seed_everything(seed: int)[source]

Sets the seed for generating random numbers in PyTorch, numpy and Python.


seed (int) – The desired seed.


Returns True, if the debug mode is enabled.

class debug[source]

Context-manager that enables the debug mode to help track down errors and separate usage errors from real bugs.


>>> with torch_geometric.debug():
...     out = model(data.x, data.edge_index)
class set_debug(mode: bool)[source]

Context-manager that sets the debug mode on or off.

set_debug will enable or disable the debug mode based on its argument mode. It can be used as a context-manager or as a function.

See debug above for more details.