Unverified Commit d1247b6f authored by Andrei Ivanov's avatar Andrei Ivanov Committed by GitHub
Browse files

[Misc]Improving the output of the DCRNN training script. (#5790)


Co-authored-by: default avatarMufei Li <mufeili1996@gmail.com>
parent 23772ee1
...@@ -87,7 +87,7 @@ def train( ...@@ -87,7 +87,7 @@ def train(
scheduler.step() scheduler.step()
total_loss.append(float(loss)) total_loss.append(float(loss))
batch_cnt[0] += 1 batch_cnt[0] += 1
print("Batch: ", i) print("\rBatch: ", i, end="")
return np.mean(total_loss) return np.mean(total_loss)
...@@ -284,7 +284,7 @@ if __name__ == "__main__": ...@@ -284,7 +284,7 @@ if __name__ == "__main__":
dcrnn, g, test_loader, normalizer, loss_fn, device, args dcrnn, g, test_loader, normalizer, loss_fn, device, args
) )
print( print(
"Epoch: {} Train Loss: {} Valid Loss: {} Test Loss: {}".format( "\rEpoch: {} Train Loss: {} Valid Loss: {} Test Loss: {}".format(
e, train_loss, valid_loss, test_loss e, train_loss, valid_loss, test_loss
) )
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment