Skip to content

Instantly share code, notes, and snippets.

@Tony607
Created February 23, 2018 09:40
Show Gist options
  • Save Tony607/24ec9cfa4d3565992745f72c417ee340 to your computer and use it in GitHub Desktop.
Save Tony607/24ec9cfa4d3565992745f72c417ee340 to your computer and use it in GitHub Desktop.
source: How to generate realistic yelp restaurant reviews with Keras | DLology
for iteration in range(1, 20):
print('Iteration', iteration)
with open("../dataset/short_reviews_shuffle.txt") as f:
for chunk in iter(lambda: f.read(90000), ""):
X, y = getDataFromChunk(chunk)
model.fit(X, y, batch_size=128, epochs=1, callbacks=callbacks_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment