fix prints for py3.5

This commit is contained in:
Jiri BOROVEC
2019-08-06 22:45:46 +02:00
parent a8f07adfe9
commit 632d07b490
10 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ def run_prediction(dataloader, trained_model):
print(val_acc)
assert val_acc > 0.70, f'this model is expected to get > 0.7 in test set (it got {val_acc})'
assert val_acc > 0.70, 'this model is expected to get > 0.7 in test set (it got %f)' % val_acc
def main():
+2 -2
View File
@@ -670,13 +670,13 @@ def run_prediction(dataloader, trained_model):
print(val_acc)
assert val_acc > 0.50, f'this model is expected to get > 0.50 in test set (it got {val_acc})'
assert val_acc > 0.50, 'this model is expected to get > 0.50 in test set (it got %f)' % val_acc
def assert_ok_acc(trainer):
# this model should get 0.80+ acc
acc = trainer.tng_tqdm_dic['val_acc']
assert acc > 0.50, f'model failed to get expected 0.50 validation accuracy. Got: {acc}'
assert acc > 0.50, 'model failed to get expected 0.50 validation accuracy. Got: %f' % acc
if __name__ == '__main__':