MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / get_local_variable

Function get_local_variable

tensorflow/python/ops/variable_scope.py:2079–2114  ·  view source on GitHub ↗
(  # pylint: disable=missing-docstring
    name,
    shape=None,
    dtype=None,
    initializer=None,
    regularizer=None,
    trainable=False,  # pylint: disable=unused-argument
    collections=None,
    caching_device=None,
    partitioner=None,
    validate_shape=True,
    use_resource=None,
    custom_getter=None,
    constraint=None,
    synchronization=VariableSynchronization.AUTO,
    aggregation=VariableAggregation.NONE)

Source from the content-addressed store, hash-verified

2077# So, if you are updating the arguments, also update arguments to get_variable.
2078@tf_export(v1=["get_local_variable"])
2079def get_local_variable( # pylint: disable=missing-docstring
2080 name,
2081 shape=None,
2082 dtype=None,
2083 initializer=None,
2084 regularizer=None,
2085 trainable=False, # pylint: disable=unused-argument
2086 collections=None,
2087 caching_device=None,
2088 partitioner=None,
2089 validate_shape=True,
2090 use_resource=None,
2091 custom_getter=None,
2092 constraint=None,
2093 synchronization=VariableSynchronization.AUTO,
2094 aggregation=VariableAggregation.NONE):
2095 if collections:
2096 collections += [ops.GraphKeys.LOCAL_VARIABLES]
2097 else:
2098 collections = [ops.GraphKeys.LOCAL_VARIABLES]
2099 return get_variable(
2100 name,
2101 shape=shape,
2102 dtype=dtype,
2103 initializer=initializer,
2104 regularizer=regularizer,
2105 trainable=False,
2106 collections=collections,
2107 caching_device=caching_device,
2108 partitioner=partitioner,
2109 validate_shape=validate_shape,
2110 use_resource=use_resource,
2111 synchronization=synchronization,
2112 aggregation=aggregation,
2113 custom_getter=custom_getter,
2114 constraint=constraint)
2115
2116
2117get_local_variable.__doc__ = get_variable_or_local_docstring % (

Callers

nothing calls this directly

Calls 1

get_variableFunction · 0.85

Tested by

no test coverage detected