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
38077e29
"...pytorch/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "7612af0f180fd090a3651aa07f265b00f135f663"
Unverified
Commit
38077e29
authored
Nov 30, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Nov 30, 2020
Browse files
installation and doc fix (#2379)
parent
edb97877
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
docs/source/install/index.rst
docs/source/install/index.rst
+3
-0
python/dgl/dataloading/pytorch/__init__.py
python/dgl/dataloading/pytorch/__init__.py
+20
-2
No files found.
docs/source/install/index.rst
View file @
38077e29
...
@@ -36,6 +36,7 @@ After the ``conda`` environment is activated, run one of the following commands.
...
@@ -36,6 +36,7 @@ After the ``conda`` environment is activated, run one of the following commands.
conda install -c dglteam dgl-cuda10.0 # For CUDA 10.0 Build
conda install -c dglteam dgl-cuda10.0 # For CUDA 10.0 Build
conda install -c dglteam dgl-cuda10.1 # For CUDA 10.1 Build
conda install -c dglteam dgl-cuda10.1 # For CUDA 10.1 Build
conda install -c dglteam dgl-cuda10.2 # For CUDA 10.2 Build
conda install -c dglteam dgl-cuda10.2 # For CUDA 10.2 Build
conda install -c dglteam dgl-cuda11.0 # For CUDA 11.0 Build
Install from pip
Install from pip
...
@@ -56,6 +57,7 @@ For CUDA builds, run one of the following commands and specify the CUDA version.
...
@@ -56,6 +57,7 @@ For CUDA builds, run one of the following commands and specify the CUDA version.
pip install dgl-cu100 # For CUDA 10.0 Build
pip install dgl-cu100 # For CUDA 10.0 Build
pip install dgl-cu101 # For CUDA 10.1 Build
pip install dgl-cu101 # For CUDA 10.1 Build
pip install dgl-cu102 # For CUDA 10.2 Build
pip install dgl-cu102 # For CUDA 10.2 Build
pip install dgl-cu110 # For CUDA 11.0 Build
For the most current nightly build from master branch, run one of the following commands.
For the most current nightly build from master branch, run one of the following commands.
...
@@ -67,6 +69,7 @@ For the most current nightly build from master branch, run one of the following
...
@@ -67,6 +69,7 @@ For the most current nightly build from master branch, run one of the following
pip install --pre dgl-cu100 # For CUDA 10.0 Build
pip install --pre dgl-cu100 # For CUDA 10.0 Build
pip install --pre dgl-cu101 # For CUDA 10.1 Build
pip install --pre dgl-cu101 # For CUDA 10.1 Build
pip install --pre dgl-cu102 # For CUDA 10.2 Build
pip install --pre dgl-cu102 # For CUDA 10.2 Build
pip install --pre dgl-cu110 # For CUDA 11.0 Build
.. _install-from-source:
.. _install-from-source:
...
...
python/dgl/dataloading/pytorch/__init__.py
View file @
38077e29
...
@@ -236,6 +236,23 @@ class EdgeDataLoader:
...
@@ -236,6 +236,23 @@ class EdgeDataLoader:
of blocks as computation dependency of the said minibatch for edge classification,
of blocks as computation dependency of the said minibatch for edge classification,
edge regression, and link prediction.
edge regression, and link prediction.
For each iteration, the object will yield
* A tensor of input nodes necessary for computing the representation on edges, or
a dictionary of node type names and such tensors.
* A subgraph that contains only the edges in the minibatch and their incident nodes.
Note that the graph has an identical metagraph with the original graph.
* If a negative sampler is given, another graph that contains the "negative edges",
connecting the source and destination nodes yielded from the given negative sampler.
* A list of blocks necessary for computing the representation of the incident nodes
of the edges in the minibatch.
For more details, please refer to :ref:`guide-minibatch-edge-classification-sampler`
and :ref:`guide-minibatch-link-classification-sampler`.
Parameters
Parameters
----------
----------
g : DGLGraph
g : DGLGraph
...
@@ -301,8 +318,9 @@ class EdgeDataLoader:
...
@@ -301,8 +318,9 @@ class EdgeDataLoader:
>>> reverse_eids = torch.cat([torch.arange(E, 2 * E), torch.arange(0, E)])
>>> reverse_eids = torch.cat([torch.arange(E, 2 * E), torch.arange(0, E)])
Note that the sampled edges as well as their reverse edges are removed from
Note that the sampled edges as well as their reverse edges are removed from
computation dependencies of the incident nodes. This is a common trick to avoid
computation dependencies of the incident nodes. That is, the edge will not
information leakage.
involve in neighbor sampling and message aggregation. This is a common trick
to avoid information leakage.
>>> sampler = dgl.dataloading.MultiLayerNeighborSampler([15, 10, 5])
>>> sampler = dgl.dataloading.MultiLayerNeighborSampler([15, 10, 5])
>>> dataloader = dgl.dataloading.EdgeDataLoader(
>>> dataloader = dgl.dataloading.EdgeDataLoader(
...
...
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