classification
            BaseNetworkBuilder(features_extractor, pre_classifier=None, classifier=None, freeze=True, hyperspherical=False, flatten_features=True)
¶
  
            Bases: Module
Baseline Feature Extractor, with the possibility to map features to an hypersphere. If hypershperical is True the classifier is ignored.
Parameters:
- 
        features_extractor
            (Module) –Feature extractor as a toch.nn.Module. 
- 
        pre_classifier
            (Module | None, default:None) –Pre classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        classifier
            (Module | None, default:None) –Classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        freeze
            (bool, default:True) –Whether to freeze the feature extractor. Defaults to True. 
- 
        hyperspherical
            (bool, default:False) –Whether to map features to an hypersphere. Defaults to False. 
- 
        flatten_features
            (bool, default:True) –Whether to flatten the features before the pre_classifier. May be required if your model is outputting a feature map rather than a vector. Defaults to True. 
Source code in quadra/models/classification/base.py
                | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |  | 
            TimmNetworkBuilder(model_name, pretrained=True, pre_classifier=None, classifier=None, freeze=True, hyperspherical=False, flatten_features=True, **timm_kwargs)
¶
  
            Bases: BaseNetworkBuilder
Torchvision feature extractor, with the possibility to map features to an hypersphere.
Parameters:
- 
        model_name
            (str) –Timm model name 
- 
        pretrained
            (bool, default:True) –Whether to load the pretrained weights for the model. 
- 
        pre_classifier
            (Module | None, default:None) –Pre classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        classifier
            (Module | None, default:None) –Classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        freeze
            (bool, default:True) –Whether to freeze the feature extractor. Defaults to True. 
- 
        hyperspherical
            (bool, default:False) –Whether to map features to an hypersphere. Defaults to False. 
- 
        flatten_features
            (bool, default:True) –Whether to flatten the features before the pre_classifier. Defaults to True. 
- 
        **timm_kwargs
            (Any, default:{}) –Additional arguments to pass to timm.create_model 
Source code in quadra/models/classification/backbones.py
                | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |  | 
            TorchHubNetworkBuilder(repo_or_dir, model_name, pretrained=True, pre_classifier=None, classifier=None, freeze=True, hyperspherical=False, flatten_features=True, **torch_hub_kwargs)
¶
  
            Bases: BaseNetworkBuilder
TorchHub feature extractor, with the possibility to map features to an hypersphere.
Parameters:
- 
        repo_or_dir
            (str) –The name of the repository or the path to the directory containing the model. 
- 
        model_name
            (str) –The name of the model within the repository. 
- 
        pretrained
            (bool, default:True) –Whether to load the pretrained weights for the model. 
- 
        pre_classifier
            (Module | None, default:None) –Pre classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        classifier
            (Module | None, default:None) –Classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        freeze
            (bool, default:True) –Whether to freeze the feature extractor. Defaults to True. 
- 
        hyperspherical
            (bool, default:False) –Whether to map features to an hypersphere. Defaults to False. 
- 
        flatten_features
            (bool, default:True) –Whether to flatten the features before the pre_classifier. Defaults to True. 
- 
        **torch_hub_kwargs
            (Any, default:{}) –Additional arguments to pass to torch.hub.load 
Source code in quadra/models/classification/backbones.py
                | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |  | 
            TorchVisionNetworkBuilder(model_name, pretrained=True, pre_classifier=None, classifier=None, freeze=True, hyperspherical=False, flatten_features=True, **torchvision_kwargs)
¶
  
            Bases: BaseNetworkBuilder
Torchvision feature extractor, with the possibility to map features to an hypersphere.
Parameters:
- 
        model_name
            (str) –Torchvision model function that will be evaluated, for example: torchvision.models.resnet18. 
- 
        pretrained
            (bool, default:True) –Whether to load the pretrained weights for the model. 
- 
        pre_classifier
            (Module | None, default:None) –Pre classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        classifier
            (Module | None, default:None) –Classifier as a torch.nn.Module. Defaults to nn.Identity() if None. 
- 
        freeze
            (bool, default:True) –Whether to freeze the feature extractor. Defaults to True. 
- 
        hyperspherical
            (bool, default:False) –Whether to map features to an hypersphere. Defaults to False. 
- 
        flatten_features
            (bool, default:True) –Whether to flatten the features before the pre_classifier. Defaults to True. 
- 
        **torchvision_kwargs
            (Any, default:{}) –Additional arguments to pass to the model function. 
Source code in quadra/models/classification/backbones.py
                | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |  |