Switches epoch and iteration to be in the proper order for the custom training loop (#2171)

This commit is contained in:
Joseph Guhlin 2024-08-20 03:37:12 +12:00 committed by GitHub
parent d4a1d2026d
commit 2755c36ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ pub fn run<B: AutodiffBackend>(device: B::Device) {
println!( println!(
"[Train - Epoch {} - Iteration {}] Loss {:.3} | Accuracy {:.3} %", "[Train - Epoch {} - Iteration {}] Loss {:.3} | Accuracy {:.3} %",
iteration,
epoch, epoch,
iteration,
loss.clone().into_scalar(), loss.clone().into_scalar(),
accuracy, accuracy,
); );
@ -104,8 +104,8 @@ pub fn run<B: AutodiffBackend>(device: B::Device) {
println!( println!(
"[Valid - Epoch {} - Iteration {}] Loss {} | Accuracy {}", "[Valid - Epoch {} - Iteration {}] Loss {} | Accuracy {}",
iteration,
epoch, epoch,
iteration,
loss.clone().into_scalar(), loss.clone().into_scalar(),
accuracy, accuracy,
); );