File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -544,17 +544,13 @@ for j in range(epochs):
544544
545545 # Summarize error and accuracy metrics at each epoch
546546 print(
547- "\n"
548- + "Epoch: "
549- + str(j)
550- + " Training set error:"
551- + str(training_loss / float(len(training_images)))[0:5]
552- + " Training set accuracy:"
553- + str(training_accurate_predictions / float(len(training_images)))
554- + " Test set error:"
555- + str(test_loss / float(len(test_images)))[0:5]
556- + " Test set accuracy:"
557- + str(test_accurate_predictions / float(len(test_images)))
547+ (
548+ f"Epoch: {j}\n"
549+ f" Training set error: {training_loss / len(training_images):.3f}\n"
550+ f" Training set accuracy: {training_accurate_predictions / len(training_images)}\n"
551+ f" Test set error: {test_loss / len(test_images):.3f}\n"
552+ f" Test set accuracy: {test_accurate_predictions / len(test_images)}"
553+ )
558554 )
559555```
560556
You can’t perform that action at this time.
0 commit comments