Tensorflow 1.2.1 :AttributeError: module 'tensorflow' has no attribute 'random'

1.1k views Asked by At

I have installed tensorflow 1.2.1 and whenever i try to run

c=tf.random.normal(shape=(3,4),dtype=tf.float32)

I get the error AttributeError: module 'tensorflow' has no attribute 'random'

1

There are 1 answers

0
Aniket Bote On BEST ANSWER

Use

c = tf.random_normal(shape=(3,4),dtype=tf.float32))

See the full list of available APIs here

See the usage here