utils
Common utility functions.
load_model_weights(path, model, map_location, model_weights_url=None)
Load model weights from path or download weights from URL if file does not exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to model weights. |
required |
model |
Module
|
Path to model weights. |
required |
map_location |
device
|
See torch.load. |
required |
model_weights_url |
Optional[str]
|
URL to download model weights from if path does not exist. |
None
|
Source code in sdfest/utils.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|