Commit 31be2e01 authored by Anthony Larcher's avatar Anthony Larcher
Browse files

monitor display

parent 33750df6
...@@ -1935,6 +1935,7 @@ def new_train_epoch(model, ...@@ -1935,6 +1935,7 @@ def new_train_epoch(model,
scaler.update() scaler.update()
else: else:
loss.backward() loss.backward()
print("optimizer.step")
optimizer.step() optimizer.step()
running_loss += loss.item() running_loss += loss.item()
accuracy += (torch.argmax(output.data, 1) == target).sum() accuracy += (torch.argmax(output.data, 1) == target).sum()
...@@ -1964,6 +1965,7 @@ def new_train_epoch(model, ...@@ -1964,6 +1965,7 @@ def new_train_epoch(model,
pickle.dump(data.cpu(), fh) pickle.dump(data.cpu(), fh)
import sys import sys
sys.exit() sys.exit()
running_loss = 0.0 running_loss = 0.0
scheduler.step() scheduler.step()
return model return model
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment