Spaces:
Runtime error
Runtime error
Download isegm/model/modifiers.py from curt-park/interactive-segmentation: direct link, hf CLI and curl.
- Browser
- Download file 304 Bytes
-
https://huggingface.co/spaces/curt-park/interactive-segmentation/resolve/main/isegm/model/modifiers.py
- Command line
-
hf download hf://spaces/curt-park/interactive-segmentation/isegm/model/modifiers.py
-
curl -L -o modifiers.py https://huggingface.co/spaces/curt-park/interactive-segmentation/resolve/main/isegm/model/modifiers.py
304 Bytes
| class LRMult(object): | |
| def __init__(self, lr_mult=1.0): | |
| self.lr_mult = lr_mult | |
| def __call__(self, m): | |
| if getattr(m, "weight", None) is not None: | |
| m.weight.lr_mult = self.lr_mult | |
| if getattr(m, "bias", None) is not None: | |
| m.bias.lr_mult = self.lr_mult | |