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
## Credits to https://github.com/revidee/pytorch-pyramid-pooling | |
## I just modified on it to make it simpler | |
class SpatialPyramidPooling(nn.Module): | |
def __init__(self, partition_size_list: list, pooling_mode: str = "max"): | |
"""Spatial Pyramid Pooling layer for PyTorch users | |
Parameters | |
---------- | |
partition_size_list : list |