(name, root, check=False)
| 32 | |
| 33 | |
| 34 | def get_ckpt_path(name, root, check=False): |
| 35 | assert name in URL_MAP |
| 36 | path = os.path.join(root, CKPT_MAP[name]) |
| 37 | if not os.path.exists(path) or (check and not md5_hash(path) == MD5_MAP[name]): |
| 38 | print("Downloading {} model from {} to {}".format(name, URL_MAP[name], path)) |
| 39 | download(URL_MAP[name], path) |
| 40 | md5 = md5_hash(path) |
| 41 | assert md5 == MD5_MAP[name], md5 |
| 42 | return path |
| 43 | |
| 44 | |
| 45 | class ActNorm(nn.Module): |
no test coverage detected