DigiPathAI
DigiPathAI copied to clipboard
module 'tensorflow' has no attribute 'set_random_seed'
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)
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
@bushra-tayyaba As @scjjb says, DigiPathAI was built with Tensorflow 1.
@scjjb Does modifying it work?
I never managed to resolve the issue
just replacing it with tf.random.set_seed(seed) should solve this issue.