torch_geometric
Tensor Objects
A one-dimensional |
|
A COO |
Functions
- seed_everything(seed: int) None[source]
Sets the seed for generating random numbers in PyTorch,
numpyand Python.
- get_home_dir() str[source]
Get the cache directory used for storing all PyG-related data.
If
set_home_dir()is not called, the path is given by the environment variable$PYG_HOMEwhich defaults to"~/.cache/pyg".- Return type:
- set_home_dir(path: str) None[source]
Set the cache directory used for storing all PyG-related data.
- is_compiling() bool[source]
Returns
Truein case PyTorch is compiling viatorch.compile().- Return type:
- 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_debugwill enable or disable the debug mode based on its argumentmode. It can be used as a context-manager or as a function.See
debugabove for more details.
- is_experimental_mode_enabled(options: Optional[Union[str, List[str]]] = None) bool[source]
Returns
Trueif the experimental mode is enabled. Seetorch_geometric.experimental_modefor a list of (optional) options.- Return type:
- class experimental_mode(options: Optional[Union[str, List[str]]] = None)[source]
Context-manager that enables the experimental mode to test new but potentially unstable features.
with torch_geometric.experimental_mode(): out = model(data.x, data.edge_index)
- class set_experimental_mode(mode: bool, options: Optional[Union[str, List[str]]] = None)[source]
Context-manager that sets the experimental mode on or off.
set_experimental_modewill enable or disable the experimental mode based on its argumentmode. It can be used as a context-manager or as a function.See
experimental_modeabove for more details.