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
30c46251
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "255ac592c25d52aff40e86e80c6f5c2599997898"
Unverified
Commit
30c46251
authored
Aug 27, 2019
by
Da Zheng
Committed by
GitHub
Aug 27, 2019
Browse files
fix. (#794)
parent
331337fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
python/dgl/contrib/sampling/sampler.py
python/dgl/contrib/sampling/sampler.py
+4
-3
No files found.
python/dgl/contrib/sampling/sampler.py
View file @
30c46251
...
@@ -554,10 +554,11 @@ class EdgeSampler(object):
...
@@ -554,10 +554,11 @@ class EdgeSampler(object):
return
[
subgraph
.
DGLSubGraph
(
self
.
g
,
subg
)
for
subg
in
subgs
]
return
[
subgraph
.
DGLSubGraph
(
self
.
g
,
subg
)
for
subg
in
subgs
]
else
:
else
:
rets
=
[]
rets
=
[]
assert
self
.
_num_workers
*
2
==
len
(
subgs
)
assert
len
(
subgs
)
%
2
==
0
for
i
in
range
(
self
.
_num_workers
):
num_pos
=
int
(
len
(
subgs
)
/
2
)
for
i
in
range
(
num_pos
):
pos_subg
=
subgraph
.
DGLSubGraph
(
self
.
g
,
subgs
[
i
])
pos_subg
=
subgraph
.
DGLSubGraph
(
self
.
g
,
subgs
[
i
])
neg_subg
=
subgraph
.
DGLSubGraph
(
self
.
g
,
subgs
[
i
+
self
.
_num_worker
s
])
neg_subg
=
subgraph
.
DGLSubGraph
(
self
.
g
,
subgs
[
i
+
num_po
s
])
rets
.
append
((
pos_subg
,
neg_subg
))
rets
.
append
((
pos_subg
,
neg_subg
))
return
rets
return
rets
...
...
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