Skip to content

Softmax Docs Example Deprecated #20301

@ZaydH

Description

@ZaydH

📚 Documentation

In the master docs for nn.Softmax(), the example provided is:

    >>> m = nn.Softmax()
    >>> input = torch.randn(2, 3)
    >>> output = m(input)

However, this implementation appears deprecated in 1.1. You now get a warning like:

UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.

If you agree, I can change the example to m = nn.Softmax(dim=1) and issue a pull request so there is no warning.

Version: I observed the warning with Python 1.1.0 and Python 3.7.1 on OSX.

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