MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / get_upsample_layer

Function get_upsample_layer

monai/networks/blocks/segresnet_block.py:30–41  ·  view source on GitHub ↗
(
    spatial_dims: int, in_channels: int, upsample_mode: UpsampleMode | str = "nontrainable", scale_factor: int = 2
)

Source from the content-addressed store, hash-verified

28
29
30def get_upsample_layer(
31 spatial_dims: int, in_channels: int, upsample_mode: UpsampleMode | str = "nontrainable", scale_factor: int = 2
32):
33 return UpSample(
34 spatial_dims=spatial_dims,
35 in_channels=in_channels,
36 out_channels=in_channels,
37 scale_factor=scale_factor,
38 mode=upsample_mode,
39 interp_mode=InterpolateMode.LINEAR,
40 align_corners=False,
41 )
42
43
44class ResBlock(nn.Module):

Callers 2

_make_up_layersMethod · 0.90
_prepare_vae_modulesMethod · 0.90

Calls 1

UpSampleClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…