-
Notifications
You must be signed in to change notification settings - Fork 119
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
AttributeError: module 'keras.backend' has no attribute 'get_graph' #97
Comments
I also got the same error. |
hi, I got the same error |
I also got the same error. Did you solve it? |
It is most likely due to the latest TF changes. Can you try fresh with Python==3.9 or 3.10 and use `pip install -r requirements.txt` from this project: https://github.com/ehsanhaghighat/En-DeepONet
… On Nov 6, 2023, at 4:29 AM, ziqiang-shi ***@***.***> wrote:
I also got the same error. Did you solve it?
—
Reply to this email directly, view it on GitHub <https://github.com/sciann/sciann/issues/97#issuecomment-1794713058>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AHMBIZ2XBVYXHJENNS65RTDYDDJ2JAVCNFSM6AAAAAA4IZWBI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJUG4YTGMBVHA>.
You are receiving this because you are subscribed to this thread.
|
Hi, I had the same issue. For my project environment I used
And, It worked perfectly. |
I had the same issue in Google Colab that currently has TF 2.14 by default. I installed TF 2.11 and it worked. I had to uninstall pip uninstall tensorflow-datasets tensorflow-metadata -y
pip install tensorflow==2.11
pip install sciann |
Hi. I encounter this error when importing SciANN:
AttributeError: module 'keras.backend' has no attribute 'get_graph'
I have installed the latest version of keras and Tensorflow. Can anyone help me?
Here is the full text of the error:
AttributeError Traceback (most recent call last)
Cell In[2], line 2
1 import numpy as np
----> 2 import sciann as sn
3 from sciann.utils.math import abs, diff
4 from itertools import cycle
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\sciann_init_.py:10
7 tf.get_logger().setLevel('ERROR')
8 tf.compat.v1.disable_eager_execution()
---> 10 from . import constraints
11 from . import functionals
12 from . import models
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\sciann\constraints_init_.py:7
3 from future import division
4 from future import print_function
----> 7 from . import constraint
8 from . import data
9 from . import pde
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\sciann\constraints\constraint.py:8
5 from future import division
6 from future import print_function
----> 8 from ..utils import is_tensor
11 class Constraint(object):
12 """ Configures the condition to impose constraint.
13
14 # Arguments
(...)
23 ValueError for unrecognized inputs.
24 """
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\sciann\utils_init_.py:7
3 from future import division
4 from future import print_function
----> 7 from . import math
8 from . import utilities
9 from . import validations
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\sciann\utils\math.py:10
8 import tensorflow as tf
9 from keras import backend as K
---> 10 graph_unique_name = K.get_graph().unique_name
12 from keras.layers import Layer, Lambda, Flatten, Dense
13 from keras.layers import Dot
AttributeError: module 'keras.backend' has no attribute 'get_graph
The text was updated successfully, but these errors were encountered: