Commit f42816e7 authored by w4nderlust's avatar w4nderlust Committed by Julien Chaumond
Browse files

Added additional check for url and path in discriminator model params

parent f10b9250
......@@ -317,8 +317,11 @@ def get_classifier(
).to(device)
if "url" in params:
resolved_archive_file = cached_path(params["url"])
else:
elif "path" in params:
resolved_archive_file = params["path"]
else:
raise ValueError("Either url or path have to be specified "
"in the discriminator model parameters")
classifier.load_state_dict(
torch.load(resolved_archive_file, map_location=device))
classifier.eval()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment