Skip to content

nn.functional.conv functions do not take a padding_mode argument #20694

@linzwatt

Description

@linzwatt

📚 Documentation

As mentioned in this post

These docs for functional conv opperations show a optional argument padding_mode. However when specifying this argument an exception is raised:

TypeError: conv1d() got an unexpected keyword argument 'padding_mode'

Upon inspection of the modular Conv layers code, it can be seen that the padding_mode argument is used to apply padding before calling the functional conv:
https://github.com/pytorch/pytorch/blob/v1.1.0/torch/nn/modules/conv.py#L192

So I believe the padding_mode argument should be removed from the functional conv docs, as this argument applies to the modular Conv layers only

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    high prioritymodule: docsRelated to our documentation, both in docs/ and docblocksmodule: nnRelated to torch.nntriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions