Skip to content
Snippets Groups Projects
Commit 30f99e1f authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Fixed a bug: Name of the model is now correctly parsed from state file name.

parent 905a8628
No related branches found
No related tags found
No related merge requests found
......@@ -276,11 +276,12 @@ class Network(nn.Module):
"""
# get the model class of the pretrained model
model_class = item_in_enum(str(state_file).split('_')[0],
state_file = pathlib.Path(state_file)
model_class = item_in_enum(str(state_file.stem).split('_')[0],
SupportedModels)
# get the optimizer class of the pretrained model
optim_class = item_in_enum(str(state_file).split('_')[1],
optim_class = item_in_enum(str(state_file.stem).split('_')[1],
SupportedOptimizers)
# load the pretrained model configuration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment