Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

edgify / torch   python

Repository URL to install this package:

Version: 2.0.1+cpu 

/ optim / swa_utils.pyi

from .optimizer import Optimizer
from ..nn.modules import Module
from .lr_scheduler import _LRScheduler
from .. import device, Tensor
from typing import Iterable, Any, Optional, Callable, Union, List

class AveragedModel(Module):
    def __init__(self, model: Module, device: Union[int, device]=...,
                 avg_fn: Callable[[Tensor, Tensor, int], Tensor]=...) -> None:...

    def update_parameters(self, model: Module) -> None:...

def update_bn(loader: Iterable[Any], model: Module, device: Union[int, device]=...) -> None:...

class SWALR(_LRScheduler):
    def __init__(self, optimizer: Optimizer, swa_lr: float, anneal_epochs: int,
                 anneal_strategy: str, last_epoch: int=...) -> None:...