While I understood the differences between tf.InteractiveSession()
and tf.Session()
as shown in this answer, which one is preferable for large projects and creating libraries?
For example, why do libraries like Sonnet use tf.Session()
over tf.InteractiveSession()
despite the latter's advantages listed in that answer?
Asked
Active
Viewed 618 times
0

nikpod
- 1,238
- 14
- 22
-
2If you look at source code for InteractiveSession in [session.py](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/client/session.py#L1556), you can see it's just a few lines of code wrapping Session. Essentially the only difference is that it registers session as the default session. If you envision use-cases with more than one session, use regular tf.Session – Yaroslav Bulatov Jun 18 '17 at 18:27
-
@YaroslavBulatov, there is no other limitation of `tf.InteractiveSession()` otherwise, am I right? Thanks for your help – nikpod Jun 18 '17 at 18:30