diff --git a/torchx/examples/apps/tracker/main.py b/torchx/examples/apps/tracker/main.py index 86e160786..ef13e0c3d 100644 --- a/torchx/examples/apps/tracker/main.py +++ b/torchx/examples/apps/tracker/main.py @@ -74,7 +74,6 @@ def train( "Train Epoch: {} [{}/{} ({:.0f}%)]\tLoss: {:.6f}".format( epoch, batch_idx * len(data), - # pyre-ignore len(train_loader.dataset), 100.0 * batch_idx / len(train_loader), loss.item(), @@ -106,15 +105,14 @@ def test( dim=1, keepdim=True ) # get the index of the max log-probability correct += pred.eq(target.view_as(pred)).sum().item() - # pyre-ignore test_loss /= len(test_loader.dataset) print( "\nTest set: Average loss: {:.4f}, Accuracy: {}/{} ({:.0f}%)\n".format( test_loss, correct, - len(test_loader.dataset), # pyre-ignore - 100.0 * correct / len(test_loader.dataset), # pyre-ignore + len(test_loader.dataset), + 100.0 * correct / len(test_loader.dataset), ) )