Method
__init__
(
self,
spatial_dims: int = 3,
init_filters: int = 32,
in_channels: int = 1,
out_channels: int = 2,
act: tuple | str = "relu",
norm: tuple | str = "batch",
blocks_down: tuple = (1, 2, 2, 4),
blocks_up: tuple | None = None,
dsdepth: int = 1,
preprocess: nn.Module | Callable | None = None,
upsample_mode: UpsampleMode | str = "deconv",
resolution: tuple | None = None,
)
Source from the content-addressed store, hash-verified
| 465 | """ |
| 466 | |
| 467 | def __init__( |
| 468 | self, |
| 469 | spatial_dims: int = 3, |
| 470 | init_filters: int = 32, |
| 471 | in_channels: int = 1, |
| 472 | out_channels: int = 2, |
| 473 | act: tuple | str = "relu", |
| 474 | norm: tuple | str = "batch", |
| 475 | blocks_down: tuple = (1, 2, 2, 4), |
| 476 | blocks_up: tuple | None = None, |
| 477 | dsdepth: int = 1, |
| 478 | preprocess: nn.Module | Callable | None = None, |
| 479 | upsample_mode: UpsampleMode | str = "deconv", |
| 480 | resolution: tuple | None = None, |
| 481 | ): |
| 482 | super().__init__( |
| 483 | spatial_dims=spatial_dims, |
| 484 | init_filters=init_filters, |
| 485 | in_channels=in_channels, |
| 486 | out_channels=out_channels, |
| 487 | act=act, |
| 488 | norm=norm, |
| 489 | blocks_down=blocks_down, |
| 490 | blocks_up=blocks_up, |
| 491 | dsdepth=dsdepth, |
| 492 | preprocess=preprocess, |
| 493 | upsample_mode=upsample_mode, |
| 494 | resolution=resolution, |
| 495 | ) |
| 496 | |
| 497 | self.up_layers_auto = nn.ModuleList([copy.deepcopy(layer) for layer in self.up_layers]) |
| 498 | |
| 499 | def forward( # type: ignore |
| 500 | self, x: torch.Tensor, with_point: bool = True, with_label: bool = True |
Callers
nothing calls this directly
Tested by
no test coverage detected