First of all, if I now want to build a conv with padding mode, this file gives me two ways to build it, either by writing directly into conv_cfg of the configuration file that I want to configure the padding mode.
Both examples can build a conv layer, but obviously there are conflicts between the two examples, and there is no way to handle such conflicts in the ConvModule class
for example:
Second, if we build the second way, and pytorch officially doesn't provide us with custom_padding, the ConvMoudule class internally calls build_padding_layer() to build a custom padding layer, which we can extend here. However, if you build in the first way, an error will be reported.
š The doc issue
First of all, if I now want to build a conv with padding mode, this file gives me two ways to build it, either by writing directly into conv_cfg of the configuration file that I want to configure the padding mode.
For example:
The second way is to pass the padding_mode parameter directly on the call
For example:
Both examples can build a conv layer, but obviously there are conflicts between the two examples, and there is no way to handle such conflicts in the
ConvModule
class for example:Second, if we build the second way, and pytorch officially doesn't provide us with custom_padding, the
ConvMoudule
class internally callsbuild_padding_layer()
to build a custom padding layer, which we can extend here. However, if you build in the first way, an error will be reported.