Skip to content

Feat: Implement Pooling Layers for CNNs #108

@debug-soham

Description

@debug-soham

Description

The Multi_Layer_CNN is missing essential pooling layers (MaxPooling2D, AveragePooling2D). These are standard components in modern CNNs that are necessary for down-sampling feature maps, reducing computational load, and creating translation invariance.

Proposed solution

I propose to implement and integrate MaxPooling2D and AveragePooling2D layers into the framework.

  • MaxPooling2D: Will perform down-sampling by selecting the maximum value from a pooling window. It needs to cache the indices of these max values for backpropagation.
  • AveragePooling2D: Will perform down-sampling by calculating the average of the values in a pooling window. Backpropagation will distribute the gradient evenly.
  • Integration: The Multi_Layer_CNN class and the ModelValidator should be updated to recognize and handle 'maxpool' and 'avgpool' layer types.

Next Steps

I'm ready to submit a PR with these changes. Let me know if you'd like to see the specific code changes before I create the PR.
( Under Hacktoberfest )

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions