Spaces:
Sleeping
Sleeping
File size: 1,009 Bytes
24e5510 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
from typing import Union, Tuple, List
from nnunetv2.training.nnUNetTrainer.nnUNetTrainer import nnUNetTrainer
from torch import nn
class nnInteractiveTrainer_stub():
def __init__(self, *args, **kwargs):
pass
@staticmethod
def build_network_architecture(architecture_class_name: str,
arch_init_kwargs: dict,
arch_init_kwargs_req_import: Union[List[str], Tuple[str, ...]],
num_input_channels: int,
num_output_channels: int,
enable_deep_supervision: bool = True) -> nn.Module:
return nnUNetTrainer.build_network_architecture(
architecture_class_name,
arch_init_kwargs,
arch_init_kwargs_req_import,
num_input_channels + 7,
2, # nnunet handles one class segmentation still as CE so we need 2 outputs.
enable_deep_supervision
) |