As suggested, my updated method. Thanks @ptrblck.
for epoch in range(500):
    targets = []
    outputs = []

    for batch in enumerate(custom_train_loader):
        outputs.append(out)
        targets.append(label)
    
    outputs = np.concatenate(outputs)
    targets = np.concatenate(targets)

    f1 = f1_score(outputs, targets, average='samples')