Dear all,
How to modify the code to save the test loss calculate for each epoch, then sum up loss/100 epoch.
def test_epoch(device):

    model.to(device)

    model.eval()

        

    iter_data_time = time.time()

    with Ctq(test_loader) as tq_test_loader:

        for i, data in enumerate(tq_test_loader):

            t_data = time.time() - iter_data_time

            iter_start_time = time.time()

            data.to(device)

            model.forward(data)           

            testtracker.track(model)

            tq_test_loader.set_postfix(

                **testtracker.get_metrics(),

                data_loading=float(t_data),

                iteration=float(time.time() - iter_start_time),

            )

            iter_data_time = time.time()