What's the difference between tf.Session() and tf.InteractiveSession()?

前端 未结 4 1741
-上瘾入骨i
-上瘾入骨i 2020-12-12 13:28

In which cases should tf.Session() and tf.InteractiveSession() be considered for what purpose?

When I tried to use the former one, some fun

4条回答
  •  情深已故
    2020-12-12 14:29

    On the top of installing itself as default session as per official documentation, from some tests on memory usage, it seems that the interactive session uses the gpu_options.allow_growth = True option - see [using_gpu#allowing_gpu_memory_growth] - while tf.Session() by default allocates the whole GPU memory.

提交回复
热议问题