Commit 665375a8 authored by Sebastian Nickels's avatar Sebastian Nickels
Browse files

Fixed some syntax

parent 94fe11a1
Pipeline #193069 failed with stages
in 17 seconds
......@@ -249,15 +249,15 @@ class ${tc.fileNameWithoutEnding}:
sentence = ''
for batchEntry in batch.label:
sentence += dict[int(batchEntry[index].asscalar())] + ' '
print "############################"
print "label: ", sentence
print "prediction: ", prediction[index]
print("############################")
print("label: ", sentence)
print("prediction: ", prediction[index])
BLEUscore = nltk.translate.bleu_score.sentence_bleu([sentence], prediction[index])
NISTscore = nltk.translate.nist_score.sentence_nist([sentence], prediction[index])
print "BLEU: ", BLEUscore
print "NIST: ", NISTscore
print "############################"
print("BLEU: ", BLEUscore)
print("NIST: ", NISTscore)
print("############################")
metric.update(preds=predictions, labels=labels)
train_metric_score = metric.get()[1]
......
......@@ -247,15 +247,15 @@ class CNNSupervisedTrainer_Alexnet:
sentence = ''
for batchEntry in batch.label:
sentence += dict[int(batchEntry[index].asscalar())] + ' '
print "############################"
print "label: ", sentence
print "prediction: ", prediction[index]
print("############################")
print("label: ", sentence)
print("prediction: ", prediction[index])
BLEUscore = nltk.translate.bleu_score.sentence_bleu([sentence], prediction[index])
NISTscore = nltk.translate.nist_score.sentence_nist([sentence], prediction[index])
print "BLEU: ", BLEUscore
print "NIST: ", NISTscore
print "############################"
print("BLEU: ", BLEUscore)
print("NIST: ", NISTscore)
print("############################")
metric.update(preds=predictions, labels=labels)
train_metric_score = metric.get()[1]
......
......@@ -247,15 +247,15 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
sentence = ''
for batchEntry in batch.label:
sentence += dict[int(batchEntry[index].asscalar())] + ' '
print "############################"
print "label: ", sentence
print "prediction: ", prediction[index]
print("############################")
print("label: ", sentence)
print("prediction: ", prediction[index])
BLEUscore = nltk.translate.bleu_score.sentence_bleu([sentence], prediction[index])
NISTscore = nltk.translate.nist_score.sentence_nist([sentence], prediction[index])
print "BLEU: ", BLEUscore
print "NIST: ", NISTscore
print "############################"
print("BLEU: ", BLEUscore)
print("NIST: ", NISTscore)
print("############################")
metric.update(preds=predictions, labels=labels)
train_metric_score = metric.get()[1]
......
......@@ -247,15 +247,15 @@ class CNNSupervisedTrainer_VGG16:
sentence = ''
for batchEntry in batch.label:
sentence += dict[int(batchEntry[index].asscalar())] + ' '
print "############################"
print "label: ", sentence
print "prediction: ", prediction[index]
print("############################")
print("label: ", sentence)
print("prediction: ", prediction[index])
BLEUscore = nltk.translate.bleu_score.sentence_bleu([sentence], prediction[index])
NISTscore = nltk.translate.nist_score.sentence_nist([sentence], prediction[index])
print "BLEU: ", BLEUscore
print "NIST: ", NISTscore
print "############################"
print("BLEU: ", BLEUscore)
print("NIST: ", NISTscore)
print("############################")
metric.update(preds=predictions, labels=labels)
train_metric_score = metric.get()[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment