medium10 pts · first answer countsgpu-computinggpu-memorypytorch
Memory grows each training step
GPU memory rises every step until OOM. Which line is the likely cause?
total = 0
for x, y in loader:
loss = loss_fn(model(x), y)
loss.backward()
opt.step(); opt.zero_grad()
total += lossDiscussion 0
Join free to post in the discussion.