Open
Conversation
Fixed three major issues preventing the code from working: 1. Fixed incorrect static method calls in both 2D and 3D versions - Removed duplicate 'self' parameter in _get_grid() calls - Changed _get_grid() from @staticmethod to instance method since it accesses instance variables (_grid_param, _grid) 2. Fixed trilinear interpolation in 3D implementation - Removed incorrect use of coords_offset_rbp (negative offsets) - Now uses only coords_offset_lta (fractional offsets from lower corner) - Follows standard trilinear interpolation formula 3. Added test file for validation These fixes resolve TypeError that would occur when trying to use the deformable convolution layers.
Major improvements to project structure and development workflow: Package Setup: - Added pyproject.toml with modern PEP 621 metadata - Created deform_conv package with proper __init__.py - Added py.typed marker for type checking support - Created MANIFEST.in for package distribution Development Tools: - Added comprehensive .gitignore for Python projects - Created Makefile with common development tasks - Configured black, ruff, mypy, and pytest in pyproject.toml - Added GitHub Actions CI/CD workflow for automated testing Testing: - Created tests/ directory with pytest test suite - Added test cases for both 2D and 3D deformable convolutions - Configured coverage reporting Documentation: - Expanded README with installation instructions - Added usage examples for both 2D and 3D versions - Documented development workflow and commands - Added badges placeholders for CI status Dependencies: - Specified Python >=3.8 requirement - Listed core dependencies (torch, numpy) - Separated development dependencies This modernizes the project to follow current Python packaging best practices and provides a better developer experience.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed three major issues preventing the code from working:
Fixed incorrect static method calls in both 2D and 3D versions
Fixed trilinear interpolation in 3D implementation
Added test file for validation
These fixes resolve TypeError that would occur when trying to use the deformable convolution layers.