We will proceed with the recipe as follows:
- We will start by loading the necessary libraries, including the aforementioned text_helpers.py script, where we will put our functions for text loading and manipulation. We will then start a graph session:
import tensorflow as tf import matplotlib.pyplot as plt import numpy as np import random import os import pickle import string import requests import collections import io import tarfile import urllib.request import text_helpers from nltk.corpus import stopwords sess = tf.Session()
- We want to make sure that our temporary data and parameter saving folder exists before we start saving to it. Use the following code to check this:
# Make a saving directory if it doesn't exist ...