class
SVDConv2d
extends
AdaLoraLayerSVDConv2d(base_layer: nn.Module, adapter_name: str, config: AdaLoraConfig, r: int = 0, lora_alpha: float = 1)An nn.Conv2d whose update is an SVD-parameterised kernel, applied as the base applies its own.
lora_A is (r, in_channels / groups * kH * kW) and the product
is reshaped to the base kernel; the
stride, padding, dilation and groups are the base's.
Parameters
base_ layernn.Conv2dThe layer to adapt; the other parameters are those of
SVDLinear.adapter_ namestrName of the adapter created at once (
update_layer).configAdaLoraConfigThe config; dropout and
init_lora_weights are read.rint= 0Initial rank — the number of singular triplets; 0 is allowed, as in
the reference (a layer the allocator pruned away entirely).
lora_ alphafloat= 1Numerator of the scale; 0 or below takes
r.