Skip to content

Commit

Permalink
Fix padding computation in PatchInferencerEngine to use correct paddi…
Browse files Browse the repository at this point in the history
…ng values from the configuration
  • Loading branch information
GabrielBG0 committed Nov 11, 2024
1 parent 2393932 commit 44b367f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion minerva/engines/patch_inferencer_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _compute_base_padding(self, tensor: torch.Tensor):
Computes the padding for the base patch set based on the input tensor shape and the model's input shape.
"""
padding = []
for i, t in zip(self.input_shape, tensor.shape[1:]):
for i, t in zip(self.padding["pad"], tensor.shape[1:]):
padding.append(max(0, i - t))
return padding

Expand Down

0 comments on commit 44b367f

Please sign in to comment.