get_default_scope_name

tfsnippet.utils.get_default_scope_name(name, cls_or_instance=None)

Generate a valid default scope name.

Parameters:
  • name (str) – The base name.
  • cls_or_instance – The class or the instance object, optional. If it has attribute variable_scope, then variable_scope.name will be used as a hint for the name prefix. Otherwise, its class name will be used as the name prefix.
Returns:

The generated scope name.

Return type:

str