(optim) benchmark=True and higher eval batch size
Browse files- configs/default.yaml +2 -2
- train.py +5 -3
configs/default.yaml
CHANGED
|
@@ -27,8 +27,8 @@ inference:
|
|
| 27 |
stitch: avg_logits
|
| 28 |
|
| 29 |
eval:
|
| 30 |
-
max_samples:
|
| 31 |
-
fine_batch:
|
| 32 |
|
| 33 |
optim:
|
| 34 |
iters: 2000
|
|
|
|
| 27 |
stitch: avg_logits
|
| 28 |
|
| 29 |
eval:
|
| 30 |
+
max_samples: 16
|
| 31 |
+
fine_batch: 48
|
| 32 |
|
| 33 |
optim:
|
| 34 |
iters: 2000
|
train.py
CHANGED
|
@@ -524,8 +524,10 @@ def set_seed(seed: int):
|
|
| 524 |
torch.manual_seed(seed)
|
| 525 |
if torch.cuda.is_available():
|
| 526 |
torch.cuda.manual_seed_all(seed)
|
| 527 |
-
cudnn.benchmark = False
|
| 528 |
-
cudnn.deterministic = True
|
|
|
|
|
|
|
| 529 |
|
| 530 |
|
| 531 |
def _save_checkpoint(
|
|
@@ -687,7 +689,7 @@ def validate(
|
|
| 687 |
batch_idx = i0 // fine_batch
|
| 688 |
if total_batches > 0 and (batch_idx % max(1, total_batches // 10) == 0):
|
| 689 |
print(
|
| 690 |
-
f"[Eval]
|
| 691 |
flush=True,
|
| 692 |
)
|
| 693 |
for (y0, x0) in batch_coords:
|
|
|
|
| 524 |
torch.manual_seed(seed)
|
| 525 |
if torch.cuda.is_available():
|
| 526 |
torch.cuda.manual_seed_all(seed)
|
| 527 |
+
# cudnn.benchmark = False
|
| 528 |
+
# cudnn.deterministic = True
|
| 529 |
+
cudnn.benchmark = True
|
| 530 |
+
cudnn.deterministic = False
|
| 531 |
|
| 532 |
|
| 533 |
def _save_checkpoint(
|
|
|
|
| 689 |
batch_idx = i0 // fine_batch
|
| 690 |
if total_batches > 0 and (batch_idx % max(1, total_batches // 10) == 0):
|
| 691 |
print(
|
| 692 |
+
f"[Eval] Img {i+1}/{target_n} | Tile batch {batch_idx+1}/{total_batches}",
|
| 693 |
flush=True,
|
| 694 |
)
|
| 695 |
for (y0, x0) in batch_coords:
|