I am trying to use the library Deepbrain to extract brains from the entire MRIs scan I am using the code
def Reduce_Brain(img):
img_data = img.get_fdata()
prob = ext.run(img)
print(prob)
img = nib.load('ADNI_002_S_0295.nii')
Reduce_Brain(img)
however, when I tried this I got the error module 'tensorflow' has no attribute 'Session' which I found was an error to do with the wrong version of tensorflow so I then changed the library code as said in the other question (see below). but this produced more errors such as module 'tensorflow' has no attribute 'gfile'
Tensorflow 2.0 - AttributeError: module 'tensorflow' has no attribute 'Session'