-
Notifications
You must be signed in to change notification settings - Fork 539
Refactor rnn models for the new standards #1306
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
base: main
Are you sure you want to change the base?
Conversation
Greptile SummaryRefactored RNN models ( Key Changes:
Issues Found:
Testing:
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (3)
-
physicsnemo/models/rnn/rnn_one2many.py, line 100-103 (link)syntax: output shape mismatch in docstring example - the example shows input
torch.randn(4, 6, 1, 16, 16)which is [N=4, C=6, T=1, H=16, W=16], but the output showstorch.Size([4, 6, 16, 16, 16])which is [N=4, C=6, T=16, H=16, W=16]. the spatial dimensions should remain [16, 16], not become [16, 16, 16] -
physicsnemo/nn/conv_layers.py, line 258-263 (link)logic: padding order is incorrect for 2D input - the current code applies padding as
[pad_h // 2, pad_h - pad_h // 2, pad_w // 2, pad_w - pad_w // 2]but F.pad expects padding in reverse dimension order:[left, right, top, bottom]which should be[pad_w // 2, pad_w - pad_w // 2, pad_h // 2, pad_h - pad_h // 2] -
physicsnemo/nn/conv_layers.py, line 432-437 (link)logic: padding/cropping order is incorrect for 2D input - torch.nn.functional.pad expects padding in reverse dimension order. current code uses
[pad_h // 2 : ..., pad_w // 2 : ...]but the dimensions should be reversed to match width then heightcan you verify the expected padding order matches your framework's conventions for transpose convolutions?
7 files reviewed, 3 comments
Fixed point 2 and 3. For point 1, the output is correct. [4, 6, 16, 16, 16] means batch=4, channels=6, timesteps=16, height=16, width=16 |
|
/blossom-ci |
|
I think this looks good to me. When UNet is updated (Which is currently assigned to @peterdsharpe ...) we might consider consolidating some of the "ConvBlock" and "ConvLayer" etc implementation. But this one came first so no need to hold it up :) |
PhysicsNeMo Pull Request
Description
Refactors the RNN models to the new coding standards.
Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.