Skip to content

Commit

Permalink
feat: Fix max number of tiles to 7000
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-owkin committed Jan 5, 2024
1 parent 0541b4d commit 78a137e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flamby/datasets/fed_camelyon16/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
Baseline,
BaselineLoss,
FedCamelyon16,
Optimizer,
collate_fn,
metric,
Optimizer,
)
from flamby.utils import evaluate_model_on_tests

Expand Down
2 changes: 1 addition & 1 deletion flamby/datasets/fed_camelyon16/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
NUM_EPOCHS_POOLED = 45
LR = 0.001

Optimizer = torch.optim.AdamW
Optimizer = torch.optim.Adam

FedClass = FedCamelyon16

Expand Down
4 changes: 2 additions & 2 deletions flamby/datasets/fed_camelyon16/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def __init__(
]


def collate_fn(dataset_elements_list, max_tiles=10000):
def collate_fn(dataset_elements_list, max_tiles=7000):
"""Helper function to correctly batch samples from
a Camelyon16Dataset accomodating for the uneven number of tiles per slide.
Expand All @@ -260,7 +260,7 @@ def collate_fn(dataset_elements_list, max_tiles=10000):
dataset_elements_list : List[torch.Tensor]
A list of torch tensors of dimensions [n, 2048] with uneven distribution of ns.
max_tiles : int, optional
The nummber of tiles max by Tensor, by default 10000
The nummber of tiles max by Tensor, by default 7000
Returns
-------
Expand Down

0 comments on commit 78a137e

Please sign in to comment.