Skip to content
class

Conv2d

extendsLoHaLayer
Conv2d(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 LoHa update: the factored kernel is convolved with the base's stride, padding and groups.

Parameters

base_layernn.Conv2d
The layer to adapt; the other parameters are those of LoHaLayer.
adapter_namestr
Name of the adapter, the key in every table.
The adapter's config (dropouts, init_weights, use_effective_conv2d).
rint= 0
Rank. The default is the reference's and is refused: pass a positive rank.
alphafloat= 0.0
Numerator of the scale.

Used by 1