sksurgerytorch.models.high_res_stereo_model module¶
Definition of the HSMNet model structure, and various helper functions.
-
class
sksurgerytorch.models.high_res_stereo_model.HSMNet_model(maxdisp, clean, device, level=1)[source]¶ Bases:
torch.nn.modules.module.Module-
forward(left, right)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.conv2DBatchNorm(in_channels, n_filters, k_size, stride, padding, bias=True, dilation=1, with_bn=True)[source]¶ Bases:
torch.nn.modules.module.Module-
forward(inputs)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.conv2DBatchNormRelu(in_channels, n_filters, k_size, stride, padding, bias=True, dilation=1, with_bn=True)[source]¶ Bases:
torch.nn.modules.module.Module-
forward(inputs)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.decoderBlock(nconvs, inchannelF, channelF, stride=(1, 1, 1), up=False, nstride=1, pool=False)[source]¶ Bases:
torch.nn.modules.module.Module-
forward(fvl)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.disparityregression(maxdisp, divisor)[source]¶ Bases:
torch.nn.modules.module.Module-
forward(x, ifent=False)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.projfeat3d(in_planes, out_planes, stride)[source]¶ Bases:
torch.nn.modules.module.ModuleTurn 3d projection into 2d projection
-
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.pyramidPooling(in_channels, pool_sizes, model_name='pspnet', fusion_mode='cat', with_bn=True)[source]¶ Bases:
torch.nn.modules.module.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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.residualBlock(in_channels, n_filters, stride=1, downsample=None, dilation=1)[source]¶ Bases:
torch.nn.modules.module.Module-
expansion= 1¶
-
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
sksurgerytorch.models.high_res_stereo_model.sepConv3d(in_planes, out_planes, kernel_size, stride, pad, bias=False)[source]¶
-
class
sksurgerytorch.models.high_res_stereo_model.sepConv3dBlock(in_planes, out_planes, stride=(1, 1, 1))[source]¶ Bases:
torch.nn.modules.module.ModuleSeparable 3d convolution block as 2 separable convolutions and a projection layer
-
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
sksurgerytorch.models.high_res_stereo_model.unet[source]¶ Bases:
torch.nn.modules.module.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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-