Skip to content

build_conv_stack ​

python
build_conv_stack(*, input_channels: int, conv_filters: list[ConvFilter], activation: type[nn.Module]) -> nn.Sequential

Build the convolutional feature extractor for the DQN model.

Parameters:

  • input_channels (int) – Number of input channels.
  • conv_filters (list[ConvFilter]) – Sequence of (out_channels, kernel, stride) tuples.
  • activation (type[Module]) – Activation module type to insert after each convolution.

Returns:

  • Sequential – Convolutional stack as nn.Sequential.

Source