MCPcopy Create free account
hub / github.com/alibaba/nann / add_weight

Method add_weight

tensorflow/tensorflow/python/layers/base.py:317–482  ·  view source on GitHub ↗

Adds a new variable to the layer, or gets an existing one; returns it. Arguments: name: variable name. shape: variable shape. dtype: The type of the variable. Defaults to `self.dtype` or `float32`. initializer: initializer instance (callable). regularizer: regulari

(self,
                 name,
                 shape,
                 dtype=None,
                 initializer=None,
                 regularizer=None,
                 trainable=None,
                 constraint=None,
                 use_resource=None,
                 synchronization=vs.VariableSynchronization.AUTO,
                 aggregation=vs.VariableAggregation.NONE,
                 partitioner=None,
                 **kwargs)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 9

buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
buildMethod · 0.45
add_variable_wrappedMethod · 0.45
add_variable_wrappedMethod · 0.45

Calls 10

_set_scopeMethod · 0.95
_name_scopeMethod · 0.95
TypeErrorFunction · 0.85
executing_eagerlyMethod · 0.80
variable_scopeMethod · 0.80
global_variablesMethod · 0.45
name_scopeMethod · 0.45
as_defaultMethod · 0.45
trainable_variablesMethod · 0.45

Tested by 1

buildMethod · 0.36