-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from andreped/fix/multitarget
Fixed bug in multitarget macenko during import
- Loading branch information
Showing
6 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from .he_normalizer import HENormalizer | ||
from .macenko import MacenkoNormalizer | ||
from .multitarget import MultiMacenkoNormalizer | ||
from .reinhard import ReinhardNormalizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
def MultiMacenkoNormalizer(backend='torch', **kwargs): | ||
if backend == 'torch': | ||
from torchstain.torch.normalizers.multitarget import MultiMacenkoNormalizer | ||
return MultiMacenkoNormalizer(**kwargs) | ||
def MultiMacenkoNormalizer(backend="torch", **kwargs): | ||
if backend == "numpy": | ||
raise NotImplementedError("MultiMacenkoNormalizer is not implemented for NumPy backend") | ||
elif backend == "torch": | ||
from torchstain.torch.normalizers import TorchMultiMacenkoNormalizer | ||
return TorchMultiMacenkoNormalizer(**kwargs) | ||
elif backend == "tensorflow": | ||
raise NotImplementedError("MultiMacenkoNormalizer is not implemented for TensorFlow backend") | ||
else: | ||
raise Exception(f'Unsupported backend {backend}') | ||
raise Exception(f"Unsupported backend {backend}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from torchstain.torch.normalizers.macenko import TorchMacenkoNormalizer | ||
from torchstain.torch.normalizers.multitarget import MultiMacenkoNormalizer | ||
from torchstain.torch.normalizers.multitarget import TorchMultiMacenkoNormalizer | ||
from torchstain.torch.normalizers.reinhard import TorchReinhardNormalizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters