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
1b069984
Commit
1b069984
authored
Oct 05, 2018
by
Minjie Wang
Browse files
doc for batched graph
parent
c65a1e51
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
3 deletions
+14
-3
docs/source/api/python/batch.rst
docs/source/api/python/batch.rst
+9
-0
docs/source/api/python/index.rst
docs/source/api/python/index.rst
+1
-0
python/dgl/__init__.py
python/dgl/__init__.py
+1
-1
python/dgl/batched_graph.py
python/dgl/batched_graph.py
+3
-1
python/dgl/subgraph.py
python/dgl/subgraph.py
+0
-1
tests/pytorch/test_batched_graph.py
tests/pytorch/test_batched_graph.py
+0
-0
No files found.
docs/source/api/python/batch.rst
0 → 100644
View file @
1b069984
dgl.BatchedDGLGraph
-------------------
.. autoclass:: dgl.BatchedDGLGraph
:members:
:show-inheritance:
.. autofunction:: dgl.batch
.. autofunction:: dgl.unbatch
docs/source/api/python/index.rst
View file @
1b069984
...
@@ -5,3 +5,4 @@ Python APIs
...
@@ -5,3 +5,4 @@ Python APIs
:maxdepth: 2
:maxdepth: 2
graph
graph
batch
python/dgl/__init__.py
View file @
1b069984
...
@@ -9,7 +9,7 @@ from ._ffi.function import register_func, get_global_func, list_global_func_name
...
@@ -9,7 +9,7 @@ from ._ffi.function import register_func, get_global_func, list_global_func_name
from
._ffi.base
import
DGLError
,
__version__
from
._ffi.base
import
DGLError
,
__version__
from
.base
import
ALL
from
.base
import
ALL
from
.batch
import
batch
,
unbatch
from
.batch
ed_graph
import
*
from
.generator
import
*
from
.generator
import
*
from
.graph
import
DGLGraph
,
__MSG__
,
__REPR__
from
.graph
import
DGLGraph
,
__MSG__
,
__REPR__
from
.subgraph
import
DGLSubGraph
from
.subgraph
import
DGLSubGraph
python/dgl/batch.py
→
python/dgl/batch
ed_graph
.py
View file @
1b069984
...
@@ -10,6 +10,8 @@ from . import graph_index as gi
...
@@ -10,6 +10,8 @@ from . import graph_index as gi
from
.
import
backend
as
F
from
.
import
backend
as
F
from
.
import
utils
from
.
import
utils
__all__
=
[
'BatchedDGLGraph'
,
'batch'
,
'unbatch'
,
'split'
]
class
BatchedDGLGraph
(
DGLGraph
):
class
BatchedDGLGraph
(
DGLGraph
):
"""The batched DGL graph.
"""The batched DGL graph.
...
@@ -146,7 +148,7 @@ def split(graph_batch, num_or_size_splits):
...
@@ -146,7 +148,7 @@ def split(graph_batch, num_or_size_splits):
pass
pass
def
unbatch
(
graph
):
def
unbatch
(
graph
):
"""Unbatch
the graph
and return
a
list of
sub
graphs.
"""Unbatch and return
the
list of graphs
in this batch
.
Parameters
Parameters
----------
----------
...
...
python/dgl/subgraph.py
View file @
1b069984
...
@@ -6,7 +6,6 @@ import networkx as nx
...
@@ -6,7 +6,6 @@ import networkx as nx
from
.
import
backend
as
F
from
.
import
backend
as
F
from
.frame
import
Frame
,
FrameRef
from
.frame
import
Frame
,
FrameRef
from
.graph
import
DGLGraph
from
.graph
import
DGLGraph
from
.nx_adapt
import
nx_init
from
.
import
utils
from
.
import
utils
class
DGLSubGraph
(
DGLGraph
):
class
DGLSubGraph
(
DGLGraph
):
...
...
tests/pytorch/test_
graph_batc
h.py
→
tests/pytorch/test_
batched_grap
h.py
View file @
1b069984
File moved
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