Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewording the documentation for nn.Reshape #453

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

allanqunzi
Copy link

Rewording the documentation for nn.Reshape to make it more clear.

Changed the wording of the documentation for `Reshape` to make it more clear.
fixed minor typo for the documentation for `Reshape`
doc/simple.md Outdated

The optional last argument `batchMode`, when `true` forces the first dimension of the input to be considered the batch dimension, and thus keep its size fixed. This is necessary when dealing with batch sizes of one. When `false`, it forces the entire input (including the first dimension) to be reshaped to the input size. Default `batchMode=nil`, which means that the module considers inputs with more elements than the produce of provided sizes, i.e. `dimension1xdimension2x...`, to be batches.
The optional last argument `batchMode`, when `true` forces the first dimension of the input to be considered as the batch dimension (i.e., the size of the first dimension will be treated as the batch size), and thus keep the size of the first dimension fixed and only reshape the other dimensions. When `false`, it forces the entire input (including the first dimension) to be reshaped to the input size. The default for `batchMode` is `nil`, which means that this moudle will reshape all the dimensions only when the two statements below
Copy link
Member

Choose a reason for hiding this comment

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

typo here. moudle -> module.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, changed it.

minor typo for documentation for `nn.Reshape`
@andreaskoepf
Copy link
Contributor

The 'batch-auto-detection-heuristic' of Reshape is IMO indeed a bit strange. I think there should be a warning in the documentation saying that a model with nn.Reshape() cannot correctly detect 'single element batches' as batches if batchMode is not explicitely set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants