layers
-
class
packnet_sfm.networks.layers.resnet.layers.
Conv3x3
(in_channels, out_channels, use_refl=True)[source] Bases:
torch.nn.modules.module.Module
Layer to pad and convolve input
-
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.
-
-
class
packnet_sfm.networks.layers.resnet.layers.
ConvBlock
(in_channels, out_channels)[source] Bases:
torch.nn.modules.module.Module
Layer to perform a convolution followed by ELU
-
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.
-
-
packnet_sfm.networks.layers.resnet.layers.
disp_to_depth
(disp, min_depth, max_depth)[source] Convert network’s sigmoid output into depth prediction The formula for this conversion is given in the ‘additional considerations’ section of the paper.
-
packnet_sfm.networks.layers.resnet.layers.
upsample
(x)[source] Upsample input tensor by a factor of 2