-
Notifications
You must be signed in to change notification settings - Fork 27
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
convolution added to numpy backend #517
base: develop
Are you sure you want to change the base?
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #517 +/- ##
===========================================
+ Coverage 89.77% 89.80% +0.03%
===========================================
Files 92 92
Lines 6072 6072
===========================================
+ Hits 5451 5453 +2
+ Misses 621 619 -2
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
User description
In order to compute the PNR conditional matrix we need the convolution function to work in the numpy backend. I added it.
PR Type
enhancement
Description
convolution
function to the numpy backend, enabling 2D convolution operations similar to TensorFlow'stf.nn.convolution
.convolution
function usesscipy.signal.convolve2d
for efficient computation and supports 'SAME' and 'VALID' padding options.poisson
function inbackend_manager.py
to ensure consistent dtype usage withrate
.Changes walkthrough 📝
backend_manager.py
Update dtype handling in `poisson` function
mrmustard/math/backend_manager.py
poisson
function to userate.dtype
forarange
.backend_numpy.py
Add 2D convolution function to numpy backend
mrmustard/math/backend_numpy.py
convolution
function for 2D convolution using numpy.scipy.signal.convolve2d
for efficient 2D convolution.