Skip to content

Commit

Permalink
[*] format
Browse files Browse the repository at this point in the history
  • Loading branch information
acgist committed Oct 22, 2024
1 parent 47fdcca commit 345901a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions model/include/lifuren/Model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void lifuren::Model<D, O, I, L, M, P>::train(size_t epoch) {
auto z = std::chrono::system_clock::now();
if(this->params.classify) {
SPDLOG_INFO(
"当前训练第 {} 轮,损失值为:{},正确率为:{} / {},耗时:{}。",
"当前训练第 {} 轮,损失值为:{:.6f},正确率为:{} / {},耗时:{}。",
epoch,
loss_val / batch_count,
accu_val,
Expand All @@ -226,7 +226,7 @@ void lifuren::Model<D, O, I, L, M, P>::train(size_t epoch) {
);
} else {
SPDLOG_INFO(
"当前训练第 {} 轮,损失值为:{},耗时:{}。",
"当前训练第 {} 轮,损失值为:{:.6f},耗时:{}。",
epoch,
loss_val / batch_count,
std::chrono::duration_cast<std::chrono::milliseconds>((z - a)).count()
Expand Down Expand Up @@ -262,7 +262,7 @@ void lifuren::Model<D, O, I, L, M, P>::val(size_t epoch) {
auto z = std::chrono::system_clock::now();
if(this->params.classify) {
SPDLOG_INFO(
"当前验证第 {} 轮,损失值为:{},正确率为:{} / {},耗时:{}。",
"当前验证第 {} 轮,损失值为:{:.6f},正确率为:{} / {},耗时:{}。",
epoch,
loss_val / batch_count,
accu_val,
Expand All @@ -271,7 +271,7 @@ void lifuren::Model<D, O, I, L, M, P>::val(size_t epoch) {
);
} else {
SPDLOG_INFO(
"当前验证第 {} 轮,损失值为:{},耗时:{}。",
"当前验证第 {} 轮,损失值为:{:.6f},耗时:{}。",
epoch,
loss_val / batch_count,
std::chrono::duration_cast<std::chrono::milliseconds>((z - a)).count()
Expand Down Expand Up @@ -307,15 +307,15 @@ void lifuren::Model<D, O, I, L, M, P>::test() {
auto z = std::chrono::system_clock::now();
if(this->params.classify) {
SPDLOG_INFO(
"当前测试损失值为:{},正确率为:{} / {},耗时:{}。",
"当前测试损失值为:{:.6f},正确率为:{} / {},耗时:{}。",
loss_val / batch_count,
accu_val,
data_val,
std::chrono::duration_cast<std::chrono::milliseconds>((z - a)).count()
);
} else {
SPDLOG_INFO(
"当前测试损失值为:{},耗时:{}。",
"当前测试损失值为:{:.6f},耗时:{}。",
loss_val / batch_count,
std::chrono::duration_cast<std::chrono::milliseconds>((z - a)).count()
);
Expand Down

0 comments on commit 345901a

Please sign in to comment.