KEMBAR78
Further improvements of nn.container docs by ssnl · Pull Request #17731 · pytorch/pytorch · GitHub
Skip to content

Conversation

@ssnl
Copy link
Collaborator

@ssnl ssnl commented Mar 6, 2019

No description provided.

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
Copy link
Contributor

@vishwakftw vishwakftw Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be added in a note-block?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sort of goes together with the previous paragraph, so I didn't make it a .. note::

@ssnl ssnl requested review from ezyang and zou3519 March 10, 2019 18:03
: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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't not -> does not


if isinstance(parameters, container_abcs.Mapping):
if isinstance(parameters, OrderedDict):
if isinstance(parameters, (OrderedDict, ParameterDict)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, didn't know you could do this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it takes in a tuple :D

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment on something that looks like a typo. Otherwise, looks good to me

@ssnl
Copy link
Collaborator Author

ssnl commented Mar 10, 2019

@zou3519 Thanks! I've fixed the typo. Hopefully lint passes as I edited on github UI directly.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ssnl ssnl deleted the SsnL-patch-3 branch March 11, 2019 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants