Skip to content

Commit

Permalink
include batch size as arg meta_evaluation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
annahedstroem authored Mar 27, 2024
1 parent 95cdb98 commit b1a5da3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metaquantus/meta_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def __call__(
channel_first: Optional[bool] = True,
softmax: Optional[bool] = False,
device: Optional[str] = None,
batch_size: Optional[int] = 64,
model_predict_kwargs: Optional[Dict[str, Any]] = {},
score_direction: Optional[str] = None,
):
Expand Down Expand Up @@ -179,6 +180,7 @@ def __call__(
channel_first=channel_first,
softmax=softmax,
device=device,
batch_size=batch_size,
)

# Run inference.
Expand Down Expand Up @@ -352,6 +354,7 @@ def run_perturbation_analysis(
},
model_predict_kwargs=model_predict_kwargs,
softmax=softmax,
batch_size=batch_size,
device=device,
)

Expand Down Expand Up @@ -397,6 +400,7 @@ def run_perturbation_analysis(
model_predict_kwargs=model_predict_kwargs,
softmax=softmax,
device=device,
batch_size=batch_size,
)

self.results_eval_scores_perturbed[test_name][i] = scores_perturbed
Expand Down

0 comments on commit b1a5da3

Please sign in to comment.