W3cubDocs

/TensorFlow 2.3

tf.keras.backend.random_uniform_variable

View source on GitHub

Instantiates a variable with values drawn from a uniform distribution.

Arguments
shape Tuple of integers, shape of returned Keras variable.
low Float, lower boundary of the output interval.
high Float, upper boundary of the output interval.
dtype String, dtype of returned Keras variable.
name String, name of returned Keras variable.
seed Integer, random seed.
Returns
A Keras variable, filled with drawn samples.

Example:

kvar = tf.keras.backend.random_uniform_variable(shape=(2,3),
low=0.0, high=1.0)
kvar
<tf.Variable 'Variable:0' shape=(2, 3) dtype=float32, numpy=...,
dtype=float32)>

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/keras/backend/random_uniform_variable