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

Function copy_mutable_vars

python/paddle/utils/layers_utils.py:275–280  ·  view source on GitHub ↗

Returns vars copied from sequence without mutable property.

(structure)

Source from the content-addressed store, hash-verified

273
274
275def copy_mutable_vars(structure):
276 """
277 Returns vars copied from sequence without mutable property.
278 """
279 flat_structure = copy.copy(flatten(structure))
280 return pack_sequence_as(structure, flat_structure)
281
282
283def _recursive_assert_same_structure(nest1, nest2, check_types, skip_if):

Callers 1

while_loopFunction · 0.90

Calls 3

pack_sequence_asFunction · 0.85
flattenFunction · 0.70
copyMethod · 0.45

Tested by

no test coverage detected