Import tensorflow contrib module is slow in tensor

2019-07-27 04:56发布

Is there a reason for the tensorflow contrib module imports being slower in 1.2.1 than 1.1.0? I am using Python 3.5.

The overhead is not significant using the command-line, its perhaps around 2-3 seconds. However in an IDE, it becomes quite significant (~ 10 seconds to import tensorflow.contrib as opposed to (~0.5 seconds) in tensorflow 1.1.0.

Thanks in advance.

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-07-27 05:28

It is slow to import because it is doing inspect.stack() many times, which take a lot of time each time. I have reported this issue, and have submitted a PR with a fix.

查看更多
登录 后发表回答