Skip to content

Commit ceca9d8

Browse files
author
Saumitro Dasgupta
committed
Exit if failed to load model
1 parent 5f657da commit ceca9d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/imagenet/validate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def main():
7777

7878
# Load the network
7979
net = load_model(args.model)
80+
if net is None:
81+
exit(-1)
8082

8183
# Load the dataset
8284
data_spec = models.get_data_spec(model_instance=net)

0 commit comments

Comments
 (0)