Skip to content

Commit

Permalink
feat: feature maps are now also considered, when checking for unprodu…
Browse files Browse the repository at this point in the history
…ctive layers
  • Loading branch information
MLRichter committed Feb 10, 2022
1 parent 425a87f commit b43d7c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rfa_toolbox/vizualize.py
Expand Up @@ -24,12 +24,14 @@ def _feature_map_size_label(feature_map_size: Union[int, Sequence[int]]) -> str:
if not isinstance(feature_map_size, Sequence) and not isinstance(
feature_map_size, np.ndarray
):
return f"\\nFeature Map Res.: {feature_map_size} x {feature_map_size}"
else:
return (
"\\nFeature Map Res.: "
f"{' x '.join(np.asarray(feature_map_size).astype(int).astype(str))}"
f"\\nFeature Map Res.: {min(feature_map_size, 1)} "
f"x {min(feature_map_size, 1)}"
)
else:
fm = np.asarray(feature_map_size)
fm[fm < 1] = 1
return "\\nFeature Map Res.: " f"{' x '.join(fm.astype(int).astype(str))}"


def visualize_node(
Expand Down

0 comments on commit b43d7c4

Please sign in to comment.