vis4d.op.layer.conv2d
Wrapper for conv2d.
Functions
|
Init conv branch for head. |
Classes
|
Wrapper around Conv2d to support empty inputs and norm/activation. |
|
Downsamples a feature map by applying two convolutions and maxpool. |
|
Output of the UnetDownConv operator. |
|
An operator that performs 2 convolutions and 1 UpConvolution. |
- class Conv2d(*args, norm=None, activation=None, **kwargs)[source]
Wrapper around Conv2d to support empty inputs and norm/activation.
- add_conv_branch(num_branch_convs, last_layer_dim, conv_out_dim, conv_has_bias, norm_cfg, num_groups)[source]
Init conv branch for head.
- Return type:
tuple[ModuleList,int]
- class UnetDownConvOut(features: Tensor, pooled_features: Tensor)[source]
Output of the UnetDownConv operator.
features: Features before applying the pooling operator pooled_features: Features after applying the pooling operator
-
features:
Tensor Alias for field number 0
-
pooled_features:
Tensor Alias for field number 1
-
features:
- class UnetDownConv(in_channels, out_channels, pooling=True, activation='ReLU')[source]
Downsamples a feature map by applying two convolutions and maxpool.
- __init__(in_channels, out_channels, pooling=True, activation='ReLU')[source]
Creates a new downsampling convolution operator.
This operator consists of two convolutions followed by a maxpool operator.
- Parameters:
in_channels (int) – input channesl
out_channels (int) – output channesl
pooling (bool) – If pooling should be applied
activation (str) – Activation that should be applied
- __call__(data)[source]
Applies the operator.
- Parameters:
data (Tensor) – Input data.
- Returns:
- Containing the features before the pooling
operation (features) and after (pooled_features).
- Return type:
- class UnetUpConv(in_channels, out_channels, merge_mode='concat', up_mode='transpose')[source]
An operator that performs 2 convolutions and 1 UpConvolution.
A ReLU activation follows each convolution.
- __init__(in_channels, out_channels, merge_mode='concat', up_mode='transpose')[source]
Creates a new UpConv operator.
This operator merges two inputs by upsampling one and combining it with the other.
- Parameters:
in_channels (
int) – Number of input channels (low res)out_channels (
int) – Number of output channels (high res)merge_mode (
str) – How to merge both input channelsup_mode (
str) – How to upsample the channel with lower resolution
- Raises:
ValueError – If upsampling mode is unknown