Skip to content

update fps log printing to avoid ambiguity #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mindocr/utils/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def on_train_step_end(self, run_context):
msg = (
f"epoch: [{cur_epoch}/{cb_params.epoch_num+self.start_epoch}] "
f"step: [{cur_step_in_epoch}/{cb_params.batch_num}], "
f"loss: {loss:.6f}, " + lr_str + f"per step time: {per_step_time:.3f} ms, fps: {fps:.2f} img/s"
f"loss: {loss:.6f}, " + lr_str + f"per step time: {per_step_time:.3f} ms, fps per card: {fps:.2f} img/s"
)

self.logger.info(msg)
Expand Down Expand Up @@ -188,7 +188,7 @@ def on_train_epoch_end(self, run_context):
fps = 1000 * self.batch_size / per_step_time
msg = (
f"epoch: [{cur_epoch}/{cb_params.epoch_num+self.start_epoch}], loss: {train_loss:.6f}, "
f"epoch time: {epoch_time:.3f} s, per step time: {per_step_time:.3f} ms, fps: {fps:.2f} img/s"
f"epoch time: {epoch_time:.3f} s, per step time: {per_step_time:.3f} ms, fps per card: {fps:.2f} img/s"
)
self.logger.info(msg)

Expand Down