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

Method _sync_with_cpp

python/paddle/base/framework.py:7327–7341  ·  view source on GitHub ↗

Synchronize Python instance to its binding C++ object instance. If the program is modified in C++ space, this method should be invoked. Notes: This is a very low level API. Users should not invoke it directly. Returns: None

(self)

Source from the content-addressed store, hash-verified

7325 self.current_block_idx = self.current_block().parent_idx
7326
7327 def _sync_with_cpp(self):
7328 """
7329 Synchronize Python instance to its binding C++ object instance.
7330 If the program is modified in C++ space, this method should be invoked.
7331
7332 Notes: This is a very low level API. Users should not invoke it
7333 directly.
7334
7335 Returns:
7336 None
7337 """
7338 for block_idx in range(len(self.blocks), self.desc.num_blocks()):
7339 self.blocks.append(Block(self, block_idx))
7340 for block in self.blocks:
7341 block._sync_with_cpp()
7342
7343 def _copy_param_info_from(self, other):
7344 """

Callers 15

_serialize_persistablesFunction · 0.95
save_varsFunction · 0.95
get_pserver_programMethod · 0.95
get_pserver_programMethod · 0.95
cloneMethod · 0.95
_prune_with_inputMethod · 0.95
_inference_optimizeMethod · 0.95
_remove_training_infoMethod · 0.95
parse_from_stringMethod · 0.95
_construct_from_descMethod · 0.95

Calls 5

rangeFunction · 0.85
num_blocksMethod · 0.80
BlockClass · 0.70
appendMethod · 0.45
_sync_with_cppMethod · 0.45