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
4464b973
Unverified
Commit
4464b973
authored
Dec 31, 2020
by
xiang song(charlie.song)
Committed by
GitHub
Dec 31, 2020
Browse files
Fix kg dataset len() (#2475)
Co-authored-by:
Ubuntu
<
ubuntu@ip-172-31-59-204.ec2.internal
>
parent
4208ce2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/dgl/data/knowledge_graph.py
python/dgl/data/knowledge_graph.py
+3
-3
No files found.
python/dgl/data/knowledge_graph.py
View file @
4464b973
...
...
@@ -464,7 +464,7 @@ class FB15k237Dataset(KnowledgeGraphDataset):
def
__len__
(
self
):
r
"""The number of graphs in the dataset."""
return
super
(
FB15k237Dataset
,
self
).
__len__
(
idx
)
return
super
(
FB15k237Dataset
,
self
).
__len__
()
class
FB15kDataset
(
KnowledgeGraphDataset
):
r
"""FB15k link prediction dataset.
...
...
@@ -601,7 +601,7 @@ class FB15kDataset(KnowledgeGraphDataset):
def
__len__
(
self
):
r
"""The number of graphs in the dataset."""
return
super
(
FB15kDataset
,
self
).
__len__
(
idx
)
return
super
(
FB15kDataset
,
self
).
__len__
()
class
WN18Dataset
(
KnowledgeGraphDataset
):
r
""" WN18 link prediction dataset.
...
...
@@ -737,7 +737,7 @@ class WN18Dataset(KnowledgeGraphDataset):
def
__len__
(
self
):
r
"""The number of graphs in the dataset."""
return
super
(
WN18Dataset
,
self
).
__len__
(
idx
)
return
super
(
WN18Dataset
,
self
).
__len__
()
def
load_data
(
dataset
):
r
"""Load knowledge graph dataset for RGCN link prediction tasks
...
...
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