Feat: Add MaxPooling2D and AveragePooling2D Layers #110
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.