TachibanaYoshino / AnimeGAN

A Tensorflow implementation of AnimeGAN for fast photo animation ! This is the Open source of the paper 「AnimeGAN: a novel lightweight GAN for photo animation」, which uses the GAN framwork to transform real-world photos into anime images.
4.46k stars 660 forks source link

ImportError: cannot import name 'trace' #56

Open Chauban opened 2 years ago

Chauban commented 2 years ago

I use the whole new conda environment, but when run the example video transfer command, error occurs:

    from tensorflow_estimator.python.estimator import estimator
  File "C:\Users\XU\.conda\envs\anime\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 36, in <module>
    from tensorflow.python.profiler import trace
ImportError: cannot import name 'trace'

(anime) E:\AI_art\AnimeGANv2-master>

How to solve it please? Thanks

2076263413 commented 2 years ago

Do you know how to slove it?Thanks

TachibanaYoshino commented 2 years ago

That should be the wrong version of your installation package.

2076263413 commented 2 years ago

oh,what version of package do you use?Thanks. 图片

2076263413 commented 2 years ago

Thank you for your help!

Chauban commented 2 years ago

Thank you for your help!

Yes, I have same version of yours. I have not addressed yet

Chauban commented 2 years ago

That should be the wrong version of your installation package.

I use the same version as the page said-

Bazifrasool commented 1 year ago

Hi , I was using Anaconda and seems it installed the wrong version of tensorflow-estimator for tensorflow 1.15 https://github.com/spyder-ide/spyder/issues/17783#issuecomment-1112562820 This solved it @Chauban

MeraMeskul commented 9 months ago

Hi there, I was struggling with different old repo, and trying to make it work. I get the same error, whole error message is :

from tensorflow.python.profiler import trace

2023-11-13 16:25:06.338656: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'trace' from 'tensorflow.python.profiler' (D:\Anaconda3_2022.10\envs\py37\lib\site-packages\tensorflow_core\python\profiler\__init__.py)

When I check it, there is no trace.py file on that folder. I am using Anaconda Prompt / Spyder with Python 3.7.16 I am using tensorflow 1.15.0. When I control the other library version some of them were different than I downgraded some of them to make it work, still the same problem. Am I missing something here or what?

Thanks.