Explore Library
Code QuizAdvanced

GPU Memory During Evaluation

Find why this evaluation loop exhausts GPU memory.

Codepython
model.eval()
predictions = []
for batch in eval_loader:
    batch = batch.to("cuda")
    output = model(batch)
    predictions.append(output)

Why does GPU memory keep growing until it runs out?