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

Method _copy_param_info_from

python/paddle/base/framework.py:7343–7361  ·  view source on GitHub ↗

Copy the information of parameters from other program. Notes: This is a very low level API. Users should not invoke it directly. Args: other(Program): Other program Returns: None

(self, other)

Source from the content-addressed store, hash-verified

7341 block._sync_with_cpp()
7342
7343 def _copy_param_info_from(self, other):
7344 """
7345 Copy the information of parameters from other program.
7346
7347 Notes: This is a very low level API. Users should not invoke it
7348 directly.
7349
7350 Args:
7351 other(Program): Other program
7352
7353 Returns:
7354 None
7355 """
7356 if not isinstance(other, Program):
7357 raise TypeError(
7358 f"Function Program._copy_param_info_from() needs to pass in a source Program, but received {type(other)}"
7359 )
7360
7361 self.global_block()._copy_param_info_from(other.global_block())
7362
7363 def _copy_dist_param_info_from(self, other):
7364 """

Callers 2

cloneMethod · 0.95
_prune_with_inputMethod · 0.95

Calls 4

global_blockMethod · 0.95
TypeErrorClass · 0.85
typeFunction · 0.50
_copy_param_info_fromMethod · 0.45

Tested by

no test coverage detected