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.
Creates an instance of the class.
If norm is specified, it is initialized with 1.0 and bias with 0.0.
- class UnetDownConv(in_channels, out_channels, pooling=True, activation='ReLU')[source]¶
Downsamples a feature map by applying two convolutions and maxpool.
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 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
Create new instance of UnetDownConvOut(features, pooled_features)
-
features:
Tensor
¶ Alias for field number 0
-
pooled_features:
Tensor
¶ Alias for field number 1
-
features:
- 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.
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