direct.nn.conv package#

Submodules#

direct.nn.conv.conv module#

class direct.nn.conv.conv.Conv2d(in_channels, out_channels, hidden_channels, n_convs=3, activation=PReLU(num_parameters=1), batchnorm=False)[source][source]#

Bases: Module

Implementation of a simple cascade of 2D convolutions.

If batchnorm is set to True, batch normalization layer is applied after each convolution.

forward(x)[source][source]#

Performs the forward pass of Conv2d.

Parameters:
x: torch.Tensor

Input tensor.

Returns:
out: torch.Tensor

Convoluted output.

Return type:

Tensor

training: bool#

Module contents#