Skip to content

Commit

Permalink
fixed detectron conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
lyna1404 committed Aug 31, 2024
1 parent 453e79e commit 809763e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions MED3pa/datasets/masked.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def sample_random(self, N: int, seed: int) -> 'MaskedDataset':
# Set the seed for reproducibility and generate random indices
rng = np.random.RandomState(seed)
random_indices = rng.permutation(len(self.__observations))[:N]
self.__sample_counts[random_indices] += 1

# Extract the sampled observations and labels
sampled_obs = self.__observations[random_indices, :]
Expand Down
3 changes: 2 additions & 1 deletion MED3pa/detectron/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def run(datasets: DatasetsManager,
'num_runs': num_calibration_runs,
'patience': patience,
'allow_margin': allow_margin,
'margin': margin
'margin': margin,
'sampling-method':sampling,
}
experiment_config = {
'experiment_name': "DetectronExperiment",
Expand Down

0 comments on commit 809763e

Please sign in to comment.