class
Conv2d
extends
LoKrLayerConv2d(base_layer: nn.Module, adapter_name: str, config: _LycorisConfig, r: int = 0, alpha: float = 0.0)Implementing kernel
C++ engine symbols that back this Python API.An nn.Conv2d with a LoKr update: the Kronecker kernel is convolved with the base's stride, padding and groups.
Parameters
base_ layernn.Conv2dThe layer to adapt; the other parameters are those of
LoKrLayer.adapter_ namestrName of the adapter, the key in every table.
configLoKrConfigThe adapter's config (dropouts,
init_weights, decompose_both,
decompose_factor, use_effective_conv2d).rint= 0Rank. The default is the reference's and is refused: pass a positive rank.
alphafloat= 0.0Numerator of the scale.