Closed sadatnfs closed 6 years ago
Not sure if this is the Edward method of doing it, but I usually put
tf.reset_default_graph()
sess = tf.InteractiveSession()
at the top of my notebooks for quick iterations.
Ah interesting @mrosenkranz . When you run Edward codes afterwards in your notebook, do you wrap it in a with tf. .. scope
? Just checking to see what works for you :)
Yes, often I wrap stuff in with tf.variable_scope(..., reuse=tf.AUTO_REUSE)
blocks.
Perfect, this is working. Thanks @mrosenkranz !!
I'm trying to run some example code in a Jupyter Notebook, and it seems like whenever I define a variable, I am not able to reuse them, even when I have reuse=True in my scope:
I run
tf.reset_default_graph()
andtf.get_variable_scope().reuse_variables()
at the beginning of my notebook, which aren't helping. The only way right now seems to be restarting the kernel every time I want to clean out my workspace and rerun a piece of code.Is there an Edward method to do this cleanup that I'm not aware of?