cellflow.networks.ConditionalVelocityField.clone

ConditionalVelocityField.clone(*, parent=None, _deep_clone=False, _reset_names=False, **updates)

Creates a clone of this Module, with optionally updated arguments.

Return type:

TypeVar(M, bound= Module)

Parameters:
NOTE: end users are encouraged to use the copy method. clone is used

primarily for internal routines, and copy offers simpler arguments and better defaults.

Args:
parent: The parent of the clone. The clone will have no parent if no

explicit parent is specified.

_deep_clone: A boolean or a weak value dictionary to control deep cloning

of submodules. If True, submodules will be cloned recursively. If a weak value dictionary is passed, it will be used to cache cloned submodules. This flag is used by init/apply/bind to avoid scope leakage.

_reset_names: If True, name=None is also passed to submodules when

cloning. Resetting names in submodules is necessary when calling .unbind.

**updates: Attribute updates.

Returns:

A clone of the this Module with the updated attributes and parent.