Disable img writer
This commit is contained in:
parent
524ee03187
commit
733b3c5387
1 changed files with 3 additions and 4 deletions
7
train.py
7
train.py
|
|
@ -335,10 +335,9 @@ def valid_one_epoch(test_loader, model, device, epoch, args):
|
||||||
mse += diff ** 2
|
mse += diff ** 2
|
||||||
|
|
||||||
if i % 5 == 0:
|
if i % 5 == 0:
|
||||||
if isinstance(model, STNet_VisionTransformerGAP):
|
# with torch.no_grad():
|
||||||
with torch.no_grad():
|
# img_xformed = model.stnet(img).to("cpu")
|
||||||
img_xformed = model.stnet(img).to("cpu")
|
# xformed.append(img_xformed)
|
||||||
xformed.append(img_xformed)
|
|
||||||
print("[valid_one_epoch] {} | Gt {:.2f} Pred {:.4f} |".format(
|
print("[valid_one_epoch] {} | Gt {:.2f} Pred {:.4f} |".format(
|
||||||
fname[0],
|
fname[0],
|
||||||
torch.sum(gt_count_whole).item(),
|
torch.sum(gt_count_whole).item(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue