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

Method _ref

tensorflow/python/ops/variables.py:2166–2180  ·  view source on GitHub ↗

Returns a reference to this variable. You usually do not need to call this method as all ops that need a reference to the variable call it automatically. Returns is a `Tensor` which holds a reference to the variable. You can assign a new value to the variable by passing the tensor

(self)

Source from the content-addressed store, hash-verified

2164 return array_ops.identity(self._variable, name="read")
2165
2166 def _ref(self):
2167 """Returns a reference to this variable.
2168
2169 You usually do not need to call this method as all ops that need a reference
2170 to the variable call it automatically.
2171
2172 Returns is a `Tensor` which holds a reference to the variable. You can
2173 assign a new value to the variable by passing the tensor to an assign op.
2174 See `tf.Variable.value` if you want to get the value of the
2175 variable.
2176
2177 Returns:
2178 A `Tensor` that is a reference to the variable.
2179 """
2180 return self._variable
2181
2182 def set_shape(self, shape):
2183 """Overrides the shape for this variable.

Callers 15

set_shapeMethod · 0.95
_strided_slice_assignMethod · 0.95
targetMethod · 0.45
testRefSwitchMethod · 0.45
testWhileWithRefs_1Method · 0.45
testTensorsMethod · 0.45
testIndexedSlicesMethod · 0.45
testControlDepsNoneMethod · 0.45

Calls

no outgoing calls

Tested by 10

testRefSwitchMethod · 0.36
testWhileWithRefs_1Method · 0.36
testTensorsMethod · 0.36
testIndexedSlicesMethod · 0.36
testControlDepsNoneMethod · 0.36
testCustomInitOpMethod · 0.36