mmagic.models.editors.dic.light_cnn
¶
Module Contents¶
Classes¶
LightCNN discriminator with input size 128 x 128. |
|
Conv2d or Linear layer with max feature selector. |
- class mmagic.models.editors.dic.light_cnn.LightCNN(in_channels)[源代码]¶
Bases:
mmengine.model.BaseModule
LightCNN discriminator with input size 128 x 128.
It is used to train DICGAN.
- 参数
in_channels (int) – Channel number of inputs.
- class mmagic.models.editors.dic.light_cnn.MaxFeature(in_channels, out_channels, kernel_size=3, stride=1, padding=1, filter_type='conv2d')[源代码]¶
Bases:
torch.nn.Module
Conv2d or Linear layer with max feature selector.
- Generate feature maps with double channels, split them and select the max
feature.
- 参数
in_channels (int) – Channel number of inputs.
out_channels (int) – Channel number of outputs.
kernel_size (int or tuple) – Size of the convolving kernel.
stride (int or tuple, optional) – Stride of the convolution. Default: 1
padding (int or tuple, optional) – Zero-padding added to both sides of the input. Default: 1
filter_type (str) – Type of filter. Options are ‘conv2d’ and ‘linear’. Default: ‘conv2d’.