Args: keys: keys of the corresponding items to be stack and execute ensemble. if only 1 key provided, suppose it's a PyTorch Tensor with data stacked on dimension `E`. output_key: the key to store ensemble result in the dictionary. if
(self, keys: KeysCollection, output_key: str | None = None, num_classes: int | None = None)
| 499 | backend = VoteEnsemble.backend |
| 500 | |
| 501 | def __init__(self, keys: KeysCollection, output_key: str | None = None, num_classes: int | None = None) -> None: |
| 502 | """ |
| 503 | Args: |
| 504 | keys: keys of the corresponding items to be stack and execute ensemble. |
| 505 | if only 1 key provided, suppose it's a PyTorch Tensor with data stacked on dimension `E`. |
| 506 | output_key: the key to store ensemble result in the dictionary. |
| 507 | if only 1 key provided in `keys`, `output_key` can be None and use `keys` as default. |
| 508 | num_classes: if the input is single channel data instead of One-Hot, we can't get class number |
| 509 | from channel, need to explicitly specify the number of classes to vote. |
| 510 | |
| 511 | """ |
| 512 | ensemble = VoteEnsemble(num_classes=num_classes) |
| 513 | super().__init__(keys, ensemble, output_key) |
| 514 | |
| 515 | |
| 516 | class GenerateHeatmapd(MapTransform): |
nothing calls this directly
no test coverage detected