I dont have a full-blown example, but really it’s as simple as something like:
for input, targets in test_loader:
    out_resnet = resnet(input)
    out_densenet = densenet(input)
    out = out_resnet + out_densenet
    loss = loss_fn(out, target)
    total_loss += loss.item()