min moica
min moica

Reputation: 139

tensorflow variable declaration what does point do?

when we declare the Tensorflow variable

W = tf.Variable([.3], dtype = tf.float32)
b = tf.Variable([-.3], dtype = tf.float32)

what does .3 and -.3 mean in this declaration?

Upvotes: 0

Views: 46

Answers (2)

Krunal Kapadiya
Krunal Kapadiya

Reputation: 3073

For variable W the shape will be .3 in one dimension, same as variable b the shape will be -.3. Default dtype for this tensor is tf.float32. So it will be ok if You declare variable like,

W = tf.Variable([.3])
b = tf.Variable([-.3])

To know more about TensorFlow variables, follow this tensorflow documentation

Upvotes: 0

Maosi Chen
Maosi Chen

Reputation: 1491

Initialize the variable with the given array.

Upvotes: 1

Related Questions