Skip to content

Frist parameter in downsamplers should be 'out_channels', instead of 'in_channels' #943

@chenguolin

Description

@chenguolin

in_channels, use_conv=True, out_channels=out_channels, padding=downsample_padding, name="op"

All the frist parameters of Downsample2D-like classes in self.downsamplers are in_channels.

However, the inputs of these self.downsamplers are the outputs of Resnets, whose number of channels should be out_channels.

Though these wrong parameters do not affect the results, since in_channels is assigned as out_channels in Resnet iteration:

in_channels = in_channels if i == 0 else out_channels
, they may cause confusion for code reading.

By the way, the first parameters of Upsample2D-like classes are out_channels, which is correct I think:

self.upsamplers = nn.ModuleList([Upsample2D(out_channels, use_conv=True, out_channels=out_channels)])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions