Skip to content

Commit

Permalink
fix: replace deprecated layer.output_shape with layer.output.shape
Browse files Browse the repository at this point in the history
  • Loading branch information
rizoudal committed Sep 11, 2024
1 parent 4290352 commit bb93486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aucmedi/xai/methods/gradcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def find_output_layer(self):
# Iterate over all layers
for layer in reversed(self.model.layers):
# Check to see if the layer has a 4D output -> Return layer
if len(layer.output_shape) == 4:
if len(layer.output.shape) == 4:
return layer.name
# Otherwise, throw exception
raise ValueError("Could not find 4D layer. Cannot apply Grad-CAM.")
Expand Down
2 changes: 1 addition & 1 deletion aucmedi/xai/methods/gradcam_pp.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def find_output_layer(self):
# Iterate over all layers
for layer in reversed(self.model.layers):
# Check to see if the layer has a 4D output -> Return layer
if len(layer.output_shape) == 4:
if len(layer.output.shape) == 4:
return layer.name
# Otherwise, throw exception
raise ValueError("Could not find 4D layer. Cannot apply Grad-CAM++.")
Expand Down

0 comments on commit bb93486

Please sign in to comment.