Skip to content

Commit 8c02ab7

Browse files
authored
Merge pull request #163 from dmesh-io/feature/donothide
don't hide exception
2 parents 4dd3899 + f49dd18 commit 8c02ab7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,8 @@ def load(self, num = -1):
11971197

11981198
try:
11991199
self.GAN.load_state_dict(load_data['GAN'])
1200-
except:
1200+
except Exception as e:
12011201
print('unable to load save model. please try downgrading the package to the version specified by the saved model')
1202-
exit()
1203-
1202+
raise e
12041203
if self.GAN.fp16 and 'amp' in load_data:
12051204
amp.load_state_dict(load_data['amp'])

0 commit comments

Comments
 (0)