Feat: Add MaxPooling2D and AveragePooling2D Layers#110
Merged
ravin-d-27 merged 1 commit intoravin-d-27:mainfrom Oct 15, 2025
Merged
Feat: Add MaxPooling2D and AveragePooling2D Layers#110ravin-d-27 merged 1 commit intoravin-d-27:mainfrom
ravin-d-27 merged 1 commit intoravin-d-27:mainfrom
Conversation
ravin-d-27
approved these changes
Oct 15, 2025
Owner
ravin-d-27
left a comment
There was a problem hiding this comment.
Hi @debug-soham . Good work, thank you!
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.
Summary
Closes: #108 This PR introduces
MaxPooling2DandAveragePooling2Dlayers to thePyDeepFlowlibrary. This is a crucial enhancement for building effective Convolutional Neural Networks (CNNs), allowing for the down-sampling of feature maps to reduce computational complexity and control overfitting.Additionally, this PR includes fixes for the
Multi_Layer_CNNconstructor and theintrospectionmodule, ensuring that themodel.summary()feature works correctly for bothANNandCNNmodels and that the entire test suite passes.Changes Included
MaxPooling2DandAveragePooling2Dclasses inpydeepflow/model.pywith correct forward and backward passes.Multi_Layer_CNNconstructor inpydeepflow/model.pyby removing the unusedactivationsparameter, resolving a major conflict with the test suite.ANNIntrospectorandCNNIntrospectorclasses inpydeepflow/introspection.pyto correctly identify all layer types and their properties, ensuringmodel.summary()is accurate.tests/test_layers.pywith unit tests for the new pooling layers.tests/test_model_summary.pyto align with the updatedMulti_Layer_CNNconstructor.pydeepflow/validation.pyto recognize'maxpool'and'avgpool'as valid layer types.Verification
All 200+ tests in the suite, including the new tests for pooling layers, now pass successfully.