Skip to content
Snippets Groups Projects

Mc deep pixbis

Merged Anjith GEORGE requested to merge mc_deep_pixbis into master
1 file
+ 1
7
Compare changes
  • Side-by-side
  • Inline
@@ -59,22 +59,16 @@ class MCDeepPixBiSExtractor(Extractor):
pass
else:
# With the new training
logger.debug('Starting to load the pretrained PAD model')
try:
cp = torch.load(model_file)
except:
try:
cp= torch.load(model_file,map_location=lambda storage,loc:storage)
except:
raise ValueError('Failed to load the model file : {}'.format(model_file))
raise ValueError('Failed to load the model file : {}'.format(model_file))
if 'state_dict' in cp:
self.network.load_state_dict(cp['state_dict'])
elif: ## check this part
self.network.load_state_dict(cp)
else:
raise ValueError('Failed to load the state_dict for model file: {}'.format(model_file))
Loading