mirror of
https://gitee.com/fastnlp/fastNLP.git
synced 2024-11-30 03:07:59 +08:00
update
This commit is contained in:
parent
501ffb26c5
commit
0430067faf
@ -164,7 +164,7 @@ class BaseTrainer(object):
|
||||
self.grad_backward(loss)
|
||||
self.update()
|
||||
|
||||
if step % kwargs["n_print"] == 0:
|
||||
if kwargs["n_print"] > 0 and step % kwargs["n_print"] == 0:
|
||||
end = time.time()
|
||||
diff = timedelta(seconds=round(end - kwargs["start"]))
|
||||
print_output = "[epoch: {:>3} step: {:>4}] train loss: {:>4.2} time: {}".format(
|
||||
|
Loading…
Reference in New Issue
Block a user