From f189e7bcb81e4a5ea7017bd3822ad685e4c18002 Mon Sep 17 00:00:00 2001 From: Praveen <130393640+1Pravi@users.noreply.github.com> Date: Mon, 7 Aug 2023 07:51:51 +0530 Subject: [PATCH] Update GANDLF/models/brain_age.py Co-authored-by: Sarthak Pati --- GANDLF/models/brain_age.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GANDLF/models/brain_age.py b/GANDLF/models/brain_age.py index 0d9c3c634..04f1a0591 100644 --- a/GANDLF/models/brain_age.py +++ b/GANDLF/models/brain_age.py @@ -25,9 +25,8 @@ def brainage(parameters): try: # Load the pretrained VGG16 model model = torchvision.models.vgg16(pretrained=True) - except Exception as e: - print("Error: Failed to load VGG16 model:", str(e)) - sys.exit(1) + except Exception: + sys.exit("Error: Failed to load VGG16 model: " + traceback.format_exc()) # Remove the final convolutional layer model.final_convolution_layer = None