dmlc--dgl
31f65f036a
* [Doc] Add 1st CN in chapter 6 * [Doc] Add 1st CN in chapter 6 * [Doc] Add 1st CN in chapter 6.1 * [Doc] Add 1st CN in chapter 6.1 * [Doc] Add 1st CN in chapter 6.2 * [Doc] Add CN in chapter 6.2 * [Doc] Add CN in chapter 6.3 * [Doc] Fix a code bug in chapter 6.3 * [Doc] Add CN in chapter 6.4, 6.5, and 6.6. * [Doc] Add CN in chapter 6.4, 6.5, and 6.6,then remove EN parts. * [Doc] revised 6.4, 6.5, and 6.6. * [Doc] 2nd round of copyediting. * Delete syn1.bin Remove this unrelated file to this branch * [Doc] Update guide_cn index.rst. * [Doc] Update guide_cn index.rst. * [Doc] Update guide_cn index.rst. * [Doc] Update guide_cn index.rst. * [Doc] Add chapter 7 in index page * [Doc] edit chapter 6 in PR * [Doc] edit chapter 6 in PR * [Doc] Copyediting with Murphy and Minjie's comments. * [Doc] Fix doc line in the previous chapters. Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com> Co-authored-by: Mufei Li <mufeili1996@gmail.com> Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
17 行
590 B
ReStructuredText
17 行
590 B
ReStructuredText
.. _guide_cn-message-passing-part:
|
|
|
|
2.3 在图的一部分上进行消息传递
|
|
-------------------------
|
|
|
|
:ref:`(English Version) <guide-message-passing-part>`
|
|
|
|
如果用户只想更新图中的部分节点,可以先通过想要囊括的节点编号创建一个子图,
|
|
然后在子图上调用 :meth:`~dgl.DGLGraph.update_all` 方法。例如:
|
|
|
|
.. code::
|
|
|
|
nid = [0, 2, 3, 6, 7, 9]
|
|
sg = g.subgraph(nid)
|
|
sg.update_all(message_func, reduce_func, apply_node_func)
|
|
|
|
这是小批量训练中的常见用法。更多详细用法请参考用户指南 :ref:`guide_cn-minibatch`。 |