torch_staintools.functional package
Subpackages
- torch_staintools.functional.conversion package
- torch_staintools.functional.optimization package
- torch_staintools.functional.stain_extraction package
- Submodules
- torch_staintools.functional.stain_extraction.extractor module
- torch_staintools.functional.stain_extraction.factory module
- torch_staintools.functional.stain_extraction.macenko module
- torch_staintools.functional.stain_extraction.utils module
- torch_staintools.functional.stain_extraction.vahadane module
- Module contents
- torch_staintools.functional.tissue_mask package
- torch_staintools.functional.utility package
Submodules
torch_staintools.functional.eps module
Add small eps terms to avoid NaN in certain arithmetics (e.g., division and exp)
- torch_staintools.functional.eps.get_eps(img: Tensor | None = None) Tensor
Get the eps based on the device input tensor.
Precision is defined by the global variable _eps_val.
- Parameters:
img – If specified, then the output will be moved to the same device of the img.
- Returns:
output eps as a tensor. It will be moved to the device of img if img is specified.