Skip to content

Details on Inv Depth Layer and ConstantPad2D #247

@F-Barto

Description

@F-Barto

Hello,

I would like to know why are you explicitly using ConstantPad2D ?

[link to code]

self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=1)
self.pad = nn.ConstantPad2d([1] * 4, value=0)

From the doc nn.Conv2d default padding_mode is to zeros. Isn't setting padding=1 in Conv2d equivalent to your self.conv1(self.pad(x)) ?

Am I missing something ?

Have a good day

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