python template.format()

   template = 'Epoch {}, Loss: {}, Accuracy: {}, Test Loss: {}, Test Accuracy: {}'
   print(template.format(epoch + 1,
                          train_loss.result(),
                          train_accuracy.result() * 100,
                          test_loss.result(),
                          test_accuracy.result() * 100))

 

posted @ 2020-09-21 14:26  说分手后还能做炮友?  阅读(408)  评论(0编辑  收藏  举报