Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PGL
提交
707ece69
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看板
提交
707ece69
编写于
4月 14, 2020
作者:
Y
yelrose
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove Place in GraphWrapper
上级
1dfe4882
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
4 addition
and
10 deletion
+4
-10
examples/dgi/train.py
examples/dgi/train.py
+0
-1
examples/distribute_graphsage/train.py
examples/distribute_graphsage/train.py
+1
-1
examples/graphsage/train.py
examples/graphsage/train.py
+1
-1
examples/graphsage/train_multi.py
examples/graphsage/train_multi.py
+0
-1
examples/graphsage/train_scale.py
examples/graphsage/train_scale.py
+0
-1
examples/stgcn/main.py
examples/stgcn/main.py
+0
-1
examples/unsup_graphsage/train.py
examples/unsup_graphsage/train.py
+1
-1
pgl/graph_wrapper.py
pgl/graph_wrapper.py
+1
-3
未找到文件。
examples/dgi/train.py
浏览文件 @
707ece69
...
...
@@ -65,7 +65,6 @@ def main(args):
with
fluid
.
program_guard
(
train_program
,
startup_program
):
gw
=
pgl
.
graph_wrapper
.
GraphWrapper
(
name
=
"graph"
,
place
=
place
,
node_feat
=
dataset
.
graph
.
node_feat_info
())
output
=
pgl
.
layers
.
gcn
(
gw
,
...
...
examples/distribute_graphsage/train.py
浏览文件 @
707ece69
...
...
@@ -170,7 +170,7 @@ def main(args):
with
fluid
.
program_guard
(
train_program
,
startup_program
):
graph_wrapper
=
pgl
.
graph_wrapper
.
GraphWrapper
(
"sub_graph"
,
fluid
.
CPUPlace
(),
node_feat
=
[(
'feats'
,
[
None
,
602
],
np
.
dtype
(
'float32'
))])
"sub_graph"
,
node_feat
=
[(
'feats'
,
[
None
,
602
],
np
.
dtype
(
'float32'
))])
model_loss
,
model_acc
=
build_graph_model
(
graph_wrapper
,
num_class
=
data
[
"num_class"
],
...
...
examples/graphsage/train.py
浏览文件 @
707ece69
...
...
@@ -204,8 +204,8 @@ def main(args):
graph_wrapper
=
pgl
.
graph_wrapper
.
GraphWrapper
(
"sub_graph"
,
fluid
.
CPUPlace
(),
node_feat
=
data
[
'graph'
].
node_feat_info
())
model_loss
,
model_acc
=
build_graph_model
(
graph_wrapper
,
num_class
=
data
[
"num_class"
],
...
...
examples/graphsage/train_multi.py
浏览文件 @
707ece69
...
...
@@ -231,7 +231,6 @@ def main(args):
with
fluid
.
program_guard
(
train_program
,
startup_program
):
graph_wrapper
=
pgl
.
graph_wrapper
.
GraphWrapper
(
"sub_graph"
,
fluid
.
CPUPlace
(),
node_feat
=
data
[
'graph'
].
node_feat_info
())
model_loss
,
model_acc
=
build_graph_model
(
...
...
examples/graphsage/train_scale.py
浏览文件 @
707ece69
...
...
@@ -227,7 +227,6 @@ def main(args):
with
fluid
.
program_guard
(
train_program
,
startup_program
):
graph_wrapper
=
pgl
.
graph_wrapper
.
GraphWrapper
(
"sub_graph"
,
fluid
.
CPUPlace
(),
node_feat
=
data
[
'graph'
].
node_feat_info
())
model_loss
,
model_acc
=
build_graph_model
(
...
...
examples/stgcn/main.py
浏览文件 @
707ece69
...
...
@@ -49,7 +49,6 @@ def main(args):
with
fluid
.
program_guard
(
train_program
,
startup_program
):
gw
=
pgl
.
graph_wrapper
.
GraphWrapper
(
"gw"
,
place
,
node_feat
=
[(
'norm'
,
[
None
,
1
],
"float32"
)],
edge_feat
=
[(
'weights'
,
[
None
,
1
],
"float32"
)])
...
...
examples/unsup_graphsage/train.py
浏览文件 @
707ece69
...
...
@@ -88,7 +88,7 @@ def build_graph_model(args):
graph_wrappers
.
append
(
pgl
.
graph_wrapper
.
GraphWrapper
(
"layer_0"
,
fluid
.
CPUPlace
(),
node_feat
=
node_feature_info
))
"layer_0"
,
node_feat
=
node_feature_info
))
#edge_feat=[("f", [None, 1], "float32")]))
num_embed
=
args
.
num_nodes
...
...
pgl/graph_wrapper.py
浏览文件 @
707ece69
...
...
@@ -516,7 +516,6 @@ class GraphWrapper(BaseGraphWrapper):
})
graph_wrapper = GraphWrapper(name="graph",
place=place,
node_feat=graph.node_feat_info(),
edge_feat=graph.edge_feat_info())
...
...
@@ -531,12 +530,11 @@ class GraphWrapper(BaseGraphWrapper):
ret = exe.run(fetch_list=[...], feed=feed_dict )
"""
def
__init__
(
self
,
name
,
place
,
node_feat
=
[],
edge_feat
=
[]
):
def
__init__
(
self
,
name
,
node_feat
=
[],
edge_feat
=
[],
**
kwargs
):
super
(
GraphWrapper
,
self
).
__init__
()
# collect holders for PyReader
self
.
_data_name_prefix
=
name
self
.
_holder_list
=
[]
self
.
_place
=
place
self
.
__create_graph_attr_holders
()
for
node_feat_name
,
node_feat_shape
,
node_feat_dtype
in
node_feat
:
self
.
__create_graph_node_feat_holders
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录