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

code not running on google colab. #5

Open
rajeshtva opened this issue Jan 26, 2021 · 0 comments
Open

code not running on google colab. #5

rajeshtva opened this issue Jan 26, 2021 · 0 comments

Comments

@rajeshtva
Copy link

rajeshtva commented Jan 26, 2021

I had copied entire project and pasted it on google colab. It is throwing errors. because it is using deepbrain package which uses tensorflow v1 as backend. and colab is using tensorflow version 2 since a while. the error is :

LOADING DATA...

/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:10: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).

* deprecated from version: 3.0
* Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
  # Remove the CWD from sys.path while we load stuff.

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

<ipython-input-28-4ee8cd402a2d> in <module>()
     80     y = []
     81     for T1_,FLAIR_,IR_,seg_ in zip(T1path, FLAIRpath, IRpath, segpath):
---> 82         T1 = histeq(to_uint8(get_data_with_skull_scraping(T1_)))
     83         IR = IR_to_uint8(get_data(IR_))
     84         FLAIR = to_uint8(get_data(FLAIR_))

2 frames

/usr/local/lib/python3.6/dist-packages/deepbrain/extractor.py in load_pb(self)
     16 
     17     def load_pb(self):
---> 18         print(tf.__version__)
     19         graph = tf.Graph()
     20         print(tf.Session(graph=graph))

AttributeError: module 'tensorflow' has no attribute 'Session'

kindly help

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

1 participant