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 'get_default_session' #163

Open
abhiHunts opened this issue Jan 22, 2021 · 4 comments
Open

module 'tensorflow' has no attribute 'get_default_session' #163

abhiHunts opened this issue Jan 22, 2021 · 4 comments

Comments

@abhiHunts
Copy link

I installed tensorrec in brand new Virtualenv and stuck here.

\lib\site-packages\tensorrec\session_management.py in get_session()
10 if _session is None:
---> 11 if tf.get_default_session() is not None:
12 _session = tf.get_default_session()
13 else:

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

installed tensorflow 2.0.4 version

@abhiHunts abhiHunts reopened this Jan 22, 2021
@dkolokotronis-artefact
Copy link

I have the same issue. Is there any chance that you found something?

@samhiggs
Copy link

I'm getting this issue as well. I tried with version Tensorflow 1.15 and version 2.3..
Any suggestions?

@ChrisDelClea
Copy link

@jfkirk , great package and good work. It is very inuitive to use.
Problem is the session handling. TF 2.0 has changed.
Could you please update tensorec to make it compatable with TF 2.0?

Best regards
Chris

@edtegomez
Copy link

Correct, the session handling. TF > 2.0 has changed. This attribute is not longer required.

def get_session(): global _session # Build/retrieve the session if it doesn't exist if _session is None: if tf.get_default_session() is not None: _session = tf.compat.v1.Session() else: _session = tf.Session() return _session

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

5 participants