MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / all_persistable_nodes

Method all_persistable_nodes

python/paddle/base/framework.py:5636–5648  ·  view source on GitHub ↗

Return all persistable variable nodes included in the graph as a set.

(self)

Source from the content-addressed store, hash-verified

5634 return {IrVarNode(node) for node in self.graph.nodes() if node.is_var()}
5635
5636 def all_persistable_nodes(self):
5637 """
5638 Return all persistable variable nodes included in the graph as a set.
5639 """
5640 persistable_nodes = set()
5641 for node in self.graph.nodes():
5642 if (
5643 node.is_var()
5644 and node.var() is not None
5645 and node.var().persistable()
5646 ):
5647 persistable_nodes.add(node)
5648 return {IrVarNode(p) for p in persistable_nodes}
5649
5650 def all_op_nodes(self):
5651 """

Callers 10

applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 7

setClass · 0.85
IrVarNodeClass · 0.85
nodesMethod · 0.45
is_varMethod · 0.45
varMethod · 0.45
persistableMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected