I came across this code in PyTorch's example code:
if batch % 100 == 0:
loss, current = loss.item(), (batch + 1) * len(X)
print(f"loss: {loss:>7f} [{current:>5d}/{size:>5d}]")
and
print(f"Test Error: \n Accuracy: {(100*correct):>0.1f}%, Avg loss: {test_loss:>8f} \n")
Assuming it may have something to do with decimal places or the number of digits to display, I tried some sample code like:
size=46323656
current=3
loss=4.6362635675
print(f"loss: {loss:>7f} [{current:>5d}/{size:>5d}]")
and the output is:
loss: 4.636264 [ 3/46323656]
But the output makes no sense. Does anyone know what the ":>" is meant for? I've heard of the Walrus operator.