Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'tensorflow' has no attribute 'set_random_seed' #12

Open
bushra-tayyaba opened this issue Nov 5, 2021 · 4 comments
Open

module 'tensorflow' has no attribute 'set_random_seed' #12

bushra-tayyaba opened this issue Nov 5, 2021 · 4 comments

Comments

@bushra-tayyaba
Copy link

This error " module 'tensorflow' has no attribute 'set_random_seed'" occurs after running the following code :

from DigiPathAI.Segmentation import getSegmentation

prediction = getSegmentation(img_path,
patch_size = 256,
stride_size = 128,
batch_size = 32,
quick = True,
tta_list = None,
crf = False,
save_path = None,
status = None)

@scjjb
Copy link

scjjb commented Dec 6, 2021

I'm having the same issue, which arises because tensorflow version 2 has a different random seed function. It seems like it should be an easy fix but I haven't got it working yet

@haranrk
Copy link
Owner

haranrk commented Feb 24, 2022

@bushra-tayyaba As @scjjb says, DigiPathAI was built with Tensorflow 1.

@scjjb Does modifying it work?

@scjjb
Copy link

scjjb commented Feb 24, 2022

I never managed to resolve the issue

@codeskings
Copy link

just replacing it with
tf.random.set_seed(seed)
should solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants