fjxmlzn / DoppelGANger

[IMC 2020 (Best Paper Finalist)] Using GANs for Sharing Networked Time Series Data: Challenges, Initial Promise, and Open Questions
http://arxiv.org/abs/1909.13403
BSD 3-Clause Clear License
296 stars 75 forks source link

Problem with tensorflow #42

Closed AlexRepetti closed 1 year ago

AlexRepetti commented 1 year ago

Hello, I downloaded the DoppelGanger but I have problems when executing the code

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    from gan.doppelganger import DoppelGANger
  File "..\gan\doppelganger.py", line 1, in <module>
    import tensorflow as tf
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py", line 51, in <module>
    from ._api.v2 import compat
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\_api\v2\compat\__init__.py", line 37, in <module>
    from . import v1
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\_api\v2\compat\v1\__init__.py", line 30, in <module>
    from . import compat
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\_api\v2\compat\v1\compat\__init__.py", line 37, in <module>
    from . import v1
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\_api\v2\compat\v1\compat\v1\__init__.py", line 31, in <module>
    from tensorflow._api.v2.compat.v1 import config
  File "C:\Users\A-rep\AppData\Roaming\Python\Python38\site-packages\tensorflow\_api\v2\compat\v1\config\__init__.py", line 14, in <module>
    from tensorflow.python.eager.def_function import experimental_functions_run_eagerly
ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function'

I'm using tensorflow version 1.15.0 and python 3.9

fjxmlzn commented 1 year ago

Please double-check if you are activating the correct python environment, as the error messages suggest that you are using Python3.8 instead of python 3.9. Also, this error pops out when executing "import tensorflow as tf". It has nothing to do with DoppelGANger, but is related to your TensorFlow installation.