Skip to content

Commit

Permalink
fix: dense layer filtering now works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
MLRichter committed Jan 23, 2022
1 parent 29d9af4 commit d79c882
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rfa_toolbox/utils/graph_utils.py
Expand Up @@ -106,7 +106,16 @@ def filters_non_convolutional_node(
are treated like a convolutional layer with a kernel
and stride size of 1.
"""
return [node for node in nodes if node.layer_info.kernel_size != np.inf]
result = []
for node in nodes:
if isinstance(node.receptive_field_min, Sequence) or isinstance(
node.receptive_field_min, tuple
):
if not np.any(np.isinf(node.receptive_field_min)):
result.append(node)
elif node.receptive_field_min != np.inf:
result.append(node)
return result


def input_resolution_range(
Expand Down

0 comments on commit d79c882

Please sign in to comment.