eora-ai / torchok

Production-oriented Computer Vision models training pipeline for common tasks: classification, segmentation, detection and representationšŸ„¤
https://torchok.readthedocs.org
Apache License 2.0
54 stars 6 forks source link

Separation of embedding layer and pooling needed #74

Open Alicegaz opened 2 years ago

Alicegaz commented 2 years ago

There is a package pooling which stores everything that can be used independently to process output feature maps coming from backbone. However, embedding layers can utilize different poolings and I suggest the following hierarchy:

backbones
emb_layers
heads
modules
    blocks
    bricks
    layers
        activations
        normalizations
        poolings
    necks

Top level contains components that are used in a task, here embedding_layer should replace POOLINGS.

PososikTeam commented 2 years ago

You can write your own POOLING class with different poolings. For example you need Average Pooling with Linear layer, so we wrote PoolingLinear that exactly do this. So the thing what you suggest it is just renaming POOLING to EMB_LAYER.