Created
September 4, 2018 01:07
-
-
Save felipessalvatore/4509ad2fb23afcc0986eaba735d7de8a to your computer and use it in GitHub Desktop.
read COntraQA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
folder = "RandomSeq" | |
seq = os.listdir(folder) | |
seq.sort() | |
for file in seq: | |
path = os.path.join(folder, file, "model.test") | |
with open(path, "r") as f: | |
line = f.readline() | |
name, acc = line.split()[2:4] | |
acc = float(acc[:-1]) * 100 | |
acc = "{:.1f}".format(acc) | |
print(file, name, acc) | |
# GRUSeqTask1 'accuracy': 59.9 | |
# GRUSeqTask2 'accuracy': 63.2 | |
# GRUSeqTask12 'accuracy': 81.1 | |
# GenAttSeqTask9 'accuracy': 74.7 | |
# GenAttSeqTask10 'accuracy': 74.5 | |
# GenAttSeqTask12 'accuracy': 76.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment