Skip to content

Commit

Permalink
Add error handling for brain age model
Browse files Browse the repository at this point in the history
  • Loading branch information
1Pravi committed Aug 6, 2023
1 parent f189e7b commit 9d56e70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions GANDLF/models/brain_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def brainage(parameters):
"""

# Check that the input data is 2D
if parameters["model"]["dimension"] != 2:
print("Error: Brain Age predictions only work on 2D data")
sys.exit(1)
assert parameters["model"]["dimension"] == 2, "Brain Age predictions only work on 2D data"

try:
# Load the pretrained VGG16 model
Expand Down

0 comments on commit 9d56e70

Please sign in to comment.