Esempio n. 1
0
def register():
    registry.Criterion(RingLoss)

    registry.Callback(InferBestCallback)

    registry.Scheduler(OneCycleCosineAnnealLR)

    # classification
    try:
        from mlcomp.contrib.model import Pretrained
        registry.Model(Pretrained)
    except Exception:
        pass

    # segmentation
    registry.Model(Unet)
    registry.Model(ResnetLinknet)
    registry.Model(MobileUnet)
    registry.Model(ResnetUnet)
    registry.Model(ResnetFPNUnet)
    registry.Model(ResnetPSPnet)
    registry.Model(FPNUnet)
    registry.Model(Linknet)
    registry.Model(PSPnet)
    registry.Model(ResNetLinknet)

    try:
        from mlcomp.contrib.model.segmentation_model_pytorch import \
            SegmentationModelPytorch
        registry.Model(SegmentationModelPytorch)
    except Exception:
        pass
Esempio n. 2
0
def register():
    registry.Model(Pretrained)

    registry.Criterion(RingLoss)

    registry.Callback(InferBestCallback)

    registry.Scheduler(OneCycleCosineAnnealLR)

    # segmentation
    registry.Model(Unet)
    registry.Model(ResnetLinknet)
    registry.Model(MobileUnet)
    registry.Model(ResnetUnet)
    registry.Model(ResnetFPNUnet)
    registry.Model(ResnetPSPnet)
    registry.Model(FPNUnet)
    registry.Model(Linknet)
    registry.Model(PSPnet)
Esempio n. 3
0
registry.Model(SENetTIMM)
registry.Model(InceptionV3TIMM)
registry.Model(GluonResnetTIMM)
registry.Model(DSInceptionV3)
registry.Model(DSSENet)
registry.Model(DSResnet)
registry.Model(ResNet50CutMix)
registry.Model(Fishnet)
registry.Model(SENetCellType)
registry.Model(SENetCellMultipleDropout)
registry.Model(MixNet)

# Register callbacks
registry.Callback(LabelSmoothCriterionCallback)
registry.Callback(SmoothMixupCallback)
registry.Callback(DSAccuracyCallback)
registry.Callback(DSCriterionCallback)
registry.Callback(SlackLogger)
registry.Callback(TwoHeadsCriterionCallback)
registry.Callback(DSMixupCallback)

# Register criterions
registry.Criterion(LabelSmoothingCrossEntropy)

# Register optimizers
registry.Optimizer(AdamW)
registry.Optimizer(Nadam)
registry.Optimizer(RAdam)

registry.Scheduler(CyclicLRFix)
Esempio n. 4
0
# flake8: noqa
# pylint: disable=unused-import
from catalyst.dl import registry
from transformers import AdamW, WarmupLinearSchedule

from .experiment import Experiment
from .catalyst_ext.runner import BertSupervisedRunner as Runner
from .model_wrapper import BertModel

from .catalyst_ext.bert_criterion import BertCrossEntropyLoss, BertCriterionCallback

registry.Model(BertModel)
registry.Criterion(BertCrossEntropyLoss)
registry.Callback(BertCriterionCallback)
registry.Optimizer(AdamW, name='TransformersAdamW')
registry.Scheduler(WarmupLinearSchedule)
Esempio n. 5
0
# flake8: noqa

from .experiment import Experiment

from catalyst.dl import registry
from catalyst.dl import SupervisedRunner as Runner

from src.callbacks.tensorboard import VisualizationCallback, ProjectorCallback
from src.callbacks.cico.doe import DoECallback
from src.callbacks.cico.benchmark import BenchmarkingCallback
from src.models.cico.generic import GenericModel
from src.schedulers.cosine import CosineAnnealingWarmUpRestarts
from src.losses.cico.arcface import ArcFaceLinear, ArcFaceLoss, L2Norm
from src.losses.cico.triplet import TripletSemiHardLoss

registry.Model(GenericModel)

registry.Module(L2Norm)
registry.Module(ArcFaceLinear)

registry.Criterion(ArcFaceLoss)
registry.Criterion(TripletSemiHardLoss)

registry.Callback(VisualizationCallback)
registry.Callback(ProjectorCallback)

registry.Callback(DoECallback)
registry.Callback(BenchmarkingCallback)

registry.Scheduler(CosineAnnealingWarmUpRestarts)
Esempio n. 6
0
from .metrics import (
    WeightedAUC,  # for binary classification
    SingleClassWeightedAUC  # for multiclass classification
)
from .schedulers import CosineAnnealingWithRestartsLR
from .criterions import LabelSmoothingLoss
from .models import (
    BinaryEfficientNet,
    MulticlassEfficientNet,
    StemMulticlassEfficientNet,
    BinaryDensenet,
    LLFEfficientNet,
    patch_efficientnet_backbone,
    patch_efficientnet_conv_stem,
)

registry.Callback(WeightedAUC)
registry.Callback(SingleClassWeightedAUC)

registry.Scheduler(CosineAnnealingWithRestartsLR)

registry.Criterion(LabelSmoothingLoss)

registry.Model(BinaryEfficientNet)
registry.Model(MulticlassEfficientNet)
registry.Model(StemMulticlassEfficientNet)
registry.Model(BinaryDensenet)
registry.Model(LLFEfficientNet)
registry.Model(patch_efficientnet_backbone)
registry.Model(patch_efficientnet_conv_stem)