X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=tasks.py;h=24c13fe79eddb4b8104bfe869c079bb4cbce80b9;hb=5332c56acd44d7049f3fbb33a8643482e0c71f4d;hp=0ab18233a72e27b5b0b02e96a21abd5009d37ad6;hpb=ce969e8372fb161d86be29042a20b044ee6efe2a;p=picoclvr.git diff --git a/tasks.py b/tasks.py index 0ab1823..24c13fe 100755 --- a/tasks.py +++ b/tasks.py @@ -1459,8 +1459,7 @@ class Grid(Task): nb_train_samples, nb_test_samples, batch_size, - height, - width, + size, logger=None, device=torch.device("cpu"), ): @@ -1468,7 +1467,7 @@ class Grid(Task): self.device = device self.batch_size = batch_size - self.grid_factory = grid.GridFactory(height=height, width=width) + self.grid_factory = grid.GridFactory(size=size) if logger is not None: logger( @@ -1540,8 +1539,8 @@ class Grid(Task): nb_total = ar_mask.sum().item() nb_correct = ((correct == result).long() * ar_mask).sum().item() - logger(f"test_performance {nb_total=} {nb_correct=}") - logger(f"main_test_accuracy {nb_correct / nb_total}") + logger(f"test_performance {n_epoch} {nb_total=} {nb_correct=}") + logger(f"main_test_accuracy {n_epoch} {nb_correct / nb_total}") ######################################################################