Type IVariable
Namespace tensorflow.compat.v2
Interfaces IEnumerable, IGraphNodeBase
Methods
- assign
- assign_add
- assign_sub
- batch_scatter_update
- count_up_to
- eval
- gather_nd
- load
- scatter_add
- scatter_div
- scatter_max
- scatter_min
- scatter_mul
- scatter_nd_add
- scatter_nd_sub
- scatter_nd_update
- scatter_sub
- scatter_update
- sparse_read
Properties
Public instance methods
object assign(object value, object use_locking, object name, object read_value)
object assign_add(object delta, object use_locking, object name, object read_value)
object assign_sub(object delta, object use_locking, object name, object read_value)
object batch_scatter_update(object sparse_delta, object use_locking, object name)
object count_up_to(object limit)
object eval(object session)
Evaluates the value of a variable.
Returns
-
object
- A Numpy array. Examples: ```python >>> from keras import backend as K >>> kvar = K.variable(np.array([[1, 2], [3, 4]]), dtype='float32') >>> K.eval(kvar) array([[ 1., 2.], [ 3., 4.]], dtype=float32) ```