OK. Here is the markdown for the whole post, since this is just for testing and not on my repo:
title: "My First Post"
def preprocess_data(flags, sequence_lengths=False):
"""Load data, shuffle it, process the vocabulary and save to DATA_FILENAME, if not done already.
Returns processed data. NOTE: If the max_doc_len changes from a previous run,
then DATA_FILENAME should be deleted so that it can be properly recreated."""
preprocessed_path = path.join(flags.model_dir, DATA_FILENAME)
with open(preprocessed_path, 'rb') as f:
train_raw, x_train, y_train, x_test, y_test, \
train_lengths, test_lengths, classes = pickle.load(f)
# Get the raw data, downloading it if necessary.
train_raw, test_raw, classes = get_data(flags.data_dir)
# Seeding is necessary for reproducibility.
# Shuffle data to make the distribution of classes roughly stratified for each mini-batch.
# This is not necessary for full batch training, but is essential for mini-batch training.
train_raw = shuffle(train_raw)
test_raw = shuffle(test_raw)
train_sentences, y_train, test_sentences, y_test = extract_data(train_raw, test_raw)
# Encode the raw data as integer vectors.
x_train, x_test, train_lengths, test_lengths, _, _ = process_vocabulary(
train_sentences, test_sentences, flags,
# Save the processed data to avoid re-processing.
saved = False
with open(preprocessed_path, 'wb') as f:
pickle.dump([train_raw, x_train, y_train, x_test, y_test,
train_lengths, test_lengths, classes], f)
saved = True
except (OverflowError, MemoryError):
# Can happen if max-doc-len is large.
if not saved:
return train_raw, x_train, y_train, x_test, y_test, train_lengths, test_lengths, classes
I followed the Quick Start guide, creating a new hugo site, installing the
ananke theme and then adding the new post. I tried with no theme, but I could not see my post when I did this. I’m not sure why.