mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-11-02 13:00:17 +08:00
global step
This commit is contained in:
@ -58,7 +58,7 @@ class NLPAutoRegressionConfigs(TrainValidConfigs):
|
|||||||
data, target = batch[0].to(self.device), batch[1].to(self.device)
|
data, target = batch[0].to(self.device), batch[1].to(self.device)
|
||||||
|
|
||||||
if self.mode.is_train:
|
if self.mode.is_train:
|
||||||
tracker.add_global_step(len(data))
|
tracker.add_global_step(data.shape[0] * data.shape[1])
|
||||||
|
|
||||||
with self.mode.update(is_log_activations=batch_idx.is_last):
|
with self.mode.update(is_log_activations=batch_idx.is_last):
|
||||||
output, *_ = self.model(data)
|
output, *_ = self.model(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user