fusionlab.segmentation.resunet.resunet module#

class fusionlab.segmentation.resunet.resunet.Bridger[source]#

Bases: Module

forward(x)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class fusionlab.segmentation.resunet.resunet.Decoder(base_dim, spatial_dims=2)[source]#

Bases: Module

__init__(base_dim, spatial_dims=2)[source]#

Base UNet decoder :param base_dim: output dim of deepest stage output or input channels :type base_dim: int

forward(x)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class fusionlab.segmentation.resunet.resunet.DecoderBlock(cin, cout, spatial_dims=2)[source]#

Bases: Module

forward(x1, x2)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class fusionlab.segmentation.resunet.resunet.Encoder(cin, base_dim, spatial_dims=2)[source]#

Bases: Module

forward(x)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class fusionlab.segmentation.resunet.resunet.Head(cin, cout, spatial_dims)[source]#

Bases: Sequential

__init__(cin, cout, spatial_dims)[source]#

Basic conv head :param int cin: input channel :param int cout: output channel

class fusionlab.segmentation.resunet.resunet.ResConv(cin, cout, spatial_dims=2, stride=1)[source]#

Bases: Module

forward(x)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#
class fusionlab.segmentation.resunet.resunet.ResUNet(cin, num_cls, base_dim=64, spatial_dims=2)[source]#

Bases: SegmentationModel

training: bool#
class fusionlab.segmentation.resunet.resunet.Stem(cin, cout, spatial_dims=2)[source]#

Bases: Module

forward(x)[source]#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#