LazyConv2d (original) (raw)

class torch.nn.LazyConv2d(out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)[source]#

A torch.nn.Conv2d module with lazy initialization of the in_channels argument.

The in_channels argument of the Conv2d that is inferred from the input.size(1). The attributes that will be lazily initialized are weight and bias.

Check the torch.nn.modules.lazy.LazyModuleMixin for further documentation on lazy modules and their limitations.

Parameters

cls_to_become[source]#

alias of Conv2d