Further improvements of nn.container docs#17731
Conversation
| or another :class:`~torch.nn.ParameterDict` (the argument to | ||
| :meth:`~torch.nn.ParameterDict.update`). | ||
|
|
||
| Note that :meth:`~torch.nn.ParameterDict.update` with other unordered mapping |
There was a problem hiding this comment.
Could this be added in a note-block?
There was a problem hiding this comment.
It sort of goes together with the previous paragraph, so I didn't make it a .. note::
| :meth:`~torch.nn.ParameterDict.update`). | ||
|
|
||
| Note that :meth:`~torch.nn.ParameterDict.update` with other unordered mapping | ||
| types (e.g., Python's plain ``dict``) doesn't not preserve order of the |
|
|
||
| if isinstance(parameters, container_abcs.Mapping): | ||
| if isinstance(parameters, OrderedDict): | ||
| if isinstance(parameters, (OrderedDict, ParameterDict)): |
There was a problem hiding this comment.
Interesting, didn't know you could do this
There was a problem hiding this comment.
yeah it takes in a tuple :D
zou3519
left a comment
There was a problem hiding this comment.
One comment on something that looks like a typo. Otherwise, looks good to me
|
@zou3519 Thanks! I've fixed the typo. Hopefully lint passes as I edited on github UI directly. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Pull Request resolved: pytorch#17731 Differential Revision: D14401894 Pulled By: soumith fbshipit-source-id: cebb25859f78589cc4f4f8afb1e84c97f82b6962
No description provided.