0

I have installed tensorflow-cpu and it takes around 5 seconds to import.

Command used to install tensorflow:

pip install tensorflow-cpu

I have found other related articles on stackoverflow and github but none of them seems to help.

Note: I am using intel i7 8th gen with windows.

Muhammad Hassan
  • 4,079
  • 1
  • 13
  • 27

1 Answers1

0

5 seconds is about the time the import needs on my system as well.

If you are interested in specifics, you can use

import cProfile
cProfile.run('import tensorflow')

to profile the call.

Related: import tensorflow is very slow?, What can cause the tensorflow import to be so slow?, How to speed up import tensorflow?(Older)

code-lukas
  • 1,586
  • 9
  • 19
  • Compared to pytorch which takes less than a second, 5 secs is too much. As you can see in the github link that other people are facing the same issue as well. – Muhammad Hassan Aug 08 '22 at 14:41
  • I agree that the difference between pytorch and tensorflow seems to be a lot, however the times described in the posts seem to be in accordance with what i am benchmarking. The long import time of tensorflow doesn't seem to be an "error" though – code-lukas Aug 08 '22 at 20:28