Skip to content

Commit

Permalink
#53 fix - cPickle.HIGHEST_PROTOCOL incompatible with Python3
Browse files Browse the repository at this point in the history
ottokart committed Jul 17, 2020
1 parent dc2848c commit 8edec70
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data.py
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ def create_dev_test_train_split_and_vocabulary(root_path, create_vocabulary, tra
embeddings.append(e)

with open("We.pcl", 'wb') as f:
cPickle.dump(embeddings, f, cPickle.HIGHEST_PROTOCOL)
cPickle.dump(embeddings, f)
else:
vocabulary = build_vocabulary(word_counts)
write_vocabulary(vocabulary, WORD_VOCAB_FILE)
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ def save(self, file_path, gsums=None, learning_rate=None, validation_ppl_history
}

with open(file_path, 'wb') as f:
cPickle.dump(state, f, protocol=cPickle.HIGHEST_PROTOCOL)
cPickle.dump(state, f)


class GRUstage2(GRU):

0 comments on commit 8edec70

Please sign in to comment.