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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like