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)
def _schedulers_loader(r: Registry): from catalyst.contrib import schedulers as m r.add_from_module(m)
def _optimizers_loader(r: Registry): from catalyst.contrib import optimizers as m r.add_from_module(m)
def _modules_loader(r: Registry): from catalyst.contrib import modules as m r.add_from_module(m)
def _criterion_loader(r: Registry): from catalyst.contrib import criterion as m r.add_from_module(m)
def _grad_clip_loader(r: Registry): from torch.nn.utils import clip_grad as m r.add_from_module(m)
def _schedulers_loader(r: Registry): from torch.optim import lr_scheduler as m r.add_from_module(m)