-
Notifications
You must be signed in to change notification settings - Fork 4
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
tensorflow issue? #1
Comments
It seems that the problem is caused by incorrect installation of tensorflow and keras. What verions of tensorflow and keras are you using? |
I have followed the installation guide provided in the site. Here is the list of installed packages: $ conda list | grep "keras" |
You can try to install tensorflow and keras through anaconda channel (conda install -c anaconda tensorflow=1.14 keras=2.3.1). This might solve your problem. |
Thanks for the suggestion but the issue still persists! |
It seems like there is a conflict with the metaclass in your code. The metaclass of a derived class must be a subclass of the metaclasses of all its bases. Double-check the inheritance hierarchy of your classes to ensure that the metaclasses are compatible. |
I successfully installed the package but I get an error when I try to run the first tutorial file: "01_True_positive_and_false_negative_examples_of_the_EqT_model.py".
I would appreciate it if you could help me to solve this problem. I have already tried to reinstall tensorflow and keras but the issue still persists.
The error is as below:
Using TensorFlow backend.
TypeError Traceback (most recent call last)
in
12 import numpy as np
13 import matplotlib.pyplot as plt
---> 14 from keras.models import load_model, Model
15 from EqT_libs.EqT_utils import DataGeneratorPrediction, picker, generate_arrays_from_file
16 from EqT_libs.EqT_utils import f1, SeqSelfAttention, FeedForward, LayerNormalization
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/init.py in
1 from future import absolute_import
2
----> 3 from . import utils
4 from . import activations
5 from . import applications
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/utils/init.py in
4 from . import data_utils
5 from . import io_utils
----> 6 from . import conv_utils
7 from . import losses_utils
8 from . import metrics_utils
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/utils/conv_utils.py in
7 from six.moves import range
8 import numpy as np
----> 9 from .. import backend as K
10
11
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/backend/init.py in
----> 1 from .load_backend import epsilon
2 from .load_backend import set_epsilon
3 from .load_backend import floatx
4 from .load_backend import set_floatx
5 from .load_backend import cast_to_floatx
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/backend/load_backend.py in
88 elif _BACKEND == 'tensorflow':
89 sys.stderr.write('Using TensorFlow backend.\n')
---> 90 from .tensorflow_backend import *
91 else:
92 # Try and load external backend.
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in
3 from future import print_function
4
----> 5 import tensorflow as tf
6 from tensorflow.python.eager import context
7 from tensorflow.python.framework import device as tfdev
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/tensorflow/init.py in
26
27 # pylint: disable=g-bad-import-order
---> 28 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
29 from tensorflow.python.tools import module_util as _module_util
30
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/tensorflow/python/init.py in
61
62 # Framework
---> 63 from tensorflow.python.framework.framework_lib import * # pylint: disable=redefined-builtin
64 from tensorflow.python.framework.versions import *
65 from tensorflow.python.framework import config
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/tensorflow/python/framework/framework_lib.py in
23 # Classes used when building a Graph.
24 from tensorflow.python.framework.device import DeviceSpec
---> 25 from tensorflow.python.framework.ops import Graph
26 from tensorflow.python.framework.ops import Operation
27 from tensorflow.python.framework.ops import Tensor
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/tensorflow/python/framework/ops.py in
52 from tensorflow.python.framework import versions
53 from tensorflow.python.ops import control_flow_util
---> 54 from tensorflow.python.platform import app
55 from tensorflow.python.platform import tf_logging as logging
56 from tensorflow.python.util import compat
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/tensorflow/python/platform/app.py in
21 import sys as _sys
22
---> 23 from absl.app import run as _run
24
25 from tensorflow.python.platform import flags
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/absl/app.py in
35
36 from absl import command_name
---> 37 from absl import flags
38 from absl import logging
39
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/absl/flags/init.py in
33 import warnings
34
---> 35 from absl.flags import _argument_parser
36 from absl.flags import _defines
37 from absl.flags import _exceptions
~/Programs/miniconda3/envs/seqt/lib/python3.6/site-packages/absl/flags/_argument_parser.py in
80
81
---> 82 class ArgumentParser(Generic[_T], metaclass=_ArgumentParserCache):
83 """Base class used to parse and convert arguments.
84
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
The text was updated successfully, but these errors were encountered: