提交 50ab64bb 编写于 作者: Y Yelrose

add graph_norm

上级 489c5116
...@@ -52,11 +52,10 @@ def graph_norm(gw, feature): ...@@ -52,11 +52,10 @@ def graph_norm(gw, feature):
Args: Args:
gw: Graph wrapper object (:code:`StaticGraphWrapper` or :code:`GraphWrapper`) gw: Graph wrapper object (:code:`StaticGraphWrapper` or :code:`GraphWrapper`)
graph_level (default: False): If :code:`graph_level=True` return shape (num_graphs, 1) feature: A tensor with shape (num_nodes, hidden_size)
elif :code:`graph_level=False return shape (num_nodes, 1)`
Return: Return:
A tensor with shape (num_graphs, 1) or (num_node, 1) A tensor with shape (num_nodes, hidden_size)
""" """
nodes = fluid.layers.fill_constant( nodes = fluid.layers.fill_constant(
[gw.num_nodes, 1], dtype="float32", value=1.0) [gw.num_nodes, 1], dtype="float32", value=1.0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册