Skip to content

Commit aab474a

Browse files
committed
Update worker_training.py
1 parent e55f2ec commit aab474a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

napari_cellseg3d/code_models/worker_training.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,14 @@ def get_loader_func(num_samples):
653653

654654
# logger.debug(len(val_outputs))
655655
# logger.debug(len(val_labels))
656-
dice_test = [
657-
utils.dice_coeff(i, j)
658-
for i, j in zip(val_outputs, val_labels)
659-
]
656+
dice_test = np.array(
657+
[
658+
utils.dice_coeff(i, j)
659+
for i, j in zip(val_outputs, val_labels)
660+
]
661+
)
660662
logger.debug(
661-
f"TEST VALIDATION Dice score : {dice_test}"
663+
f"TEST VALIDATION Dice score : {dice_test.mean()}"
662664
)
663665

664666
dice_metric(y_pred=val_outputs, y=val_labels)

0 commit comments

Comments
 (0)