Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PGL
提交
cea8383a
P
PGL
项目概览
PaddlePaddle
/
PGL
通知
76
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
11
列表
看板
标记
里程碑
合并请求
1
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PGL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
11
Issue
11
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cea8383a
编写于
3月 18, 2020
作者:
W
weiyue.su
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove graphsage speed log
上级
c0a99eed
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
1 addition
and
3 deletion
+1
-3
pgl/sample.py
pgl/sample.py
+1
-3
未找到文件。
pgl/sample.py
浏览文件 @
cea8383a
...
...
@@ -56,7 +56,7 @@ def edge_hash(src, dst):
def
graphsage_sample
(
graph
,
nodes
,
samples
,
ignore_edges
=
[]):
"""Implement of graphsage sample.
Reference paper: https://cs.stanford.edu/
~jure/pubs/node2vec-kdd16
.pdf.
Reference paper: https://cs.stanford.edu/
people/jure/pubs/graphsage-nips17
.pdf.
Args:
graph: A pgl graph instance
...
...
@@ -84,7 +84,6 @@ def graphsage_sample(graph, nodes, samples, ignore_edges=[]):
continue
batch_pred_nodes
,
batch_pred_eids
=
graph
.
sample_predecessor
(
start_nodes
,
samples
[
layer_idx
],
return_eids
=
True
)
log
.
debug
(
"sample_predecessor time: %s"
%
(
time
.
time
()
-
start
))
start
=
time
.
time
()
last_nodes_set
=
nodes_set
...
...
@@ -120,7 +119,6 @@ def graphsage_sample(graph, nodes, samples, ignore_edges=[]):
# only for this task
subgraphs
[
i
].
node_feat
[
"index"
]
=
np
.
array
(
layer_nodes
[
0
],
dtype
=
"int64"
)
log
.
debug
(
"subgraph time: %s"
%
(
time
.
time
()
-
start
))
return
subgraphs
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录