Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
e16e895d
Unverified
Commit
e16e895d
authored
Jun 11, 2019
by
Minjie Wang
Committed by
GitHub
Jun 11, 2019
Browse files
[Doc] fix some document warnings (#645)
* fix doc * fix some format and warnings * fix
parent
463807c5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
18 deletions
+25
-18
docs/source/api/python/graph_store.rst
docs/source/api/python/graph_store.rst
+2
-2
docs/source/api/python/nodeflow.rst
docs/source/api/python/nodeflow.rst
+1
-1
python/dgl/graph.py
python/dgl/graph.py
+9
-7
python/dgl/nodeflow.py
python/dgl/nodeflow.py
+11
-6
tutorials/models/5_giant_graph/1_sampling_mx.py
tutorials/models/5_giant_graph/1_sampling_mx.py
+1
-1
tutorials/models/5_giant_graph/2_giant.py
tutorials/models/5_giant_graph/2_giant.py
+1
-1
No files found.
docs/source/api/python/graph_store.rst
View file @
e16e895d
...
...
@@ -7,7 +7,7 @@ Graph Store -- Graph for multi-processing and distributed training
.. autoclass:: SharedMemoryDGLGraph
Querying the distributed setting
------------------------
------------------------
--------
.. autosummary::
:toctree: ../../generated/
...
...
@@ -26,7 +26,7 @@ Using Node/edge features
SharedMemoryDGLGraph.init_edata
Computing with Graph store
-----------------------
-----------------------
---
.. autosummary::
:toctree: ../../generated/
...
...
docs/source/api/python/nodeflow.rst
View file @
e16e895d
.. _apinodeflow:
NodeFlow -- Graph sampled from a large graph
=========================================
=========================================
===
.. currentmodule:: dgl
.. autoclass:: NodeFlow
...
...
python/dgl/graph.py
View file @
e16e895d
...
...
@@ -3323,25 +3323,27 @@ class DGLGraph(DGLBaseGraph):
# pylint: disable=invalid-name
def
to
(
self
,
ctx
):
"""
Move both ndata and edata to the targeted mode (cpu/gpu)
"""Move both ndata and edata to the targeted mode (cpu/gpu)
Framework agnostic
Parameters
----------
ctx : framework specific context object
ctx : framework-specific context object
The context to move data to.
Examples
(Pytorch & MXNet)
Examples
--------
>>> import backend as F
The following example uses PyTorch backend.
>>> import torch
>>> G = dgl.DGLGraph()
>>> G.add_nodes(5, {'h': torch.ones((5, 2))})
>>> G.add_edges([0, 1], [1, 2], {'m' : torch.ones((2, 2))})
>>> G.add_edges([0, 1], [1, 2], {'m' : torch.ones((2, 2))})
>>> G.to(F.cuda())
>>> G.to(torch.device('cuda:0'))
"""
for
k
in
self
.
ndata
.
keys
():
self
.
ndata
[
k
]
=
F
.
copy_to
(
self
.
ndata
[
k
],
ctx
)
for
k
in
self
.
edata
.
keys
():
self
.
edata
[
k
]
=
F
.
copy_to
(
self
.
edata
[
k
],
ctx
)
# pylint: enable=invalid-name
python/dgl/nodeflow.py
View file @
e16e895d
...
...
@@ -558,12 +558,17 @@ class NodeFlow(DGLBaseGraph):
or not.
There are two types of an incidence matrix `I`:
* "in":
* ``in``:
- I[v, e] = 1 if e is the in-edge of v (or v is the dst node of e);
- I[v, e] = 0 otherwise.
* "out":
* ``out``:
- I[v, e] = 1 if e is the out-edge of v (or v is the src node of e);
- I[v, e] = 0 otherwise.
"both" isn't defined in the block of a NodeFlow.
Parameters
...
...
tutorials/models/5_giant_graph/1_sampling_mx.py
View file @
e16e895d
"""
.. _sampling:
.. _
model-
sampling:
NodeFlow and Sampling
=======================================
...
...
tutorials/models/5_giant_graph/2_giant.py
View file @
e16e895d
"""
.. _
sampling
:
.. _
model-graph-store
:
Large-Scale Training of Graph Neural Networks
=============================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment