Tensorflow Set_Seed Error When Running Autoencoder

Tensorflow Set_Seed Error When Running Autoencoder

I am trying to run the code from here,

but am getting this error,

File "C:/Users/rupert/Versioning/PCTSoftware/Libraries/python/tensorflow/autoencoders/autoencoder-full.py", line 12, in tf.random.set_seed(1)

AttributeError: module 'tensorflow._api.v1.random' has no attribute 'set_seed'

Any ideas on how to resolve?

Tensorflow 1.13 Windows 7

1

2 Answers

Try this:

tf.random.set_random_seed(1)
0

As you can see, the post is focusing on the version 2.0.0 of tensorflow. You should run their code with their version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.