When working with the default global graph, is it possible to remove nodes after they\'ve been added, or alternatively to reset the default graph to empty? When working with
IPython / Jupyter notebook cells keep state between runs of a cell.
Create a custom graph:
def main(): # Define your model data = tf.placeholder(...) model = ... with tf.Graph().as_default(): main()
Once ran, the graph is cleaned up.