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
ef976be1
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "03b7a84cbee11fa1cff98e5275050f284da168df"
Unverified
Commit
ef976be1
authored
Aug 19, 2020
by
Quan (Andy) Gan
Committed by
GitHub
Aug 19, 2020
Browse files
[Bug][Doc] Fix NodeDataLoader docstrings and code (#2063)
parent
2b77ad41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
python/dgl/dataloading/pytorch/__init__.py
python/dgl/dataloading/pytorch/__init__.py
+11
-2
No files found.
python/dgl/dataloading/pytorch/__init__.py
View file @
ef976be1
...
@@ -64,10 +64,19 @@ class NodeDataLoader:
...
@@ -64,10 +64,19 @@ class NodeDataLoader:
def
__next__
(
self
):
def
__next__
(
self
):
return
self
.
dataloader
.
__next
()
"""Return the next element of the data loader.
Only works when the data loader is created from :class:`dgl.distributed.DistGraph`.
"""
return
next
(
self
.
dataloader
)
def
__iter__
(
self
):
def
__iter__
(
self
):
return
self
.
dataloader
.
__iter__
()
"""Return the iterator of the data loader."""
return
iter
(
self
.
dataloader
)
def
__len__
(
self
):
"""Return the number of batches of the data loader."""
return
len
(
self
.
dataloader
)
class
EdgeDataLoader
(
DataLoader
):
class
EdgeDataLoader
(
DataLoader
):
"""PyTorch dataloader for batch-iterating over a set of edges, generating the list
"""PyTorch dataloader for batch-iterating over a set of edges, generating the list
...
...
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