示例#1
0
def _samplers_loader(r: Registry):
    from torch.utils.data import sampler as s
    factories = {
        k: v
        for k, v in s.__dict__.items() if "Sampler" in k and k != "Sampler"
    }
    r.add(**factories)
    from catalyst.data import sampler
    r.add_from_module(sampler)
示例#2
0
def _schedulers_loader(r: Registry):
    from catalyst.contrib import schedulers as m
    r.add_from_module(m)
示例#3
0
def _optimizers_loader(r: Registry):
    from catalyst.contrib import optimizers as m
    r.add_from_module(m)
示例#4
0
def _modules_loader(r: Registry):
    from catalyst.contrib import modules as m
    r.add_from_module(m)
示例#5
0
def _criterion_loader(r: Registry):
    from catalyst.contrib import criterion as m
    r.add_from_module(m)
示例#6
0
def _grad_clip_loader(r: Registry):
    from torch.nn.utils import clip_grad as m
    r.add_from_module(m)
示例#7
0
def _schedulers_loader(r: Registry):
    from torch.optim import lr_scheduler as m
    r.add_from_module(m)