- When running a TensorFlow program, we may want to check that no other graph session is already in memory, or that the graph session is cleared after debugging a program. We can accomplish this by using the following command line:
from tensorflow.python.framework import ops ops.reset_default_graph()
- When dealing with text (or any data pipeline), we need to be sure that we save how we process the data, so that we can process future evaluation data the same way. If we are dealing with text, for example, we need to be sure we can save and load the vocabulary dictionary. The following code is an example of how to save the vocabulary dictionary with the JSON library:
import json word_list = ['to', 'be', 'or', 'not', 'to', 'be'] ...