python3 runGan.py 1: AttributeError: module 'tensorflow' has no attribute 'set_random_seed'
See original GitHub issuemacOS 10.15.6 (tensorflow, not tensorflow-gpu: tensorflow-2.3.0-cp38-cp38-macosx_10_11_x86_64.whl).
$ python3 runGan.py 1
Testing test case 1
Traceback (most recent call last):
File "main.py", line 19, in <module>
tf.set_random_seed(1234)
AttributeError: module 'tensorflow' has no attribute 'set_random_seed'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13
Top Results From Across the Web
module 'tensorflow' has no attribute 'set_random_seed' · Issue ...
tf2.0 tf.set_random_seed(self._seed) AttributeError: module 'tensorflow' has no attribute 'set_random_seed'
Read more >Ask Question - Stack Overflow
I checked out this (AttributeError: 'module' object has no attribute 'set_random_seed') question on stackoverflow but it doesn't really apply to ...
Read more >module 'tensorflow' has no attribute 'set_random_seed'
attributeerror : module 'tensorflow' has no attribute 'set_random_seed' site:stackoverflow.com. Add Answer | View In TPC Matrix.
Read more >python3 runGan.py 1: AttributeError: module 'tensorflow' has ...
Eh, I tried pip install -Iv tensorflow==1.8.0 and that just generated a lot of output and then failed with ERROR: Could not find...
Read more >module 'tensorflow.random' has no attribute 'set_seed' code ...
Example 1: module 'tensorflow' has no attribute 'set_random_seed' tf.random.set_seed(seed) Example 2: AttributeError: module 'tensorflow' has no attribute ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I have solved all the errors , just use TensorFlow 1.8.0 and Keras 2.1.5 version and do not change the
tf.random.set_seed(1234)
usetf.set_random_seed(1234)
it was working in my case.
Thanks.
For anyone who stumbled upon here from google or just by the issues:
Python 3.6 is the last version Tensorflow 1.8 supports so I installed that. I also needed to manually install Keras 2.1.5 like @ayush9198gupta said.
After that it’s working.