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

Method child

python/paddle/base/framework.py:1229–1238  ·  view source on GitHub ↗
(self, prefix)

Source from the content-addressed store, hash-verified

1227 self._parent = parent
1228
1229 def child(self, prefix):
1230 if prefix not in self._children:
1231 new_child = NameScope(prefix, self)
1232 self._children[prefix] = [new_child]
1233 else:
1234 new_child = NameScope(
1235 f"{prefix}_{len(self._children[prefix])}", self
1236 )
1237 self._children[prefix].append(new_child)
1238 return new_child
1239
1240 def parent(self):
1241 return self._parent

Callers 2

name_scopeFunction · 0.45
name_structFunction · 0.45

Calls 2

NameScopeClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected