Keras 3 API documentation / Scope / Context Managers

Context Managers

[source]

device function

keras.device(device_name)

[source]

name_scope class

keras.name_scope(name, **kwargs)

Creates a sub-namespace for variable paths.

Arguments

  • name: Name of the current scope (string).
  • caller: Optional ID of a caller object (e.g. class instance).
  • deduplicate: If True, if caller was passed, and the previous caller matches the current caller, and the previous name matches the current name, do not reenter a new namespace.
  • override_parent: Can be used to provide an absolute path which would override any previously opened name scopes.