mlx icon indicating copy to clipboard operation
mlx copied to clipboard

Addition of other pooling layers

Open Saanidhyavats opened this issue 1 year ago • 5 comments

@awni We were going through pooling layers available in mlx framework. I think we can add pooling techniques for 3d data such as Avgpooling3d, Maxpooling3d and also implement AdaptivePooling for 2D data.

Saanidhyavats avatar Oct 22 '24 04:10 Saanidhyavats

@awni what do you think about it?

Saanidhyavats avatar Oct 24 '24 01:10 Saanidhyavats

3D pooling might be useful.. I'm not so sure how commonly used it is. I haven't seen too many requests for AdaptivePooling. In general for features like this I think it's ok to be a bit reactive (add them if needed) rather than adding them just for the sake of feature completeness.

awni avatar Oct 24 '24 04:10 awni

3D pooling might be useful.. I'm not so sure how commonly used it is. I haven't seen too many requests for AdaptivePooling. In general for features like this I think it's ok to be a bit reactive (add them if needed) rather than adding them just for the sake of feature completeness.

I was going through the code in https://github.com/apple/ml-cvnets/blob/main/cvnets/layers/adaptive_pool.py and noticed that it's currently leveraging adaptive pooling from PyTorch. I believe we could enhance the project by incorporating adaptive pooling directly into MLX, allowing us to utilize this functionality seamlessly. Would this be something we could explore further?

Saanidhyavats avatar Oct 25 '24 03:10 Saanidhyavats

I would suggest putting an issue in that repo about building an MLX back-end (which would be super cool)! If the project adds an MLX back-end and needs support from any missing features we'd be happy to reconsider what to add.

awni avatar Oct 25 '24 03:10 awni

@awni We believe that’s a good idea and will consider your advice.

cvnad1 avatar Oct 25 '24 05:10 cvnad1

This had bene fixed by https://github.com/ml-explore/mlx/pull/1526.

zcbenz avatar Nov 11 '25 00:11 zcbenz