Skip to content

Commit

Permalink
Added missing docstring in utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdudek committed Apr 26, 2024
1 parent 80c43d7 commit acccdbd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
from utils.cam import grad_cam, grad_cam_plusplus


def load_network(network_name: str) -> Tuple[
def load_network(
network_name: str,
) -> Tuple[
tf.keras.Model,
Tuple[int, int],
tf.keras.layers.Layer,
Expand Down Expand Up @@ -190,6 +192,14 @@ def draw_heatmap(


def guided_bp_map_postprocessing(guided_bp_map: np.array) -> np.array:
"""Function that applies postprocessing to a given guided backpropagation map
Arguments:
guided_bp_map (np.array): The guided backpropagation map
Returns:
guided_bp_map (np.array): The postprocessed guided backpropagation map
"""

# Center on 0 with std 0.25
guided_bp_map -= guided_bp_map.mean()
Expand Down

0 comments on commit acccdbd

Please sign in to comment.